[Rt-commit] r6997 - in rt/branches/3.7-EXPERIMENTAL: . html/Admin/Global html/Admin/Tools/Shredder html/Admin/Tools/Shredder/Elements/Object html/Admin/Users html/Elements html/Search html/SelfService html/SelfService/Elements html/Ticket/Elements lib/RT lib/RT/Action lib/RT/Interface lib/RT/Shredder lib/t/regression/shredder sbin

ruz at bestpractical.com ruz at bestpractical.com
Tue Feb 13 09:50:42 EST 2007


Author: ruz
Date: Tue Feb 13 09:50:41 2007
New Revision: 6997

Added:
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02queue.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02template.t
Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/configure.ac
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Global/MyRT.html
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--User
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/index.html
   rt/branches/3.7-EXPERIMENTAL/html/Admin/Users/MyRT.html
   rt/branches/3.7-EXPERIMENTAL/html/Elements/Header
   rt/branches/3.7-EXPERIMENTAL/html/Elements/Logo
   rt/branches/3.7-EXPERIMENTAL/html/Search/Simple.html
   rt/branches/3.7-EXPERIMENTAL/html/SelfService/Closed.html
   rt/branches/3.7-EXPERIMENTAL/html/SelfService/Display.html
   rt/branches/3.7-EXPERIMENTAL/html/SelfService/Elements/MyRequests
   rt/branches/3.7-EXPERIMENTAL/html/SelfService/index.html
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments
   rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Attributes_Overlay.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Users.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Queue.pm
   rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Template.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/sbin/rt-setup-database.in
   rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in

