[Rt-commit] r14114 - in rt/branches/3.999-DANGEROUS: . lib/RT lib/RT/Graph lib/RT/Model lib/RT/ScripAction sbin share/html/Admin/Elements share/html/Admin/Global/CustomFields share/html/Dashboards/Elements share/html/Elements share/html/Install share/html/NoAuth/iCal share/html/Ticket share/html/Ticket/Graphs/Elements
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jul 15 09:23:21 EDT 2008
Author: sunnavy
Date: Tue Jul 15 09:23:21 2008
New Revision: 14114
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm
rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm
rt/branches/3.999-DANGEROUS/lib/RT/Search.pm
rt/branches/3.999-DANGEROUS/lib/RT/Test.pm
rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards.in
rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in
rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips
rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips
rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/DashboardsForObject
rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/SelectPrivacy
rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks
rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html
rt/branches/3.999-DANGEROUS/share/html/NoAuth/iCal/dhandler
rt/branches/3.999-DANGEROUS/share/html/Ticket/Forward.html
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowGraph
rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/dhandler
Log:
r14489 at sunnavys-mb: sunnavy | 2008-07-15 18:10:08 +0800
name fixes
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Dashboard.pm Tue Jul 15 09:23:21 2008
@@ -56,8 +56,8 @@
=head1 DESCRIPTION
- Dashboard is an object that can belong to either an RT::User or an
- RT::Group. It consists of an ID, a name, and a number of
+ Dashboard is an object that can belong to either an RT::Model::User or an
+ RT::Model::Group. It consists of an ID, a name, and a number of
saved searches.
=head1 METHODS
@@ -89,8 +89,8 @@
use RT::System;
$RT::System::RIGHTS = { %$RT::System::RIGHTS, %new_rights };
-%RT::ACE::LOWERCASERIGHTNAMES =
- ( %RT::ACE::LOWERCASERIGHTNAMES, map { lc($_) => $_ } keys %new_rights );
+%RT::Model::ACE::LOWERCASERIGHTNAMES =
+ ( %RT::Model::ACE::LOWERCASERIGHTNAMES, map { lc($_) => $_ } keys %new_rights );
=head2 ObjectName
@@ -241,7 +241,7 @@
Object => $RT::System,
);
- my $groups = RT::Groups->new($CurrentUser);
+ my $groups = RT::Model::GroupCollection->new($CurrentUser);
$groups->LimitToUserDefinedGroups;
$groups->WithMember(
PrincipalId => $CurrentUser->Id,
@@ -281,8 +281,8 @@
my $level;
- if ( $object->isa('RT::User') ) { $level = 'Own' }
- elsif ( $object->isa('RT::Group') ) { $level = 'Group' }
+ if ( $object->isa('RT::Model::User') ) { $level = 'Own' }
+ elsif ( $object->isa('RT::Model::Group') ) { $level = 'Group' }
elsif ( $object->isa('RT::System') ) { $level = '' }
else {
Jifty->log->error("Unknown object $object from privacy $privacy");
@@ -291,7 +291,7 @@
# users are mildly special-cased, since we actually have to check that
# the user is operating on himself
- if ( $object->isa('RT::User') ) {
+ if ( $object->isa('RT::Model::User') ) {
return 0 unless $object->Id == $self->CurrentUser->Id;
}
@@ -299,7 +299,7 @@
|| join( '', $args{Right}, $level, 'Dashboard' );
# all rights, except group rights, are global
- $object = $RT::System unless $object->isa('RT::Group');
+ $object = $RT::System unless $object->isa('RT::Model::Group');
return $self->CurrentUser->HasRight(
Right => $right,
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Graph/Tickets.pm Tue Jul 15 09:23:21 2008
@@ -161,8 +161,8 @@
Links =>
[qw(MemberOf Members DependsOn DependedOnBy RefersTo ReferredToBy)],
);
- my $cfs = RT::CustomFields->new($user);
- $cfs->LimitToLookupType('RT::Queue-RT::Ticket');
+ my $cfs = RT::Model::CustomFieldCollection->new($user);
+ $cfs->LimitToLookupType('RT::Model::Queue-RT::Model::Ticket');
$cfs->OrderBy( FIELD => 'Name' );
my ( $first, %seen ) = (1);
while ( my $cf = $cfs->Next ) {
@@ -320,7 +320,7 @@
$args{'SeenEdge'} ||= {};
my $show_link_descriptions = $args{'show_link_descriptions'}
- && RT::Link->can('description');
+ && RT::Model::Link->can('description');
foreach my $type ( $args{'LeadingLink'}, @{ $args{'ShowLinks'} } ) {
my $links = $args{'Ticket'}->$type();
@@ -329,10 +329,10 @@
next if $args{'SeenEdge'}{ $link->id }++;
my $target = $link->TargetObj;
- next unless $target && $target->isa('RT::Ticket');
+ next unless $target && $target->isa('RT::Model::Ticket');
my $base = $link->BaseObj;
- next unless $base && $base->isa('RT::Ticket');
+ next unless $base && $base->isa('RT::Model::Ticket');
my $next = $target->id == $args{'Ticket'}->id ? $base : $target;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm Tue Jul 15 09:23:21 2008
@@ -332,7 +332,7 @@
my ( $rv, $msg );
if ( $self->content =~ m{^Content-type:\s+text/html\b}im ) {
- local $RT::Transaction::Preferredcontent_type = 'text/html';
+ local $RT::Model::Transaction::Preferredcontent_type = 'text/html';
( $rv, $msg ) = $self->_parse(@_);
}
else {
@@ -468,7 +468,7 @@
my $orig_entity = $self->mime_obj;
die 'hehe';
- local $RT::Transaction::Preferredcontent_type = 'text/plain';
+ local $RT::Model::Transaction::Preferredcontent_type = 'text/plain';
my ( $rv, $msg ) = $self->_parse(@_);
if ( !$rv ) {
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 Jul 15 09:23:21 2008
@@ -499,7 +499,7 @@
If $args{'type'} is set to C<text/html>, plain texts are upgraded to HTML.
Otherwise, HTML texts are downgraded to plain text. If $args{'type'} is
-missing, it defaults to the value of C<$RT::Transaction::Preferredcontent_type>,
+missing, it defaults to the value of C<$RT::Model::Transaction::Preferredcontent_type>,
if that's missing too, defaults to 'text/plain'.
=cut
Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/NotifyGroup.pm Tue Jul 15 09:23:21 2008
@@ -65,8 +65,8 @@
use warnings;
use base qw(RT::ScripAction::Notify);
-require RT::User;
-require RT::Group;
+require RT::Model::User;
+require RT::Model::Group;
=head1 METHODS
@@ -104,7 +104,7 @@
my $self = shift;
my $instance = shift;
- my $obj = RT::Principal->new($RT::SystemUser);
+ my $obj = RT::Principal->new(RT->system_user);
$obj->Load($instance);
unless ( $obj->id ) {
Jifty->log->error("Couldn't load principal #$instance");
@@ -163,10 +163,10 @@
my $obj;
next unless $r->{'Type'};
if ( lc $r->{'Type'} eq 'user' ) {
- $obj = RT::User->new($RT::SystemUser);
+ $obj = RT::Model::User->new(RT->system_user);
}
elsif ( lc $r->{'Type'} eq 'user' ) {
- $obj = RT::Group->new($RT::SystemUser);
+ $obj = RT::Model::Group->new(RT->system_user);
}
else {
next;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Search.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Search.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Search.pm Tue Jul 15 09:23:21 2008
@@ -53,7 +53,7 @@
=head1 SYNOPSIS
use RT::Search;
- my $tickets = RT::Tickets->new($CurrentUser);
+ my $tickets = RT::Model::TicketCollection->new($CurrentUser);
my $foo = RT::Search->new(argument => $arg,
tickets_obj => $tickets);
$foo->prepare();
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Test.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Test.pm Tue Jul 15 09:23:21 2008
@@ -278,11 +278,11 @@
sub store_rights {
my $self = shift;
- require RT::ACE;
+ require RT::Model::ACE;
# fake construction
- RT::ACE->new( current_user => RT->system_user );
- my @fields = keys %{ RT::ACE->_class_accessible };
+ RT::Model::ACE->new( current_user => RT->system_user );
+ my @fields = keys %{ RT::Model::ACE->_class_accessible };
require RT::ACL;
my $acl = RT::ACL->new( current_user => RT->system_user );
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards.in
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards.in (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-dashboards.in Tue Jul 15 09:23:21 2008
@@ -93,7 +93,7 @@
# Load the config file
RT::LoadConfig();
-# Connect to the database and get RT::SystemUser and RT::nobody loaded
+# Connect to the database and get RT->system_user and RT::nobody loaded
RT::Init();
$HTML::Mason::Commands::r = RT::Dashboard::FakeRequest->new;
@@ -126,7 +126,7 @@
debug "Sending email from [_1]", $from;
# look through each user for her subscriptions
-my $Users = RT::Users->new($RT::SystemUser);
+my $Users = RT::Model::UserCollection->new(RT->system_user);
$Users->LimitToPrivileged;
while (defined(my $user = $Users->Next)) {
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-digest.in Tue Jul 15 09:23:21 2008
@@ -160,7 +160,7 @@
# Load our template. If we cannot load the template, abort
# immediately rather than failing through many loops.
- my $digest_template = RT::Template->new( RT->SystemUser );
+ my $digest_template = RT::Model::Template->new( RT->SystemUser );
my ( $ret, $msg ) = $digest_template->Load('Email Digest');
unless ($ret) {
print loc("Failed to load template")
@@ -240,7 +240,7 @@
my $frequency = shift;
my $since_date = since_date($frequency);
- my $txns = RT::Transactions->new( RT->SystemUser );
+ my $txns = RT::Model::TransactionCollection->new( RT->SystemUser );
# First limit to recent transactions.
$txns->Limit(
@@ -253,7 +253,7 @@
$txns->Limit(
FIELD => 'ObjectType',
OPERATOR => '=',
- VALUE => 'RT::Ticket',
+ VALUE => 'RT::Model::Ticket',
ENTRYAGGREGATOR => 'AND'
);
my $all_digest = {};
@@ -281,7 +281,7 @@
# Has the user been disabled since a message was deferred on his/her
# behalf?
- my $user_obj = RT::User->new( RT->SystemUser );
+ my $user_obj = RT::Model::User->new( RT->SystemUser );
$user_obj->LoadByEmail($user);
if ( $user_obj->PrincipalObj->Disabled ) {
print STDERR loc("Skipping disabled user") . " $user\n";
@@ -294,7 +294,7 @@
$contents_body .= "Queue $queue:\n";
foreach my $ticket ( sort keys %{ $user_digest->{$queue} } ) {
my $tkt_txns = $user_digest->{$queue}->{$ticket};
- my $ticket_obj = RT::Ticket->new( RT->SystemUser );
+ my $ticket_obj = RT::Model::Ticket->new( RT->SystemUser );
$ticket_obj->Load($ticket);
# Spit out the index entry for this ticket.
@@ -310,12 +310,12 @@
foreach my $txn ( sort keys %$tkt_txns ) {
my $msg = $tkt_txns->{$txn};
- # $msg contains an RT::Attachment with our outgoing
+ # $msg contains an RT::Model::Attachment with our outgoing
# message. Print a few headers for clarity's sake.
$contents_body .= "From: " . $msg->GetHeader('From') . "\n";
my $date = $msg->GetHeader('Date ');
unless ($date) {
- my $txn_obj = RT::Transaction->new( RT->SystemUser );
+ my $txn_obj = RT::Model::Transaction->new( RT->SystemUser );
$txn_obj->Load($txn);
my $date_obj = RT::Date->new( RT->SystemUser );
$date_obj->Set(
Modified: rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in
==============================================================================
--- rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in (original)
+++ rt/branches/3.999-DANGEROUS/sbin/rt-email-group-admin.in Tue Jul 15 09:23:21 2008
@@ -116,8 +116,8 @@
RT::Init;
require RT::Principal;
-require RT::User;
-require RT::Group;
+require RT::Model::User;
+require RT::Model::Group;
require RT::ScripActions;
use Getopt::Long qw(GetOptions);
@@ -231,7 +231,7 @@
print "Members: \n";
foreach( @princ ) {
- my $obj = RT::Principal->new( $RT::SystemUser );
+ my $obj = RT::Principal->new( RT->system_user );
$obj->Load( $_ );
next unless $obj->id;
@@ -252,7 +252,7 @@
=cut
sub create {
- my $actions = RT::ScripActions->new( $RT::SystemUser );
+ my $actions = RT::ScripActions->new( RT->system_user );
$actions->Limit(
FIELD => 'Name',
VALUE => $opts->{'name'},
@@ -281,7 +281,7 @@
my $name = shift;
my $as_comment = shift || 0;
require RT::ScripAction;
- my $action = RT::ScripAction->new( $RT::SystemUser );
+ my $action = RT::ScripAction->new( RT->system_user );
$action->Create(
Name => $name,
description => "Created with rt-email-group-admin script",
@@ -301,8 +301,8 @@
sub __check_group
{
my $instance = shift;
- require RT::Group;
- my $obj = RT::Group->new( $RT::SystemUser );
+ require RT::Model::Group;
+ my $obj = RT::Model::Group->new( RT->system_user );
$obj->LoadUserDefinedGroup( $instance );
return $obj->id ? $obj : undef;
}
@@ -316,8 +316,8 @@
sub __check_user
{
my $instance = shift;
- require RT::User;
- my $obj = RT::User->new( $RT::SystemUser );
+ require RT::Model::User;
+ my $obj = RT::Model::User->new( RT->system_user );
$obj->Load( $instance );
return $obj->id ? $obj : undef;
}
@@ -377,8 +377,8 @@
exit(-1);
}
- require RT::Scrips;
- my $scrips = RT::Scrips->new( $RT::SystemUser );
+ require RT::Model::ScripCollection;
+ my $scrips = RT::Model::ScripCollection->new( RT->system_user );
$scrips->Limit( FIELD => 'ScripAction', VALUE => $action->id );
if ( $scrips->Count ) {
my @sid;
@@ -451,7 +451,7 @@
exit(-1);
}
- my $actions = RT::ScripActions->new( $RT::SystemUser );
+ my $actions = RT::ScripActions->new( RT->system_user );
$actions->Limit( FIELD => 'Name', VALUE => $opts->{'newname'} );
if ( $actions->Count ) {
print STDERR "ScripAction '". $opts->{'newname'} ."' allready exists\n";
@@ -501,9 +501,9 @@
my $obj;
next unless $r->{'Type'};
if ( lc $r->{'Type'} eq 'user' ) {
- $obj = RT::User->new( $RT::SystemUser );
+ $obj = RT::Model::User->new( RT->system_user );
} elsif ( lc $r->{'Type'} eq 'user' ) {
- $obj = RT::Group->new( $RT::SystemUser );
+ $obj = RT::Model::Group->new( RT->system_user );
} else {
next;
}
@@ -518,7 +518,7 @@
}
sub _get_our_actions {
- my $actions = RT::ScripActions->new( $RT::SystemUser );
+ my $actions = RT::ScripActions->new( RT->system_user );
$actions->Limit(
FIELD => 'ExecModule',
VALUE => 'NotifyGroup',
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/EditScrips Tue Jul 15 09:23:21 2008
@@ -100,7 +100,7 @@
# {{{ deal with modifying and deleting existing scrips
# we still support DeleteScrip-id format but array is preferred
foreach my $id ( grep $_, @DeleteScrip, map /^DeleteScrip-(\d+)/, keys %ARGS ) {
- my $scrip = RT::Scrip->new;
+ my $scrip = RT::Model::Scrip->new;
$scrip->load( $id );
my ($retval, $msg) = $scrip->delete;
if ($retval) {
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Elements/ListGlobalScrips Tue Jul 15 09:23:21 2008
@@ -65,6 +65,6 @@
.q{,'<a href="__WebPath__/Admin/Global/Scrip.html?id=__id__&Queue=0">__Autodescription__</a>/TITLE:Condition, Action and Template'}
.q{__NEWLINE__,'','<small>__description__</small>'};
-my $Scrips = RT::Scrips->new;
+my $Scrips = RT::Model::ScripCollection->new;
$Scrips->limit_toGlobal;
</%init>
Modified: rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Admin/Global/CustomFields/Queues.html Tue Jul 15 09:23:21 2008
@@ -51,8 +51,8 @@
current_subtab => "Admin/Global/CustomFields/Queues.html",
Title => $title
&>
- <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Queue', Object=> $object &>
+ <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Model::Queue', Object=> $object &>
<%INIT>
my $title = loc( 'Edit Custom Fields for all queues');
- my $object = RT::Queue->new($session{'CurrentUser'});
+ my $object = RT::Model::Queue->new($session{'CurrentUser'});
</%INIT>
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/DashboardsForObject
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/DashboardsForObject (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/DashboardsForObject Tue Jul 15 09:23:21 2008
@@ -68,10 +68,10 @@
if ($Object->isa('RT::System')) {
push @{ $dashboards{system} }, $dashboard;
}
- elsif ($Object->isa('RT::User')) {
+ elsif ($Object->isa('RT::Model::User')) {
push @{ $dashboards{personal} }, $dashboard;
}
- elsif ($Object->isa('RT::Group')) {
+ elsif ($Object->isa('RT::Model::Group')) {
push @{ $dashboards{group}{$Object->Name} }, $dashboard;
}
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/SelectPrivacy
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/SelectPrivacy (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Dashboards/Elements/SelectPrivacy Tue Jul 15 09:23:21 2008
@@ -55,7 +55,7 @@
% my $privacy = ref($object) . '-' . $object->id;
% my $selected = $privacy eq ($Default || '') ? 'selected="selected"' : '';
-% if (ref($object) eq 'RT::User' && $object->id == $session{'CurrentUser'}->Id) {
+% if (ref($object) eq 'RT::Model::User' && $object->id == $session{'CurrentUser'}->Id) {
<option <%$selected|n%> value="<%$privacy%>"><&|/l&>My dashboards</&></option>
% } else {
<option <%$selected|n%> value="<%$privacy%>"><&|/l, $object->Name&>[_1]'s dashboards</&></option>
Modified: rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Elements/ShowLinks Tue Jul 15 09:23:21 2008
@@ -141,8 +141,8 @@
for my $relation (
qw(RefersTo ReferredToBy)) {
- my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode};
- my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{type};
+ my $mode = $RT::Model::Ticket::LINKTYPEMAP{$relation}->{Mode};
+ my $type = $RT::Model::Ticket::LINKTYPEMAP{$relation}->{type};
my $other = "Local" . $mode;
my $field = $mode eq 'base' ? 'new-' . $type : $type . '-new';
$clone->{$field}
@@ -153,8 +153,8 @@
}
for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
- my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode};
- my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{type};
+ my $mode = $RT::Model::Ticket::LINKTYPEMAP{$relation}->{Mode};
+ my $type = $RT::Model::Ticket::LINKTYPEMAP{$relation}->{type};
my $field = $mode eq 'base' ? 'new-' . $type : $type . '-new';
$clone->{$field} = $path . "&$field=". $Ticket->id ;
}
Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html Tue Jul 15 09:23:21 2008
@@ -79,7 +79,7 @@
RT->InitClasses();
RT->InitPlugins();
- my $root = RT::User->new( $RT::SystemUser );
+ my $root = RT::Model::User->new( RT->system_user );
$root->Load('root');
$root->SetPassword( $RT::Installer->{InstallConfig}{Password} );
Modified: rt/branches/3.999-DANGEROUS/share/html/NoAuth/iCal/dhandler
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/NoAuth/iCal/dhandler (original)
+++ rt/branches/3.999-DANGEROUS/share/html/NoAuth/iCal/dhandler Tue Jul 15 09:23:21 2008
@@ -65,7 +65,7 @@
# convert to perl strings
$_ = Encode::decode_utf8( $_ ) for $name, $search;
-my $user = RT::User->new( $RT::SystemUser );
+my $user = RT::Model::User->new( RT->system_user );
$user->Load( $name );
$notfound->() unless $user->id;
@@ -73,7 +73,7 @@
my $cu = RT::CurrentUser->new;
$cu->Load($user);
-my $tickets = RT::Tickets->new( $cu );
+my $tickets = RT::Model::TicketCollection->new( $cu );
$tickets->FromSQL($search);
$r->header_out("Content-Type" => "text/calendar; charset=utf-8");
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Forward.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Forward.html (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Forward.html Tue Jul 15 09:23:21 2008
@@ -85,7 +85,7 @@
abort( _("Permission Denied") )
unless $ticket_obj->current_user_has_right('ForwardMessage');
-my $txn = RT::Transaction->new();
+my $txn = RT::Model::Transaction->new();
$txn->load( $QuoteTransaction );
abort( _("Couldn't load transaction #%1", $QuoteTransaction) )
unless $txn->id;
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/EditGraphProperties Tue Jul 15 09:23:21 2008
@@ -95,7 +95,7 @@
% } }
</select><br />
-% if ( RT::Link->can('description' ) ) {
+% if ( RT::Model::Link->can('description' ) ) {
% my $checked = '';
% $checked = 'checked="checked"' if $show_link_descriptions;
Show link descriptions:
@@ -133,7 +133,7 @@
</%ARGS>
<%INIT>
require RT::Graph::Tickets;
-require RT::Link;
+require RT::Model::Link;
my @link_types = qw(Members MemberOf RefersTo ReferredToBy DependsOn DependedOnBy);
@ShowLinks = grep $_ ne $LeadingLink, @ShowLinks;
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowGraph
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowGraph (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/Elements/ShowGraph Tue Jul 15 09:23:21 2008
@@ -55,7 +55,7 @@
<%INIT>
use RT::Util 'safe_run_child';
-my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
+my $ticket = RT::Model::Ticket->new( $session{'CurrentUser'} );
$ticket->Load( $id );
unless ( $ticket->id ) {
Jifty->log->error("Couldn't load ticket $id");
Modified: rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/dhandler
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/dhandler (original)
+++ rt/branches/3.999-DANGEROUS/share/html/Ticket/Graphs/dhandler Tue Jul 15 09:23:21 2008
@@ -55,7 +55,7 @@
return $m->abort( 404 );
}
-my $ticket = RT::Ticket->new($session{'CurrentUser'} );
+my $ticket = RT::Model::Ticket->new($session{'CurrentUser'} );
$ticket->Load( $id );
unless ( $ticket->id ) {
Jifty->log->error("Couldn't load ticket #$id");
More information about the Rt-commit
mailing list