[Rt-commit] r11448 - in rtfm/branches/2.3-EXPERIMENTAL: .
falcone at bestpractical.com
falcone at bestpractical.com
Thu Apr 3 17:37:34 EDT 2008
Author: falcone
Date: Thu Apr 3 17:37:32 2008
New Revision: 11448
Modified:
rtfm/branches/2.3-EXPERIMENTAL/ (props changed)
rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/BeforeMessageBox
Log:
r30915 at ketch: falcone | 2008-04-03 17:36:06 -0400
* use shared BeforeMessageBox code
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/BeforeMessageBox
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/BeforeMessageBox (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/RTFM/Elements/BeforeMessageBox Thu Apr 3 17:37:32 2008
@@ -193,14 +193,18 @@
$articles = RT::FM::ArticleCollection->new( $session{CurrentUser} );
$topics = [];
-my $ticket = RT::Ticket->new( $session{CurrentUser} );
-$ticket->Load( $ARGS{id} );
+my $QueueObj = $ARGS{QueueObj};
+if ( $ARGS{id} && $ARGS{id} ne 'new' && !$QueueObj ) {
+ my $ticket = RT::Ticket->new( $session{CurrentUser} );
+ $ticket->Load( $ARGS{id} );
+ $QueueObj = $ticket->QueueObj;
+}
my $top_topic = RT::FM::Topic->new( $session{CurrentUser} );
$top_topic->LoadByCols( Name => 'Queues', Parent => 0 , ObjectType => 'RT::FM::System', ObjectId => 1);
if ( $top_topic->id ) {
my $queue_topic = RT::FM::Topic->new( $session{CurrentUser} );
- $queue_topic->LoadByCols( Name => $ticket->QueueObj->Name, Parent =>
+ $queue_topic->LoadByCols( Name => $QueueObj->Name, Parent =>
$top_topic->id );
if ( $queue_topic->id ) {
More information about the Rt-commit
mailing list