[Rt-commit] r17907 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Jan 25 21:37:18 EST 2009
Author: sunnavy
Date: Sun Jan 25 21:37:18 2009
New Revision: 17907
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/CustomField.pm
Log:
r19009 at sunnavys-mb: sunnavy | 2009-01-26 10:12:26 +0800
merged lib/RT/Model/CustomField.pm
Modified: rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/CustomField.pm (original)
+++ rt/3.999/branches/merge_to_3.8.2/lib/RT/Model/CustomField.pm Sun Jan 25 21:37:18 2009
@@ -192,7 +192,7 @@
disabled => 0,
lookup_type => '',
repeated => 0,
- link_to_value => '',
+ link_value_to => '',
include_content_for_value => '',
@_,
);
@@ -261,12 +261,22 @@
disabled => $args{'disabled'},
lookup_type => $args{'lookup_type'},
repeated => $args{'repeated'},
- link_to_value => $args{'link_to_value'},
+ link_value_to => $args{'link_value_to'},
include_content_for_value => $args{include_content_for_value},
);
- if ( exists $args{'ValuesClass'} ) {
- $self->set_values_class( $args{'ValuesClass'} );
+ if ( exists $args{'link_value_to'} ) {
+ $self->set_link_value_to( $args{'link_value_to'} );
+ }
+
+ if ( exists $args{'include_content_for_value'} ) {
+ $self->set_include_content_for_value( $args{'include_content_for_value'} );
+ }
+
+
+
+ if ( exists $args{'values_class'} ) {
+ $self->set_values_class( $args{'values_class'} );
if ( exists $args{'link_value_to'} ) {
$self->set_linkvalueto( $args{'link_value_to'} );
}
@@ -315,6 +325,9 @@
Will load a Disabled Custom column even if there is a non-disabled Custom Field
with the same Name.
+Will load a Disabled Custom column even if there is a non-disabled Custom Field
+with the same Name.
+
If a queue parameter is specified, only look for ticket custom fields tied to that Queue.
If the queue parameter is '0', look for global ticket custom fields.
@@ -367,7 +380,12 @@
# We only want one entry.
$CFs->rows_per_page(1);
- return ( 0, _("Not found") ) unless my $first = $CFs->first;
+
+ # version before 3.8 just returns 0, so we need to test if wantarray to be
+ # backward compatible.
+ return wantarray ? ( 0, _("Not found") ) : 0
+ unless my $first = $CFs->first;
+
return $self->load_by_id( $first->id );
}
More information about the Rt-commit
mailing list