Log:
* sync things from 3.7-RTIR-2.2 into 3.7


 r4508 at cubic-pc (orig r6890):  ruz | 2007-02-03 00:20:08 +0300
  r4494 at cubic-pc (orig r6868):  kevinr | 2007-02-02 03:35:48 +0300
   r18261 at sad-girl-in-snow:  kevinr | 2007-02-01 19:29:44 -0500
   * Put the search navigation in the right submenu.  Thanks to Dirk Pape 
     for the patch.
  
 
 r4509 at cubic-pc (orig r6891):  ruz | 2007-02-03 00:20:19 +0300
  r4495 at cubic-pc (orig r6869):  kevinr | 2007-02-02 03:36:56 +0300
   r18262 at sad-girl-in-snow:  kevinr | 2007-02-01 19:34:35 -0500
   RT-Ticket: 8159
   RT-Status: resolved
   RT-Update: respond
   
   Use Watcher instead for better performance.  Thanks to Dirk Pape for the catch.
  
 
 r4510 at cubic-pc (orig r6892):  ruz | 2007-02-03 00:20:49 +0300
  r4496 at cubic-pc (orig r6870):  ruz | 2007-02-02 05:51:36 +0300
  * typo
 
 r4511 at cubic-pc (orig r6893):  ruz | 2007-02-03 00:20:59 +0300
  r4497 at cubic-pc (orig r6871):  ruz | 2007-02-02 05:54:28 +0300
  * Test::Inline is only dev dependancy
 
 r4512 at cubic-pc (orig r6894):  ruz | 2007-02-03 00:21:15 +0300
  r4498 at cubic-pc (orig r6872):  ruz | 2007-02-02 05:55:19 +0300
  * Term::ReadKey is used in CLI only
 
 r4513 at cubic-pc (orig r6895):  ruz | 2007-02-03 00:21:27 +0300
  r4499 at cubic-pc (orig r6873):  ruz | 2007-02-02 05:55:59 +0300
  * we don't use this module
 
 r4514 at cubic-pc (orig r6897):  ruz | 2007-02-03 00:30:19 +0300
  r4500 at cubic-pc (orig r6874):  ruz | 2007-02-02 05:57:03 +0300
  * Regexp::Common is required by core(QB/TicketSQL)
 
 r4515 at cubic-pc (orig r6898):  ruz | 2007-02-03 00:31:32 +0300
  r4501 at cubic-pc (orig r6875):  ruz | 2007-02-02 05:59:03 +0300
  * add --with-standalone option
  * as well fill defaults for dev mode and standalone within a configure script
 
 r4516 at cubic-pc (orig r6899):  ruz | 2007-02-03 00:31:43 +0300
  r4502 at cubic-pc (orig r6876):  ruz | 2007-02-02 06:00:20 +0300
  * add --with-standalone option to configure script
 
 r4517 at cubic-pc (orig r6900):  ruz | 2007-02-03 00:31:55 +0300
  r4503 at cubic-pc (orig r6877):  ruz | 2007-02-02 06:04:49 +0300
  * update CLI deps
 
 r4518 at cubic-pc (orig r6901):  ruz | 2007-02-03 00:32:12 +0300
  r4504 at cubic-pc (orig r6878):  ruz | 2007-02-02 06:07:26 +0300
  * update mailgate's deps
 
 r4519 at cubic-pc (orig r6902):  ruz | 2007-02-03 00:32:22 +0300
  r4505 at cubic-pc (orig r6879):  ruz | 2007-02-02 06:11:18 +0300
  * we don't use FreezeThaw module for a long time
 
 r4520 at cubic-pc (orig r6903):  ruz | 2007-02-03 00:35:26 +0300
  r4506 at cubic-pc (orig r6880):  ruz | 2007-02-02 06:28:09 +0300
  * actually skip sections user didn't request
 
 r4521 at cubic-pc (orig r6904):  ruz | 2007-02-03 00:35:35 +0300
  r4507 at cubic-pc (orig r6881):  ruz | 2007-02-02 06:43:12 +0300
  * make defaults actually defaults
 
 r4522 at cubic-pc (orig r6905):  ruz | 2007-02-03 00:38:19 +0300
 * drop debug
 r4523 at cubic-pc (orig r6906):  ruz | 2007-02-03 01:01:58 +0300
 * convert to new config style
 r4524 at cubic-pc (orig r6907):  ruz | 2007-02-03 01:14:34 +0300
 * switch to new config style
 r4525 at cubic-pc (orig r6908):  ruz | 2007-02-03 01:27:02 +0300
 * fix typo
 r4526 at cubic-pc (orig r6909):  ruz | 2007-02-03 04:31:40 +0300
 * report perl version as 'perldoc perlvar' suggests
 r4527 at cubic-pc (orig r6910):  ruz | 2007-02-03 04:38:24 +0300
 * add a =cut in the end of file, so magic '1;' would be a code
 r4528 at cubic-pc (orig r6911):  ruz | 2007-02-03 04:44:06 +0300
 * MySQL 4.0 reports TYPE instead of ENGINE
 r4529 at cubic-pc (orig r6912):  ruz | 2007-02-03 04:57:46 +0300
 * we don't need Date::Format anymore as new RT::Date replaces it quite well
 r4530 at cubic-pc (orig r6915):  ruz | 2007-02-03 06:27:16 +0300
 * delete scrips with templates
 r4531 at cubic-pc (orig r6916):  ruz | 2007-02-03 06:28:59 +0300
 * add tests for shredding templates
 r4532 at cubic-pc (orig r6917):  ruz | 2007-02-03 06:44:29 +0300
 * fix queue shredding, delete scrips as well
 r4533 at cubic-pc (orig r6918):  ruz | 2007-02-03 07:14:39 +0300
 * add tests for queues' shredding
 r4542 at cubic-pc (orig r6982):  ruz | 2007-02-13 16:39:44 +0300
 * use config to get rtname var
 r4543 at cubic-pc (orig r6983):  ruz | 2007-02-13 16:41:21 +0300
 * use config module in shredder
 r4544 at cubic-pc (orig r6984):  ruz | 2007-02-13 16:42:07 +0300
 * use config ,odule to get var's value
 r4545 at cubic-pc (orig r6985):  ruz | 2007-02-13 16:42:53 +0300
 * again config's thing
 r4546 at cubic-pc (orig r6986):  ruz | 2007-02-13 16:44:20 +0300
 * add $Name arg to logo element
 * rename show_name into ShowName
 r4547 at cubic-pc (orig r6987):  ruz | 2007-02-13 16:45:26 +0300
 * pass through arguments to Logo from Header
 r4548 at cubic-pc (orig r6989):  ruz | 2007-02-13 17:37:04 +0300
  r4534 at cubic-pc (orig r6919):  ruz | 2007-02-04 01:30:24 +0300
  * don't push transactions into batch unless CommitScrips is true,
    this fixes a bug: users click Reply button and we fire a correspond
    scrip that is in the batch stage
 
 r4549 at cubic-pc (orig r6990):  ruz | 2007-02-13 17:37:21 +0300
  r4535 at cubic-pc (orig r6920):  kevinr | 2007-02-05 03:09:35 +0300
   r18330 at sad-girl-in-snow:  kevinr | 2007-02-04 19:08:22 -0500
   RT-Ticket: 8169
   RT-Status: open
   RT-Update: comment
   
   Added a missing </div> to the Simple Search page.  Thanks to Arran Cudbard-Bell
   for the catch.
   
  
 
 r4550 at cubic-pc (orig r6991):  ruz | 2007-02-13 17:37:58 +0300
  r4536 at cubic-pc (orig r6947):  ruz | 2007-02-07 01:41:59 +0300
  * delete we don't use from dependencies, I've checked that Mason 1.23 depends
    on this modules and versions it requires are equal or greater than we had
    
 
 r4551 at cubic-pc (orig r6992):  ruz | 2007-02-13 17:38:08 +0300
  r4537 at cubic-pc (orig r6948):  ruz | 2007-02-07 02:27:46 +0300
  * backport from 3.7: convert 'sub _' to 'sub text_to_hash'
 
 r4552 at cubic-pc (orig r6993):  ruz | 2007-02-13 17:38:28 +0300
  r4538 at cubic-pc (orig r6964):  ruz | 2007-02-08 04:20:57 +0300
  * we don't depend on MLDBM anymore and I don't recall we did.
 
 r4553 at cubic-pc (orig r6994):  ruz | 2007-02-13 17:43:45 +0300
  r4539 at cubic-pc (orig r6965):  ruz | 2007-02-08 04:45:29 +0300
  * we depend on perl 5.8 so we don't need Encode::compat at all
 
 r4554 at cubic-pc (orig r6995):  ruz | 2007-02-13 17:44:04 +0300
  r4540 at cubic-pc (orig r6966):  ruz | 2007-02-08 06:45:12 +0300
  * typo
 
 r4555 at cubic-pc (orig r6996):  ruz | 2007-02-13 17:45:47 +0300
  r4541 at cubic-pc (orig r6981):  ruz | 2007-02-10 07:52:57 +0300
  * oops, we use ISA later
 


