[Rt-commit] r4956 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Apr 4 13:52:28 EDT 2006
Author: ruz
Date: Tue Apr 4 13:52:23 2006
New Revision: 4956
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
Log:
r2297 at cubic-pc: cubic | 2006-04-04 16:34:56 +0400
* reuse collection of the values we allready have
* redo search if have deleted some values
* get rid of uninit warnings
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm Tue Apr 4 13:52:23 2006
@@ -1572,6 +1572,8 @@
my %args = (
Field => undef,
Value => undef,
+ LargeContent => undef,
+ ContentType => undef,
RecordTransaction => 1,
@_
);
@@ -1630,12 +1632,14 @@
);
}
}
+ $values->RedoSearch if $i; # redo search if have deleted at least one value
}
my ( $old_value, $old_content );
- if ( $old_value = $cf->ValuesForObject($self)->First ) {
- $old_content = $old_value->Content();
- return (1) if( $old_content eq $args{'Value'} && $old_value->LargeContent eq $args{'LargeContent'});;
+ if ( $old_value = $values->First ) {
+ $old_content = $old_value->Content;
+ return (1) if ( $old_content || '' ) eq ( $args{'Value'} || '' ) &&
+ ( $old_value->LargeContent || '' ) eq ( $args{'LargeContent'} || '');
}
my ( $new_value_id, $value_msg ) = $cf->AddValueForObject(
More information about the Rt-commit
mailing list