[Rt-commit] rt branch, 3.9-trunk, created. rt-3.8.8-89-g708a2ba

Alex Vandiver alexmv at bestpractical.com
Thu Jun 17 13:51:59 EDT 2010


The branch, 3.9-trunk has been created
        at  708a2ba21ea744bbb16c66cd7ff05664e8e97d0f (commit)

- Log -----------------------------------------------------------------
commit 560496d09896031f81b8adfed503cae1a8e46254
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jun 15 14:15:58 2010 -0400

    Only set testfile output once per process

diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index fc1a721..f618c40 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -394,8 +394,9 @@ sub SendEmail {
 
     my $mail_command = RT->Config->Get('MailCommand');
 
-    if ($mail_command eq 'testfile') {
+    if ($mail_command eq 'testfile' and not $Mail::Mailer::testfile::config{outfile}) {
         $Mail::Mailer::testfile::config{outfile} = File::Temp->new;
+        $RT::Logger->info("Storing outgoing emails in $Mail::Mailer::testfile::config{outfile}");
     }
 
     # if it is a sub routine, we just return it;

commit 6b77b01478329bbcde19da30c3d68f605a79cbd6
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jun 15 16:44:50 2010 -0400

    Add 2 callbacks to autohandler: Session and Final
    
    Session lets extensions hook into the autohandler before any auth or
    page display (including NoAuth) happens.
    
    Final lets extensions get the last word in or cleanup after all
    rendering before RT's done handling the request.

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index d6b854f..50f0650 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -192,6 +192,9 @@ sub HandleRequest {
     SendSessionCookie();
     $HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new() unless _UserLoggedIn();
 
+    # Process session-related callbacks before any auth attempts
+    $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Session', CallbackPage => '/autohandler' );
+
     MaybeShowNoAuthPage($ARGS);
 
     AttemptExternalAuth($ARGS) if RT->Config->Get('WebExternalAuthContinuous') or not _UserLoggedIn();
@@ -223,6 +226,9 @@ sub HandleRequest {
 
     ShowRequestedPage($ARGS);
     LogRecordedSQLStatements();
+
+    # Process per-page final cleanup callbacks
+    $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Final', CallbackPage => '/autohandler' );
 }
 
 sub _ForceLogout {

commit 412283194b60498a64972f3dc4a789daac8dc6c5
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Jun 16 10:05:17 2010 -0400

    Document the "testfile" option for $MailCommand

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 57470d2..109f1fb 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -375,6 +375,11 @@ or 'qmail'.
 Note that you should remove the '-t' from C<$SendmailArguments>
 if you use 'sendmail' rather than 'sendmailpipe'
 
+For testing purposes, or to simply disable sending mail out into the world, you
+can set C<$MailCommand> to 'testfile' which writes all mail to a temporary
+file.  RT will log the location of the temporary file so you can extract mail
+from it afterwards.
+
 =cut
 
 Set($MailCommand , 'sendmailpipe');

commit 708a2ba21ea744bbb16c66cd7ff05664e8e97d0f
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jun 16 20:15:50 2010 -0400

    Callback for changing the default queue in SelectNewTicketQueue

diff --git a/share/html/Elements/SelectNewTicketQueue b/share/html/Elements/SelectNewTicketQueue
index d7d406e..403b1f6 100755
--- a/share/html/Elements/SelectNewTicketQueue
+++ b/share/html/Elements/SelectNewTicketQueue
@@ -46,5 +46,9 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <label accesskey="9">
-  <& /Elements/SelectQueue, Name => 'Queue', Default => RT->Config->Get("DefaultQueue", $session{'CurrentUser'}), %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
+  <& /Elements/SelectQueue, Name => 'Queue', Default => $queue, %ARGS, ShowNullOption => 0, ShowAllQueues => 0 &>
 </label>
+<%INIT>
+my $queue = RT->Config->Get("DefaultQueue", $session{'CurrentUser'});
+$m->callback(Queue => \$queue, CallbackName => 'DefaultQueue');
+</%INIT>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list