Modified: rt/branches/3.7-EXPERIMENTAL/configure.ac
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/configure.ac	(original)
+++ rt/branches/3.7-EXPERIMENTAL/configure.ac	Tue Feb 13 09:50:41 2007
@@ -249,6 +249,15 @@
             APACHECTL=`which apachectl`)
 AC_SUBST(APACHECTL)
 
+dnl RT's standalone pure perl server
+AC_ARG_WITH(devel-mode,
+            AC_HELP_STRING([--with-standalone],
+                           [Install modules for pure perl standalone server]),
+
+            RT_STANDALONE="1",
+            RT_STANDALONE="0")
+AC_SUBST(RT_STANDALONE)
+
 dnl RT's "maintainer mode"
 AC_ARG_WITH(devel-mode,
             AC_HELP_STRING([--with-devel-mode],

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Global/MyRT.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Global/MyRT.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Global/MyRT.html	Tue Feb 13 09:50:41 2007
@@ -16,7 +16,7 @@
 <%init>
 my @actions;
 
-my @items = map { [ "component-$_", $_ ] } sort @{$RT::HomepageComponents};
+my @items = map { [ "component-$_", $_ ] } sort RT->Config->Get('HomepageComponents');
 my $sys = RT::System->new( $session{'CurrentUser'} );
 # XXX: put this in savedsearches_to_portlet_items
 for ( $m->comp( "/Search/Elements/SearchesForObject",

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Attachment	Tue Feb 13 09:50:41 2007
@@ -1,6 +1,6 @@
 <%ARGS>
 $Object => undef
 </%ARGS>
-<a href="<% $RT::WebBaseURL %>/Ticket/Attachment/<% $Object->TransactionId %>/<% $Object->id %>/">
+<a href="<% RT->Config->Get('WebBaseURL') %>/Ticket/Attachment/<% $Object->TransactionId %>/<% $Object->id %>/">
 Attachment(id:<% $Object->id %>, FileName: <% $Object->Filename || '(no value)' %>)
 </a>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--Ticket	Tue Feb 13 09:50:41 2007
@@ -1,6 +1,6 @@
 <%ARGS>
 $Object => undef
 </%ARGS>
-<a href="<% $RT::WebBaseURL %>/Ticket/Display.html?id=<% $Object->id %>">
+<a href="<% RT->Config->Get('WebBaseURL') %>/Ticket/Display.html?id=<% $Object->id %>">
 Ticket(id:<% $Object->id %>, Subject: <% substr($Object->Subject, 0, 30) %>...)
 </a>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--User
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--User	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/Elements/Object/RT--User	Tue Feb 13 09:50:41 2007
@@ -1,6 +1,6 @@
 <%ARGS>
 $Object => undef
 </%ARGS>
-<a href="<% $RT::WebBaseURL %>/Admin/Users/Modify.html?id=<% $Object->id %>">
+<a href="<% RT->Config->Get('WebBaseURL') %>/Admin/Users/Modify.html?id=<% $Object->id %>">
 User(id:<% $Object->id %>, Name: <% $Object->Name %>)
 </a>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/index.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/index.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Tools/Shredder/index.html	Tue Feb 13 09:50:41 2007
@@ -10,7 +10,7 @@
 	current_subtab => 'Admin/Tools/Shredder',
 	Title => $title,
 &>
-<form id="shredder-search-form" action="<% $RT::WebPath %>/Admin/Tools/Shredder/" method="GET">
+<form id="shredder-search-form" action="<% RT->Config->Get('WebPath') %>/Admin/Tools/Shredder/" method="GET">
 <div id="shredder-select-plugin">
 <& /Elements/ListActions, actions => $messages{'Errors'} &>
 <& /Elements/ListActions, actions => $messages{'Success'} &>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Admin/Users/MyRT.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Admin/Users/MyRT.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Admin/Users/MyRT.html	Tue Feb 13 09:50:41 2007
@@ -36,7 +36,7 @@
 my ($default_portlets) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
 my $portlets  = $UserObj->Preferences('HomepageSettings', $default_portlets ? $default_portlets->Content  : {});
 
-my %allowed_components = map {$_ => 1} @{$RT::HomepageComponents};
+my %allowed_components = map {$_ => 1} RT->Config->Get('HomepageComponents');
 my @items;
 
 push @items, map {["component-$_", $_]} sort keys %allowed_components;

Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/Header
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/Header	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/Header	Tue Feb 13 09:50:41 2007
@@ -82,7 +82,7 @@
   <body<% $id && qq[ id="comp-$id"] |n %>>
 
 % if ($ShowBar) {
-<& /Elements/Logo &>
+<& /Elements/Logo, %ARGS &>
 
 <div id="quickbar">
   <div id="quick-personal">

Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/Logo
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/Logo	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/Logo	Tue Feb 13 09:50:41 2007
@@ -48,10 +48,17 @@
     src="<%RT->Config->Get('WebImagesURL')%>/bplogo.gif"
     alt="<% loc("Best Practical Solutions, LLC corporate logo") %>"
     width="177" height="33" /></a>
-% if ( $show_name ) {
-    <span class="rtname"><% loc("RT for [_1]", RT->Config->Get('rtname')) %></span>
+% if ( $ShowName ) {
+    <span class="rtname"><% $Name || loc("RT for [_1]", RT->Config->Get('rtname')) %></span>
 % }
 </div>
+<%INIT>
+if ( exists $ARGS{'show_name'} ) {
+    $RT::Logger->warn('show_name argument was renamed, use ShowName');
+    $ShowName = delete $ARGS{'show_name'};
+}
+</%INIT>
 <%ARGS>
-$show_name => 1
+$ShowName => 1
+$Name => undef
 </%ARGS>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Search/Simple.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Search/Simple.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Search/Simple.html	Tue Feb 13 09:50:41 2007
@@ -62,6 +62,7 @@
 <div align="center">
 <input name="q" size="60" /><input type="submit" class="button" value="<&|/l&>Search</&>" />
 </div>
+</div>
 
 <%INIT>
 my $title = loc("Search for tickets");

Modified: rt/branches/3.7-EXPERIMENTAL/html/SelfService/Closed.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/SelfService/Closed.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/SelfService/Closed.html	Tue Feb 13 09:50:41 2007
@@ -45,10 +45,12 @@
 %# END BPS TAGGED BLOCK }}}
 <& /SelfService/Elements/Header, Title => loc('Closed tickets') &>
 
-<& /SelfService/Elements/MyRequests, status          => ['rejected', 'resolved'], 
-                                     friendly_status => loc('closed'), 
-				     BaseURL         => $RT::WebPath . "/SelfService/Closed.html?", 
-				     Page            => $Page &>
+<& /SelfService/Elements/MyRequests,
+    status          => ['rejected', 'resolved'],
+    friendly_status => loc('closed'), 
+	BaseURL         => RT->Config->Get('WebPath') ."/SelfService/Closed.html?",
+	Page            => $Page,
+&>
 <%ARGS>
 $Page => 1
 </%ARGS>

Modified: rt/branches/3.7-EXPERIMENTAL/html/SelfService/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/SelfService/Display.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/SelfService/Display.html	Tue Feb 13 09:50:41 2007
@@ -204,8 +204,9 @@
         # resubmission on refresh.
         # But we need to store Actions somewhere too, so we don't lose them.
         $session{"Actions"} = \@results;
-        RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id="
-                                     . $Ticket->id);
+        RT::Interface::Web::Redirect(
+            RT->Config->Get('WebURL') ."SelfService/Display.html?id=". $Ticket->id
+        );
     } else {
         @results = @{ delete $session{"Actions"} || [] };
     }

Modified: rt/branches/3.7-EXPERIMENTAL/html/SelfService/Elements/MyRequests
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/SelfService/Elements/MyRequests	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/SelfService/Elements/MyRequests	Tue Feb 13 09:50:41 2007
@@ -75,7 +75,7 @@
 <%ARGS>
 $friendly_status => loc('open')
 $title => loc("My [_1] tickets", $friendly_status)
- at roles => ('Requestor', 'Cc', 'AdminCc')
+ at roles => ('Watcher')
 @status => ('open', 'new', 'stalled')
 $BaseURL => undef
 $Page => 1

Modified: rt/branches/3.7-EXPERIMENTAL/html/SelfService/index.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/SelfService/index.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/SelfService/index.html	Tue Feb 13 09:50:41 2007
@@ -44,9 +44,11 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <& /SelfService/Elements/Header, Title => loc('Open Tickets') &>
+<& /SelfService/Elements/MyRequests,
+    BaseURL => RT->Config->Get('WebPath') ."/SelfService/?",
+	Page    => $Page,
+&>
 
-<& /SelfService/Elements/MyRequests, BaseURL => $RT::WebPath . "/SelfService/?", 
-				     Page    => $Page &>
 <%ARGS>
 $Page => 1
 </%ARGS>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/LoadTextAttachments	Tue Feb 13 09:50:41 2007
@@ -80,9 +80,8 @@
     $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text/plain');
     $attachments->Limit ( FIELD => 'ContentType', OPERATOR => 'STARTSWITH', VALUE => 'message/');
     $attachments->Limit ( FIELD => 'ContentType', OPERATOR => '=', VALUE => 'text');
-    if ($RT::SuppressInlineTextFiles) {
-        $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL');
-    }
+    $attachments->Limit ( FIELD => 'Filename', OPERATOR => 'IS', VALUE => 'NULL')
+        if RT->Config->Get('SuppressInlineTextFiles');
 }
 return ($attachments);
 </%INIT>

Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs	Tue Feb 13 09:50:41 2007
@@ -219,8 +219,7 @@
 if ($args) {
   $tabs->{"i"} = { path      => "Search/Results.html$args",
                    title     => loc('Show Results'),
-                   separator => 1,
-                   subtabs   => $searchtabs };
+                   };
   if ($current_tab =~  "Search/Results.html") {
     $current_tab = "Search/Results.html$args";
   }
@@ -230,6 +229,9 @@
   if ($current_tab =~  "Search/Bulk.html") {
     $current_tab = "Search/Bulk.html$args";
   }
+  foreach my $searchtab (keys %{$searchtabs}) {
+    ($searchtab =~ /^_/) ? $tabs->{"s".$searchtab} = $searchtabs->{$searchtab} : $tabs->{"z_".$searchtab} = $searchtabs->{$searchtab};
+  }
 }
 
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Action/SendEmail.pm	Tue Feb 13 09:50:41 2007
@@ -701,7 +701,7 @@
     $sub =~ s/(\r\n|\n|\s)/ /gi;
     chomp $sub;
     $self->TemplateObj->MIMEObj->head->replace(
-        Subject => "[$RT::rtname #$id] $sub",
+        Subject => "[". RT->Config->Get('rtname') ." #$id] $sub",
     );
 }
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Attributes_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Attributes_Overlay.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Attributes_Overlay.pm	Tue Feb 13 09:50:41 2007
@@ -50,7 +50,7 @@
 
 =head1 SYNOPSIS
 
-  use RT:Attributes;
+  use RT::Attributes;
 my $Attributes = new RT::Attributes($CurrentUser);
 
 =head1 DESCRIPTION

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/I18N.pm	Tue Feb 13 09:50:41 2007
@@ -53,23 +53,19 @@
 package RT::I18N;
 
 use strict;
+use warnings;
+
 use Locale::Maketext 1.04;
 use Locale::Maketext::Lexicon 0.25;
 use base ('Locale::Maketext::Fuzzy');
-use vars qw( %Lexicon );
 
-#If we're running on 5.6, we desperately need Encode::compat. But if we're on 5.8, we don't really need it.
-BEGIN { if ($] < 5.007001) {
-require Encode::compat;
-} }
 use Encode;
