projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fe5f1d4
)
Added $FS::Record::no_update_diff flag to update "identical" records anyway.
author
khoff
<khoff>
Sat, 10 Mar 2007 00:16:51 +0000
(
00:16
+0000)
committer
khoff
<khoff>
Sat, 10 Mar 2007 00:16:51 +0000
(
00:16
+0000)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
e438294
..
0afe3ec
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-3,7
+3,7
@@
package FS::Record;
use strict;
use vars qw( $AUTOLOAD @ISA @EXPORT_OK $DEBUG
$conf $me
use strict;
use vars qw( $AUTOLOAD @ISA @EXPORT_OK $DEBUG
$conf $me
- %virtual_fields_cache $nowarn_identical );
+ %virtual_fields_cache $nowarn_identical
$no_update_diff
);
use Exporter;
use Carp qw(carp cluck croak confess);
use File::CounterFile;
use Exporter;
use Carp qw(carp cluck croak confess);
use File::CounterFile;
@@
-30,6
+30,7
@@
$DEBUG = 0;
$me = '[FS::Record]';
$nowarn_identical = 0;
$me = '[FS::Record]';
$nowarn_identical = 0;
+$no_update_diff = 0;
my $rsa_module;
my $rsa_loaded;
my $rsa_module;
my $rsa_loaded;
@@
-1041,7
+1042,7
@@
sub replace {
my %diff = map { ($new->getfield($_) ne $old->getfield($_))
? ($_, $new->getfield($_)) : () } $old->fields;
my %diff = map { ($new->getfield($_) ne $old->getfield($_))
? ($_, $new->getfield($_)) : () } $old->fields;
- unless (
keys(%diff)
) {
+ unless (
keys(%diff) || $no_update_diff
) {
carp "[warning]$me $new -> replace $old: records identical"
unless $nowarn_identical;
return '';
carp "[warning]$me $new -> replace $old: records identical"
unless $nowarn_identical;
return '';