[Rt-commit] r4679 - in rt/branches/3.7-EXPERIMENTAL: .
lib/RT/Interface
alexmv at bestpractical.com
alexmv at bestpractical.com
Sat Mar 4 04:33:13 EST 2006
Author: alexmv
Date: Sat Mar 4 04:33:11 2006
New Revision: 4679
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/EmailParser.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Link_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/ObjectCustomFieldValues_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Queue_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Transactions_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/URI.pm
Log:
r9466 at zoq-fot-pik: chmrr | 2006-03-04 01:30:54 -0800
* Removed deprecated lib interfaces
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -749,24 +749,6 @@
# }}}
-sub Queue {
- $RT::Logger->debug( ref($_[0]) . " -> Queue deprecated at (". join(":",caller).")");
-
- return 0;
-}
-
-sub SetQueue {
- $RT::Logger->debug( ref($_[0]) . " -> SetQueue deprecated at (". join(":",caller).")");
-
- return 0;
-}
-
-sub QueueObj {
- $RT::Logger->debug( ref($_[0]) . " -> QueueObj deprecated at (". join(":",caller).")");
-
- return undef;
-}
-
=head2 SetTypeComposite
Set this custom field's type and maximum values as a composite value
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/EmailParser.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/EmailParser.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/EmailParser.pm Sat Mar 4 04:33:11 2006
@@ -273,20 +273,6 @@
# }}}
-# {{{ sub ParseTicketId
-
-sub ParseTicketId {
- my $self = shift;
- $RT::Logger->warnings("RT::EmailParser->ParseTicketId deprecated. You should be using RT::Interface::Email at (". join(":",caller).")");
-
- require RT::Interface::Email;
- RT::Interface::Email::ParseTicketId(@_);
-}
-
-# }}}
-
-
-
# {{{ ParseCcAddressesFromHead
=head2 ParseCcAddressesFromHead HASHREF
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm Sat Mar 4 04:33:11 2006
@@ -898,16 +898,12 @@
my @results;
foreach my $arg (keys %$ARGSref) {
- next unless ( $arg =~ /^(GrantRight|RevokeRight)-(\d+)-(.+?)-(\d+)(?:-(.+))?$/ );
+ next unless ( $arg =~ /^(GrantRight|RevokeRight)-(\d+)-(.+?)-(\d+)$/ );
my ($method, $principal_id, $object_type, $object_id) = ($1, $2, $3, $4);
- # format with $5 is deprecated, pass rights as value of the hash
my @rights;
- if ( $5 ) {
- $RT::Logger->warning("use hash entry value for rights, this format is deprecated.");
- @rights = $5;
- } elsif ( UNIVERSAL::isa( $ARGSref->{$arg}, 'ARRAY' ) ) {
+ if ( UNIVERSAL::isa( $ARGSref->{$arg}, 'ARRAY' ) ) {
@rights = @{$ARGSref->{$arg}}
} else {
@rights = $ARGSref->{$arg};
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Link_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Link_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Link_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -301,89 +301,5 @@
}
# }}}
-
-
-# Static methods:
-
-# {{{ sub BaseIsLocal
-
-=head2 BaseIsLocal
-
-Returns true if the base of this link is a local ticket
-
-=cut
-
-sub BaseIsLocal {
- my $self = shift;
- $RT::Logger->crit("Link::BaseIsLocal is deprecated in favor of Link->BaseURI->IsLocal at (". join(":",caller).")");
- return $self->BaseURI->IsLocal;
-}
-
-# }}}
-
-# {{{ sub TargetIsLocal
-
-=head2 TargetIsLocal
-
-Returns true if the target of this link is a local ticket
-
-=cut
-
-sub TargetIsLocal {
- my $self = shift;
- $RT::Logger->crit("Link::BaseIsLocal is deprecated in favor of Link->BaseURI->IsLocal at (". join(":",caller).")");
- return $self->TargetURI->IsLocal;
-}
-
-# }}}
-
-
-# {{{ sub BaseAsHREF
-
-=head2 BaseAsHREF
-
-Returns an HTTP url to access the base of this link
-
-=cut
-
-sub BaseAsHREF {
- my $self = shift;
- $RT::Logger->crit("Link::BaseAsHREF deprecated in favor of ->BaseURI->AsHREF at (". join(":",caller).")");
- return $self->BaseURI->AsHREF;
-}
-# }}}
-
-# {{{ sub TargetAsHREF
-
-=head2 TargetAsHREF
-
-return an HTTP url to access the target of this link
-
-=cut
-
-sub TargetAsHREF {
- my $self = shift;
- $RT::Logger->crit("Link::TargetAsHREF deprecated in favor of ->TargetURI->AsHREF at (". join(":",caller).")");
- return $self->TargetURI->AsHREF;
-}
-# }}}
-
-# {{{ sub AsHREF - Converts Link URIs to HTTP URLs
-
-=head2 URI
-
-Takes a URI and returns an http: url to access that object.
-
-=cut
-
-
-sub AsHREF {
- my $self=shift;
-
- $RT::Logger->crit("AsHREF is gone. look at URI::HREF to figure out what to do with \$URI");
-}
-
-# }}}
-
1;
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/ObjectCustomFieldValues_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/ObjectCustomFieldValues_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/ObjectCustomFieldValues_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -67,32 +67,13 @@
# }}}
-# {{{ sub LimitToTicket
+# {{{ sub LimitToObject
-=head2 LimitToTicket TICKETID
+=head2 LimitToObject OBJECT
-Limits the returned set to values for the ticket with Id TICKETID
+Limits the returned set to values for the given OBJECT
=cut
-
-sub LimitToTicket {
- my $self = shift;
- my $ticket = shift;
-
-
- $RT::Logger->warning(ref($self) . " -> LimitToTicket deprecated in favor of LimitToObject at (". join(":",caller).")");
-
- $self->Limit( FIELD => 'ObjectType',
- VALUE => 'RT::Ticket',
- OPERATOR => '=');
- return ($self->Limit( FIELD => 'ObjectId',
- VALUE => $ticket,
- OPERATOR => '='));
-
-}
-
-# }}}
-
sub LimitToObject {
my $self = shift;
@@ -106,6 +87,8 @@
}
+# }}}
+
=sub HasEntry VALUE
Returns true if this CustomFieldValues collection has an entry with content that eq VALUE
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Queue_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Queue_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Queue_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -509,22 +509,15 @@
}
-# {{{ CustomFields
+# {{{ TicketCustomFields
-=head2 CustomFields
+=head2 TicketCustomFields
-Returns an RT::CustomFields object containing all global custom fields, as well as those tied to this queue
+Returns an L<RT::CustomFields> object containing all global and
+queue-specific B<ticket> custom fields.
=cut
-# XXX TODO - this should become TicketCustomFields
-
-sub CustomFields {
- my $self = shift;
- warn "Queue->CustomFields is deprecated, use Queue->TicketCustomFields instead at (". join(":",caller).")";
- return $self->TicketCustomFields(@_);
-}
-
sub TicketCustomFields {
my $self = shift;
@@ -536,6 +529,17 @@
return ($cfs);
}
+# }}}
+
+# {{{ TicketTransactionCustomFields
+
+=head2 TicketTransactionCustomFields
+
+Returns an L<RT::CustomFields> object containing all global and
+queue-specific B<transaction> custom fields.
+
+=cut
+
sub TicketTransactionCustomFields {
my $self = shift;
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 Sat Mar 4 04:33:11 2006
@@ -1547,15 +1547,6 @@
return ref($self);
}
-#TODO Deprecated API. Destroy in 3.6
-sub _LookupTypes {
- my $self = shift;
- $RT::Logger->warning("_LookupTypes call is deprecated at (". join(":",caller)."). Replace with CustomFieldLookupType");
-
- return($self->CustomFieldLookupType);
-
-}
-
# {{{ AddCustomFieldValue
=head2 AddCustomFieldValue { Field => FIELD, Value => VALUE }
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -3215,20 +3215,14 @@
# }}}
-# {{{ sub Kill
+# {{{ sub Delete
-=head2 Kill
+=head2 Delete
Takes no arguments. Marks this ticket for garbage collection
=cut
-sub Kill {
- my $self = shift;
- $RT::Logger->crit("'Kill' is deprecated. use 'Delete' instead at (". join(":",caller).").");
- return $self->Delete;
-}
-
sub Delete {
my $self = shift;
return ( $self->SetStatus('deleted') );
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Tickets_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -2044,16 +2044,6 @@
);
}
-sub LimitRequestor {
- my $self = shift;
- my %args = (@_);
- $RT::Logger->error( "Tickets->LimitRequestor is deprecated at ("
- . join( ":", caller )
- . ")" );
- $self->LimitWatcher( TYPE => 'Requestor', @_ );
-
-}
-
# }}}
# }}}
@@ -2072,14 +2062,12 @@
TYPE = { RefersTo, MemberOf, DependsOn }
TARGET is the id or URI of the TARGET of the link
-(TARGET used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as TARGET
=cut
sub LimitLinkedTo {
my $self = shift;
my %args = (
- TICKET => undef,
TARGET => undef,
TYPE => undef,
OPERATOR => '=',
@@ -2089,12 +2077,12 @@
$self->Limit(
FIELD => 'LinkedTo',
BASE => undef,
- TARGET => ( $args{'TARGET'} || $args{'TICKET'} ),
+ TARGET => $args{'TARGET'},
TYPE => $args{'TYPE'},
DESCRIPTION => $self->loc(
"Tickets [_1] by [_2]",
$self->loc( $args{'TYPE'} ),
- ( $args{'TARGET'} || $args{'TICKET'} )
+ $args{'TARGET'}
),
OPERATOR => $args{'OPERATOR'},
);
@@ -2111,8 +2099,6 @@
BASE is the id or URI of the BASE of the link
-(BASE used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as BASE
-
=cut
@@ -2120,7 +2106,6 @@
my $self = shift;
my %args = (
BASE => undef,
- TICKET => undef,
TYPE => undef,
OPERATOR => '=',
@_
@@ -2137,12 +2122,12 @@
$self->Limit(
FIELD => 'LinkedTo',
TARGET => undef,
- BASE => ( $args{'BASE'} || $args{'TICKET'} ),
+ BASE => $args{'BASE'},
TYPE => $type,
DESCRIPTION => $self->loc(
"Tickets [_1] [_2]",
$self->loc( $args{'TYPE'} ),
- ( $args{'BASE'} || $args{'TICKET'} )
+ $args{'BASE'},
),
OPERATOR => $args{'OPERATOR'},
);
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Transactions_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Transactions_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Transactions_Overlay.pm Sat Mar 4 04:33:11 2006
@@ -89,32 +89,6 @@
}
# }}}
-=head2 Limit
-
-A wrapper around SUPER::Limit to catch migration issues
-
-=cut
-
-sub Limit {
- my $self = shift;
- my %args = (@_);
-
- if ($args{'FIELD'} eq 'Ticket') {
- Carp::cluck("Historical code calling RT::Transactions::Limit with a 'Ticket' at (". join(":",caller)."). This deprecated API will be deleted in 3.6");
- $self->SUPER::Limit(FIELD => 'ObjectType', OPERATOR => '=', VALUE =>'RT::Ticket');
- $args{'FIELD'} = 'ObjectId';
- $self->SUPER::Limit(%args);
-
- } else {
-
- $self->SUPER::Limit(%args);
- }
-
-
-}
-
-
-
=head2 LimitToTicket TICKETID
Find only transactions for the ticket whose id is TICKETID.
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/URI.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/URI.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/URI.pm Sat Mar 4 04:33:11 2006
@@ -135,7 +135,7 @@
}
else {
$RT::Logger->warning("$self Could not determine a URI scheme for $uri");
- return (undef);
+ return (undef);
}
# load up a resolver object for this scheme
@@ -147,7 +147,7 @@
return (undef);
}
-return(1);
+ return(1);
}
@@ -170,16 +170,16 @@
my $resolver;
- eval "
- require RT::URI::$scheme;
- \$resolver = RT::URI::$scheme->new(\$self->CurrentUser);
- ";
+ eval "
+ require RT::URI::$scheme;
+ \$resolver = RT::URI::$scheme->new(\$self->CurrentUser);
+ ";
- if ($resolver) {
+ if ($resolver) {
$self->{'resolver'} = $resolver;
- } else {
+ } else {
$self->{'resolver'} = RT::URI::base->new($self->CurrentUser);
- }
+ }
}
@@ -189,8 +189,8 @@
=head2 Scheme
-Returns a local object id for this content. You are expected to know what sort of object this is the Id
-of
+Returns a local object id for this content. You are expected to know
+what sort of object this is the Id of
=cut
@@ -259,8 +259,8 @@
sub AsHREF {
my $self = shift;
return $self->Resolver->HREF;
-
}
+
=head Resolver
Returns this URI's URI resolver object
More information about the Rt-commit
mailing list