projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a1b41c
)
add nowarn_identical flag to Record.pm and use it in cust_svc svcpart replacement...
author
ivan
<ivan>
Wed, 13 Apr 2005 12:30:22 +0000
(12:30 +0000)
committer
ivan
<ivan>
Wed, 13 Apr 2005 12:30:22 +0000
(12:30 +0000)
FS/FS/Record.pm
patch
|
blob
|
history
FS/FS/cust_svc.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
5dbcd4d
..
de5feeb
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-2,7
+2,7
@@
package FS::Record;
use strict;
use vars qw( $dbdef_file $dbdef $setup_hack $AUTOLOAD @ISA @EXPORT_OK $DEBUG
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);
use subs qw(reload_dbdef);
use Exporter;
use Carp qw(carp cluck croak confess);
@@
-25,6
+25,8
@@
use Tie::IxHash;
$DEBUG = 0;
$me = '[FS::Record]';
$DEBUG = 0;
$me = '[FS::Record]';
+$nowarn_identical = 0;
+
my $conf;
my $rsa_module;
my $rsa_loaded;
my $conf;
my $rsa_module;
my $rsa_loaded;
@@
-922,7
+924,8
@@
sub replace {
? ($_, $new->getfield($_)) : () } $old->fields;
unless ( keys(%diff) ) {
? ($_, $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 '';
}
return '';
}
diff --git
a/FS/FS/cust_svc.pm
b/FS/FS/cust_svc.pm
index
e986953
..
2bc20ff
100644
(file)
--- a/
FS/FS/cust_svc.pm
+++ b/
FS/FS/cust_svc.pm
@@
-178,6
+178,7
@@
sub replace {
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 });
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;
my $error = $new_svc_x->replace($svc_x);
if ( $error ) {
$dbh->rollback if $oldAutoCommit;