[Rt-commit] r10664 - rt/branches/3.999-DANGEROUS/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Sat Feb 2 00:08:11 EST 2008


Author: ruz
Date: Sat Feb  2 00:07:58 2008
New Revision: 10664

Modified:
   rt/branches/3.999-DANGEROUS/lib/RT/Record.pm

Log:
* finish lowercasing Record

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm	Sat Feb  2 00:07:58 2008
@@ -744,14 +744,14 @@
     my $class = ref($self) || $self;
 
     my %args = (
-        ARGSRef         => undef,
-        AttributesRef   => undef,
-        AttributePrefix => undef,
+        args_ref         => undef,
+        attributes_ref   => undef,
+        attribute_prefix => undef,
         @_
     );
 
-    my $attributes = $args{'AttributesRef'};
-    my $ARGSRef    = $args{'ARGSRef'};
+    my $attributes = $args{'attributes_ref'};
+    my $ARGSRef    = $args{'args_ref'};
     my @results;
 
     foreach my $attribute (@$attributes) {
@@ -759,14 +759,14 @@
         if ( defined $ARGSRef->{$attribute} ) {
             $value = $ARGSRef->{$attribute};
         } elsif (
-            defined( $args{'AttributePrefix'} )
+            defined( $args{'attribute_prefix'} )
             && defined(
-                $ARGSRef->{ $args{'AttributePrefix'} . "-" . $attribute }
+                $ARGSRef->{ $args{'attribute_prefix'} . "-" . $attribute }
             )
             )
         {
             $value
-                = $ARGSRef->{ $args{'AttributePrefix'} . "-" . $attribute };
+                = $ARGSRef->{ $args{'attribute_prefix'} . "-" . $attribute };
 
         } else {
             next;
@@ -781,7 +781,7 @@
         # and might not have a name method.
         # If it fails, we don't care
         eval {
-            my $object = $attribute . "Obj";
+            my $object = $attribute . "_obj";
             next if ( $self->can($object) && $self->$object->name eq $value );
         };
         next if ( $value eq ( $self->$attribute() || '' ) );
@@ -1458,7 +1458,7 @@
                 if ( $i < $cf_values ) {
                     my ( $val, $msg ) = $cf->delete_value_for_object(
                         object  => $self,
-                        Content => $value->content
+                        content => $value->content
                     );
                     unless ($val) {
                         return ( 0, $msg );
@@ -1505,7 +1505,7 @@
 
         my ( $new_value_id, $value_msg ) = $cf->add_value_for_object(
             object       => $self,
-            Content      => $args{'value'},
+            content      => $args{'value'},
             large_content => $args{'large_content'},
             content_type  => $args{'content_type'},
         );
@@ -1556,7 +1556,7 @@
     else {
         my ( $new_value_id, $msg ) = $cf->add_value_for_object(
             object       => $self,
-            Content      => $args{'value'},
+            content      => $args{'value'},
             large_content => $args{'large_content'},
             content_type  => $args{'content_type'},
         );
@@ -1613,7 +1613,7 @@
     my ( $val, $msg ) = $cf->delete_value_for_object(
         object  => $self,
         id      => $args{'value_id'},
-        Content => $args{'value'},
+        content => $args{'value'},
     );
     unless ($val) {
         return ( 0, $msg );


More information about the Rt-commit mailing list