[Rt-commit] r17592 - in rt/branches/3.999-DANGEROUS: lib/RT lib/RT/Model

jesse at bestpractical.com jesse at bestpractical.com
Tue Jan 6 14:07:12 EST 2009


Author: jesse
Date: Tue Jan  6 14:07:12 2009
New Revision: 17592

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Record.pm

Log:
 r56618 at 17h:  jesse | 2009-01-06 14:02:37 -0500
 * cleanups to remove a deprecated queue_obj and to stop calling a bunch of _obj methods


Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm	Tue Jan  6 14:07:12 2009
@@ -602,20 +602,11 @@
 
 =cut
 
-sub principal_object {
-    require Carp; Carp::confess("deprecated");
-}
-
-
-
-
 sub _set {
     my $self = shift;
     return ( 0, _("ACEs can only be created and deleted.") );
 }
 
-
-
 sub _value {
     my $self = shift;
 
@@ -638,10 +629,7 @@
     }
 }
 
-
-
-
-=head2 _canonicalize_principal (principal_id, type)
+=head2 canonicalize_principal (principal_id, type)
 
 Takes a principal id and an optional principal type.
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	Tue Jan  6 14:07:12 2009
@@ -1362,27 +1362,6 @@
 
 
 
-=head2 queue_obj
-
-Takes nothing. returns this ticket's queue object
-
-=cut
-
-sub queue_obj {
-    require Carp; Carp::carp('deprecated');
-    my $self = shift;
-
-    my $queue_obj = RT::Model::Queue->new;
-
-    #We call __value so that we can avoid the ACL decision and some deep recursion
-    my ($result) = $queue_obj->load( $self->__value('queue') );
-    return ($queue_obj);
-}
-
-
-
-
-
 =head2 due_obj
 
   Returns an RT::Date object containing this ticket's due date

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	Tue Jan  6 14:07:12 2009
@@ -1084,7 +1084,7 @@
     unless ( $self->object_type eq 'RT::Model::Ticket' ) {
         require Carp; Carp::confess("ticket method is called on txn that belongs not to ticket");
     }
-    return $self->object_id;
+    return $self->object;
 
 }
 
@@ -1195,7 +1195,7 @@
     my $self  = shift;
     my $field = shift;
 
-    if ( UNIVERSAL::can( $self->object, 'queue_obj' ) ) {
+    if ( $self->object->can( 'queue' )) {
 
         # XXX: $field could be undef when we want fetch values for all CFs
         #      do we want to cover this situation somehow here?

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	Tue Jan  6 14:07:12 2009
@@ -1331,7 +1331,7 @@
         # Convert FooBar into foo_bar
         $class =~ s/.([[:upper:]])/_$1/g;
 
-        my $method = lc($class) . "_obj";
+        my $method = lc($class);
         $object = $object->$method;
     }
 


More information about the Rt-commit mailing list