-
 use MIME::Entity;
 use MIME::Head;
 
 # I decree that this project's first language is English.
 
-%Lexicon = (
+our %Lexicon = (
    'TEST_STRING' => 'Concrete Mixer',
 
     '__Content-Type' => 'text/plain; charset=utf-8',

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email.pm	Tue Feb 13 09:50:41 2007
@@ -956,7 +956,7 @@
 
     # Notify the RT Admin of the failure.
     MailError(
-        To          => $RT::OwnerEmail,
+        To          => scalar RT->Config->Get('OwnerEmail'),
         Subject     => "Could not load a valid user",
         Explanation => <<EOT,
 RT could not load a valid user, and RT's configuration does not allow

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	Tue Feb 13 09:50:41 2007
@@ -176,7 +176,7 @@
     my $redir_to = shift;
     untie $HTML::Mason::Commands::session;
     my $uri = URI->new($redir_to);
-    my $server_uri = URI->new($RT::WebURL);
+    my $server_uri = URI->new( RT->Config->Get('WebURL') );
 
     # If the user is coming in via a non-canonical
     # hostname, don't redirect them to the canonical host,

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	Tue Feb 13 09:50:41 2007
@@ -2,7 +2,7 @@
 # 
 # COPYRIGHT:
 #  
-# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+# This software is Copyright (c) 1996-2006 Best Practical Solutions, LLC 
 #                                          <jesse at bestpractical.com>
 # 
 # (Except where explicitly superseded by other copyright notices)
@@ -72,11 +72,11 @@
 use RT::Date;
 use RT::User;
 use RT::Attributes;
-use RT::Base;
+use Encode qw();
 
-use Encode ();
+our $_TABLE_ATTR = { };
 
-our $_TABLE_ATTR;
+use RT::Base;
 our @ISA = qw(RT::Base);
 my $base = 'DBIx::SearchBuilder::Record::Cachable';
 if ( $RT::Config && $RT::Config->Get('DontCacheSearchBuilderRecords') ) {
@@ -1443,7 +1443,7 @@
         $self->_UpdateTimeTaken( $args{'TimeTaken'} );
     }
     if ( RT->Config->Get('UseTransactionBatch') and $transaction ) {
-	    push @{$self->{_TransactionBatch}}, $trans;
+	    push @{$self->{_TransactionBatch}}, $trans if $args{'CommitScrips'};
     }
     return ( $transaction, $msg, $trans );
 }

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder.pm	Tue Feb 13 09:50:41 2007
@@ -77,7 +77,7 @@
 1) Locate the appropriate shredder SQL dump file.  In the WebUI, when
    you use shredder, the path to the dump file is displayed.  It also
    gives the option to download the dump file after each wipeout.  Or
-   it can be found in your C<$RT::ShredderStoragePath>.
+   it can be found in your C<$ShredderStoragePath>.
 
 2) Load the shredder SQL dump into your RT database.  The details will
    be different for each database and RT configuration, consult your
