freeside/FS/FS Record.pm,1.101,1.102 cust_svc.pm,1.54,1.55

ivan ivan at pouncequick.420.am
Wed Apr 13 05:30:24 PDT 2005


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv22826

Modified Files:
	Record.pm cust_svc.pm 
Log Message:
add nowarn_identical flag to Record.pm and use it in cust_svc svcpart replacement (which is all about the exports anyway)

Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- Record.pm	7 Apr 2005 09:26:18 -0000	1.101
+++ Record.pm	13 Apr 2005 12:30:21 -0000	1.102
@@ -2,7 +2,7 @@
 
 use strict;
 use vars qw( $dbdef_file $dbdef $setup_hack $AUTOLOAD @ISA @EXPORT_OK $DEBUG
-             $me %dbdef_cache %virtual_fields_cache );
+             $me %dbdef_cache %virtual_fields_cache $nowarn_identical );
 use subs qw(reload_dbdef);
 use Exporter;
 use Carp qw(carp cluck croak confess);
@@ -25,6 +25,8 @@
 $DEBUG = 0;
 $me = '[FS::Record]';
 
+$nowarn_identical = 0;
+
 my $conf;
 my $rsa_module;
 my $rsa_loaded;
@@ -922,7 +924,8 @@
                    ? ($_, $new->getfield($_)) : () } $old->fields;
                    
   unless ( keys(%diff) ) {
-    carp "[warning]$me $new -> replace $old: records identical";
+    carp "[warning]$me $new -> replace $old: records identical"
+      unless $nowarn_identical;
     return '';
   }
 

Index: cust_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_svc.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- cust_svc.pm	30 Mar 2005 21:22:44 -0000	1.54
+++ cust_svc.pm	13 Apr 2005 12:30:22 -0000	1.55
@@ -178,6 +178,7 @@
   if ( $new->svcpart != $old->svcpart ) {
     my $svc_x = $new->svc_x;
     my $new_svc_x = ref($svc_x)->new({$svc_x->hash, svcpart=>$new->svcpart });
+    local($FS::Record::nowarn_identical) = 1;
     my $error = $new_svc_x->replace($svc_x);
     if ( $error ) {
       $dbh->rollback if $oldAutoCommit;




More information about the freeside-commits mailing list