@@ -104,7 +104,7 @@
 $DependenciesLimit, new_limit );>
 
 
-=head2 $RT::ShredderStoragePath
+=head2 $ShredderStoragePath
 
 Directory containing Shredder backup dumps.
 
@@ -667,7 +667,7 @@
 =head4 StoragePath
 
 Returns an absolute path to the storage dir.  See
-L<CONFIGURATION/$RT::ShredderStoragePath>.
+L<CONFIGURATION/$ShredderStoragePath>.
 
 See also description of the L</GetFileName> method.
 
@@ -675,8 +675,8 @@
 
 sub StoragePath
 {
-    return $RT::ShredderStoragePath ||
-        File::Spec->catdir( $RT::VarPath, qw(data RT-Shredder) );
+    return scalar( RT->Config->Get('ShredderStoragePath') )
+        || File::Spec->catdir( $RT::VarPath, qw(data RT-Shredder) );
 }
 
 my %active_dump_state = ();

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Users.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Users.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Plugin/Users.pm	Tue Feb 13 09:50:41 2007
@@ -70,7 +70,7 @@
     if( $args{'replace_relations'} ) {
         my $uid = $args{'replace_relations'};
         # XXX: it's possible that SystemUser is not available
-        my $user = RT::User->new( $RT::SytemUser );
+        my $user = RT::User->new( $RT::SystemUser );
         $user->Load( $uid );
         unless( $user->id ) {
             return (0, "Couldn't load user '$uid'" );

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Queue.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Queue.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Queue.pm	Tue Feb 13 09:50:41 2007
@@ -32,6 +32,11 @@
     $objs->Limit( FIELD => 'Instance', VALUE => $self->Id );
     push( @$list, $objs );
 
+# Scrips
+    $objs = RT::Scrips->new( $self->CurrentUser );
+    $objs->LimitToQueue( $self->id );
+    push( @$list, $objs );
+
 # Templates
     $objs = $self->Templates;
     push( @$list, $objs );

Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Template.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Template.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Shredder/Template.pm	Tue Feb 13 09:50:41 2007
@@ -21,6 +21,18 @@
     my $deps = $args{'Dependencies'};
     my $list = [];
 
+# Scrips
+    my $objs = RT::Scrips->new( $self->CurrentUser );
+    $objs->Limit( FIELD => 'Template', VALUE => $self->Id );
+    push( @$list, $objs );
+
+    $deps->_PushDependencies(
+        BaseObject => $self,
+        Flags => DEPENDS_ON,
+        TargetObjects => $list,
+        Shredder => $args{'Shredder'},
+    );
+
     return $self->SUPER::__DependsOn( %args );
 }
 

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	Tue Feb 13 09:50:41 2007
@@ -3421,6 +3421,8 @@
     return if $self->{_Destroyed}++;
 
     my $batch = $self->TransactionBatch or return;
+    return unless @$batch;
+
     require RT::Scrips;
     RT::Scrips->new($RT::SystemUser)->Apply(
 	Stage		=> 'TransactionBatch',

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	Tue Feb 13 09:50:41 2007
@@ -712,7 +712,7 @@
     $self->_OpenParen;
 
     #Search for the right field
-    if ($field eq 'Content' and $RT::DontSearchFileAttachments) {
+    if ( $field eq 'Content' and RT->Config->Get('DontSearchFileAttachments') ) {
        $self->_SQLLimit(
 			ALIAS         => $self->{_sql_trattachalias},
 			FIELD         => 'Filename',
@@ -2873,6 +2873,8 @@
 
 =end testing
 
+=cut
+
 1;
 
 

Added: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02queue.t
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02queue.t	Tue Feb 13 09:50:41 2007
@@ -0,0 +1,127 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Deep;
+BEGIN { require "lib/t/regression/shredder/utils.pl"; }
+init_db();
+
+plan tests => 16;
+
+diag 'simple queue' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $queue = RT::Queue->new( $RT::SystemUser );
+    my ($id, $msg) = $queue->Create( Name => 'my queue' );
+    ok($id, 'created queue') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $queue );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'queue with scrip' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $queue = RT::Queue->new( $RT::SystemUser );
+    my ($id, $msg) = $queue->Create( Name => 'my queue' );
+    ok($id, 'created queue') or diag "error: $msg";
+
+    my $scrip = RT::Scrip->new( $RT::SystemUser );
+    ($id, $msg) = $scrip->Create(
+        Description    => 'my scrip',
+        Queue          => $queue->id,
+        ScripCondition => 'On Create',
+        ScripAction    => 'Open Tickets',
+        Template       => 'Blank',
+    );
+    ok($id, 'created scrip') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $queue );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'queue with template' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $queue = RT::Queue->new( $RT::SystemUser );
+    my ($id, $msg) = $queue->Create( Name => 'my queue' );
+    ok($id, 'created queue') or diag "error: $msg";
+
+    my $template = RT::Template->new( $RT::SystemUser );
+    ($id, $msg) = $template->Create(
+        Name => 'my template',
+        Queue => $queue->id,
+        Content => "\nsome content",
+    );
+    ok($id, 'created template') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $queue );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'queue with a right granted' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $queue = RT::Queue->new( $RT::SystemUser );
+    my ($id, $msg) = $queue->Create( Name => 'my queue' );
+    ok($id, 'created queue') or diag "error: $msg";
+
+    my $group = RT::Group->new( $RT::SystemUser );
+    $group->LoadSystemInternalGroup('Everyone');
+    ok($group->id, 'loaded group');
+
+    ($id, $msg) = $group->PrincipalObj->GrantRight(
+        Right  => 'CreateTicket',
+        Object => $queue,
+    );
+    ok($id, 'granted right') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $queue );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'queue with a watcher' if $ENV{'TEST_VERBOSE'};
+{
+# XXX, FIXME: if uncomment these lines then we'll get 'Bizarre...'
+#	create_savepoint('clean');
+    my $group = RT::Group->new( $RT::SystemUser );
+    my ($id, $msg) = $group->CreateUserDefinedGroup('my group');
+    ok($id, 'created group') or diag "error: $msg";
+
+	create_savepoint('bqcreate');
+    my $queue = RT::Queue->new( $RT::SystemUser );
+    ($id, $msg) = $queue->Create( Name => 'my queue' );
+    ok($id, 'created queue') or diag "error: $msg";
+
+    ($id, $msg) = $queue->AddWatcher(
+        Type   => 'Cc',
+        PrincipalId => $group->id,
+    );
+    ok($id, 'added watcher') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $queue );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('bqcreate'), "current DB equal to savepoint");
+
+#	$shredder->PutObjects( Objects => $group );
+#	$shredder->WipeoutAll;
+#	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+if( is_all_successful() ) {
+	cleanup_tmp();
+} else {
+	diag( note_on_fail() );
+}
+

Added: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02template.t
==============================================================================
--- (empty file)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/shredder/02template.t	Tue Feb 13 09:50:41 2007
@@ -0,0 +1,78 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Deep;
+BEGIN { require "lib/t/regression/shredder/utils.pl"; }
+init_db();
+
+plan tests => 7;
+
+diag 'global template' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $template = RT::Template->new( $RT::SystemUser );
+    my ($id, $msg) = $template->Create(
+        Name => 'my template',
+        Content => "\nsome content",
+    );
+    ok($id, 'created template') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $template );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'local template' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $template = RT::Template->new( $RT::SystemUser );
+    my ($id, $msg) = $template->Create(
+        Name => 'my template',
+        Queue => 'General',
+        Content => "\nsome content",
+    );
+    ok($id, 'created template') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $template );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+diag 'template used in scrip' if $ENV{'TEST_VERBOSE'};
+{
+	create_savepoint('clean');
+    my $template = RT::Template->new( $RT::SystemUser );
+    my ($id, $msg) = $template->Create(
+        Name => 'my template',
+        Queue => 'General',
+        Content => "\nsome content",
+    );
+    ok($id, 'created template') or diag "error: $msg";
+
+    my $scrip = RT::Scrip->new( $RT::SystemUser );
+    ($id, $msg) = $scrip->Create(
+        Description    => 'my scrip',
+        Queue          => 'General',
+        ScripCondition => 'On Create',
+        ScripAction    => 'Open Tickets',
+        Template       => $template->id,
+    );
+    ok($id, 'created scrip') or diag "error: $msg";
+
+	my $shredder = shredder_new();
+	$shredder->PutObjects( Objects => $template );
+	$shredder->WipeoutAll;
+	cmp_deeply( dump_current_and_savepoint('clean'), "current DB equal to savepoint");
+}
+
+if( is_all_successful() ) {
+	cleanup_tmp();
+} else {
+	diag( note_on_fail() );
+}
+

Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in	(original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in	Tue Feb 13 09:50:41 2007
@@ -633,8 +633,8 @@
         if ( $args{'action'} =~ /^(insert|schema)$/ ) {
             print "Checking that Tickets table is of InnoDB type.\n" if $args{'debug'};
             my $create_table = $dbh->selectrow_arrayref("SHOW CREATE TABLE Tickets")->[1];
-            unless ( $create_table =~ /ENGINE=InnoDB/ ) {
-                print STDERR 'RT requires that all its tables be of InnoDB type.\n'.
+            unless ( $create_table =~ /(?:ENGINE|TYPE)=InnoDB/i ) {
+                print STDERR "RT requires that all its tables be of InnoDB type.\n".
                     "Upgrade RT tables.\n";
                 exit -1;
             }

Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-test-dependencies.in	Tue Feb 13 09:50:41 2007
@@ -3,7 +3,7 @@
 # 
 # COPYRIGHT:
 #  
-# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
+# This software is Copyright (c) 1996-2006 Best Practical Solutions, LLC 
 #                                          <jesse at bestpractical.com>
 # 
 # (Except where explicitly superseded by other copyright notices)
@@ -61,6 +61,7 @@
     'with-ORACLE',                        'with-FASTCGI',
     'with-SPEEDYCGI',                     'with-MODPERL1',
     'with-MODPERL2',                      'with-DEV',
+    'with-STANDALONE',
     'download=s',
     'repository=s'
 );
@@ -69,13 +70,17 @@
     help();
     exit(0);
 }
-
 # Set up defaults
-$args{'with-MASON'} = 1;
-$args{'with-CORE'} = 1;
-$args{'with-DEV'} =1; 
-$args{'with-CLI'} =1; 
-$args{'with-MAILGATE'} =1; 
+my %default = (
+    'with-MASON' => 1,
+    'with-CORE' => 1,
+    'with-CLI' => 1,
+    'with-MAILGATE' => 1, 
+    'with-DEV' => @RT_DEVEL_MODE@, 
+    'with-STANDALONE' => @RT_STANDALONE@,
+);
+$args{$_} = $default{$_} foreach grep !exists $args{$_}, keys %default;
+
 {
   my $section;
   my %always_show_sections = (
@@ -143,6 +148,7 @@
 	--with-sqlite		Database interface and driver for SQLite (unsupported)
 	--with-oracle		Database interface for oracle (unsupported)
 
+	--with-standalone	Libraries needed to support the standalone simple pure perl server
 	--with-fastcgi		Libraries needed to support the fastcgi handler
 	--with-speedycgi	Libraries needed to support the speedycgi handler
 	--with-modperl1		Libraries needed to support the modperl 1 handler
@@ -157,7 +163,7 @@
 instead of the standard CPAN shell by --install to install any
 required modules.  It will be called with the module name, or, if
 "RT_FIX_DEPS_CMD" contains a "%s", will replace the "%s" with the
-module name ebcore calling the program.
+module name before calling the program.
 .
 }
 
@@ -177,15 +183,12 @@
 Digest::base
 Digest::MD5 2.27
 DBI 1.37
-Test::Inline
 Class::ReturnValue 0.40
-Date::Format
 DBIx::SearchBuilder 1.40
 Text::Template
 File::Spec 0.8
 HTML::Entities 
 HTML::Scrubber 0.08
-Net::Domain
 Log::Dispatch 2.0
 Locale::Maketext 1.06
 Locale::Maketext::Lexicon 0.32
@@ -197,11 +200,11 @@
 Time::ParseDate
 Time::HiRes 
 File::Temp
-Term::ReadKey
 Text::Autoformat
 Text::Quoted 1.3
 Tree::Simple 1.04
 UNIVERSAL::require
+Regexp::Common
 Scalar::Util
 Module::Versions::Report
 Cache::Simple::TimedExpiry
@@ -211,39 +214,42 @@
 .
 
 $deps{'MASON'} = [ text_to_hash( << '.') ];
-Params::Validate 0.02
-Cache::Cache
-Exception::Class 1.14
 HTML::Mason 1.23
-MLDBM
 Errno
-FreezeThaw
 Digest::MD5 2.27
 CGI::Cookie 1.20
 Storable 2.08
 Apache::Session 1.53
 XML::RSS 1.05
-HTTP::Server::Simple 0.07
-HTTP::Server::Simple::Mason 0.09
 GD
 GD::Graph
 GD::Text
 Text::WikiFormat 0.76
 .
 
+$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
+HTTP::Server::Simple 0.07
+HTTP::Server::Simple::Mason 0.09
+.
+
 $deps{'MAILGATE'} = [ text_to_hash( << '.') ];
 HTML::TreeBuilder
 HTML::FormatText
 Getopt::Long
 LWP::UserAgent
+Pod::Usage
 .
 
 $deps{'CLI'} = [ text_to_hash( << '.') ];
 Getopt::Long 2.24
+LWP
+HTTP::Request::Common
+Text::ParseWords
+Term::ReadLine
+Term::ReadKey
 .
 
 $deps{'DEV'} = [ text_to_hash( << '.') ];
-Regexp::Common
 Test::Inline 
 Apache::Test
 HTML::Form
@@ -306,10 +312,10 @@
 check_users();
 
 my %Missing_By_Type = ();
-foreach my $type (keys %args) {
+foreach my $type (sort grep $args{$_}, keys %args) {
     next unless ($type =~ /^with-(.*?)$/);
 
-    my $type = $1;
+    $type = $1;
     section("$type dependencies");
 
     my @missing;
@@ -395,21 +401,25 @@
 $@
 ------------------------
 
-Failed to load module CPAN. Module CPAN is distributed with Perl
-and helps install perl modules from http://www.cpan.org. RT uses
-this module to install dependencies, but module's failed to load
-with error above. You have several choices to install dependencies
-in this situatation:
-1) check that you've configured CPAN module, to do this run
-   `@PERL@ -MCPAN -e shell` program from shell, if it fails
-   then you have to update CPAN module (see next suggestion)
-   or use another way to install modules;
-2) try to update module CPAN, get distribution from
-   http://search.cpan.org/dist/CPAN and try again;
-3) use a different tool to install dependencies, see description of
-   the RT_FIX_DEPS_CMD environment variable in the output of
-   the `$0` program;
-4) install modules manually.
+When we tried to start installing RT's perl dependencies, 
+we were unable to load the CPAN client. This module is usually distributed
+with Perl. This usually indicates that your vendor has shipped an unconfigured
+or incorrectly configured CPAN client.
+The error above may (or may not) give you a hint about what went wrong
+
+You have several choices about how to install dependencies in 
+this situatation:
+
+1) use a different tool to install dependencies by running setting the following
+   shell environment variable and rerunning this tool:
+    RT_FIX_DEPS_CMD='@PERL@ -MCPAN -e"install %s"'
+2) Attempt to configure CPAN by running:
+   `@PERL@ -MCPAN -e shell` program from shell.
+   If this fails, you may have to manually upgrade CPAN (see below)
+3) Try to update the CPAN client. Download it from:
+   http://search.cpan.org/dist/CPAN and try again
+4) Install each dependency manually by downloading them one by one from
+   http://search.cpan.org
 
 END
         exit(1);
@@ -472,7 +482,7 @@
     print_found("5.8.3", 0,"RT is known to be non-functional on versions of perl older than 5.8.3. Please upgrade to 5.8.3 or newer.");
     exit(1);
   } else {
-    print_found( ">=5.8.3($])", 1);
+    print_found( sprintf(">=5.8.3(%vd)", $^V), 1 );
   }
 }
 


More information about the Rt-commit mailing list