[Rt-commit] r2534 - in rt/branches/PLATANO-EXPERIMENTAL: . bin etc html/Admin html/Admin/Queues html/Admin/Users html/Elements html/NoAuth html/NoAuth/images html/Search/Elements html/Ticket html/User lib/RT lib/RT/Interface/Web lib/t/regression sbin

jesse at bestpractical.com jesse at bestpractical.com
Mon Mar 28 05:33:43 EST 2005


Author: jesse
Date: Mon Mar 28 05:33:39 2005
New Revision: 2534

Added:
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Standalone.pm   (contents, props changed)
   rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/02basic_web.t
   rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t
Removed:
   rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/03basic_web.t
Modified:
   rt/branches/PLATANO-EXPERIMENTAL/   (props changed)
   rt/branches/PLATANO-EXPERIMENTAL/README
   rt/branches/PLATANO-EXPERIMENTAL/bin/standalone_httpd.in
   rt/branches/PLATANO-EXPERIMENTAL/bin/webmux.pl.in
   rt/branches/PLATANO-EXPERIMENTAL/etc/RT_SiteConfig.pm
   rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Queues/index.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/Modify.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/index.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Admin/index.html
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Header
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Login
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MessageBox
   rt/branches/PLATANO-EXPERIMENTAL/html/Elements/SelectOwner
   rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/images/autohandler
   rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/webrt.css
   rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/BuildFormatString
   rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/DisplayOptions
   rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/EditFormat
   rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/PickBasics
   rt/branches/PLATANO-EXPERIMENTAL/html/Ticket/Update.html
   rt/branches/PLATANO-EXPERIMENTAL/html/User/Prefs.html
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Attachment_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CurrentUser.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Record.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm
   rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in
Log:
 r10274 at hualien:  jesse | 2005-03-28 16:49:31 +0800
  r8746 at hualien:  jesse | 2005-03-15 14:07:30 +0800
  Refactored the top-level admin menu to make it easier to add and remove options
  r8807 at hualien:  jesse | 2005-03-16 16:03:29 +0800
   r8806 at hualien (orig r2474):  alexmv | 2005-03-16 02:53:59 -0500
    * Users and groups can have transactions; ShowTicket isn't needed to
      see these
   
  
  r8808 at hualien:  jesse | 2005-03-16 16:07:57 +0800
  Ticket: 6537
  RT-Status: resolved
  
  Explicit transaction description for changed passwords
  
  r9502 at hualien:  jesse | 2005-03-22 01:07:59 +0800
  * Refactored standalone_httpd to use HTTP::Server::Simple::Mason
  * Moved some configuration from webmux.pl to RT::Interface::Web::Handler
  * Split apart some of the web tests for better isolation
  r9555 at hualien:  jesse | 2005-03-22 22:15:24 +0800
  * Properly set binmode for the standalone_httpd server. This makes
    UTF8 text that could be misinterpreted as Latin1 behave correctly.
  
  r9584 at hualien:  jesse | 2005-03-24 10:28:28 +0800
  Ticket: 6558
  RT-Status: resolved
  RT-Update: correspond
  
  * Removed an extra </td> tag. Thanks to Steve Turner
  
  r10203 at hualien:  jesse | 2005-03-27 13:01:43 +0800
  * Corrected HTTP::Server::Simple dependencies
  r10204 at hualien:  jesse | 2005-03-27 13:08:01 +0800
  * Improved generic messages returned by RT::Record->_Set()
  * Corrected RT::Record->_Set to return a Class::ReturnValue, rather than butchering it
    into an array. (This means that RT::Ticket->SetPriority can now be evaluated in boolean
    or list context, like it was supposed to be)
  r10205 at hualien:  jesse | 2005-03-27 13:10:21 +0800
  * Slightly better introductory text on user and queue listings
  r10206 at hualien:  jesse | 2005-03-27 13:11:53 +0800
  Improvements to big textareas to make sure they don't force browser windows to scroll.
  r10207 at hualien:  jesse | 2005-03-27 13:13:26 +0800
  * Bugfixes to CachedGroupMember->SetDisabled unmasked by the RT::Record fixes
  r10208 at hualien:  jesse | 2005-03-27 13:14:57 +0800
  * Fixing tests to not depend on a deprecated API
  r10209 at hualien:  jesse | 2005-03-27 13:16:31 +0800
  * Updated RT::User regression tests to not expect a pristine database
  * Updated RT::User->_Set to return more apropriate results messages (no more listing the actor)
  r10210 at hualien:  jesse | 2005-03-27 13:17:02 +0800
  * Updated RT::Ticket->_Set to return more appropriate status messages
  r10211 at hualien:  jesse | 2005-03-27 13:18:07 +0800
  * Updated RT::Transaction to return better Foo changed from "bar" to "baz" messages
  r10221 at hualien:  jesse | 2005-03-27 14:15:36 +0800
  Ticket: 6565
  RT-Status: resolved
  RT-Update: correspond
  
  * Overhauled README to be more correct, friendly and a bit cleaner
  r10223 at hualien:  jesse | 2005-03-27 14:33:12 +0800
  Ticket: 6566
  RT-Status: resolved
  RT-Update: correspond
  
  * Added a bit of documentation to RT_SiteConfig.pm -- Thanks to David Glasser
  
  r10225 at hualien:  jesse | 2005-03-27 14:43:25 +0800
  * SiteConfig typofix
  r10227 at hualien:  jesse | 2005-03-27 15:00:51 +0800
  * Explicitly give the login box an id/name so passwords are not saved on user edit pages
  r10229 at hualien:  jesse | 2005-03-27 15:39:30 +0800
  * Added ALT text for BPS corporate logo -- Suggested by Jedi during YAPC.TW 2005
  
  r10231 at hualien:  jesse | 2005-03-27 17:12:44 +0800
  * More fixes for status messages broken in this morning's commit
  r10258 at hualien:  jesse | 2005-03-28 01:05:27 +0800
  * Record Message-Id when creating attachment records
  r10271 at hualien:  jesse | 2005-03-28 15:49:42 +0800
  * A bunch of minor search query builder cleanup and loc improvements
 


Modified: rt/branches/PLATANO-EXPERIMENTAL/README
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/README	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/README	Mon Mar 28 05:33:39 2005
@@ -1,18 +1,18 @@
-
-RT is an enterprise-grade issue tracking system. It allows
-organizations to keep track of their to-do lists, who is working
-on which tasks, what's already been done, and when tasks were
-completed. It is available under the terms of version 2 of the GNU
-General Public License (GPL), so it doesn't cost anything to set
-up and use.
+RT is an enterprise-grade issue tracking system. It allows organizations
+to keep track of what needs to get done, who is working on which tasks,
+what's already been done, and when tasks were (or weren't) completed.
+
+RT doesn't cost anything to use, no matter how much you use it; it
+is freely available under the terms of Version 2 of the GNU General
+Public License.
 
 RT is commercially supported software. To purchase support, training,
-custom development or professional services, please write to
-<sales at bestpractical.com>. 
+custom development or professional services, please get in touch with
+us at sales at bestpractical.com.
 
-        Jesse Vincent
-        Best Practical Solutions, LLC
-        January, 2005
+     Jesse Vincent
+     Best Practical Solutions, LLC
+     March, 2005
 
 
 REQUIRED PACKAGES:
@@ -20,29 +20,27 @@
 
 o   Perl 5.8.3 or later (http://www.perl.com).
 
-	    Perl versions prior to 5.8.3 contain bugs that could result
-	    in data corruption. We recommend strongly that you use 5.8.3
-	    or newer. RT may function with perl 5.8.0 and later, but
-	    is unsupported in that configuration.
+       Perl versions prior to 5.8.3 contain bugs that could result
+       in data corruption. We recommend strongly that you use 5.8.3
+       or newer. RT may function with perl 5.8.0 and later, but
+       is unsupported in that configuration.
+
+o   A supported SQL database
 
-o   A DB backend; MySQL is recommended ( http://www.mysql.com ) 
         Currently supported:  Mysql 4.0.13 or later with InnoDB support.
                               Postgres 7.2 or later.
                               Oracle 9iR2.
                               SQLite 3.0. (Not recommended for production)
-        Beta-quality support for Informix is also available.
-
 
 o   Apache version 1.3.x or 2.x (http://httpd.apache.org) 
-    with mod_perl -- (http://perl.apache.org ) 
-    or a webserver with FastCGI support (www.fastcgi.com)
+        with mod_perl -- (http://perl.apache.org ) 
+        or a webserver with FastCGI support (www.fastcgi.com)
 
         mod_perl 2.0 isn't quite ready for prime_time just yet;
-        Best Practical Solutions strongly recommends that sites use 
-        Apache 1.3 or FastCGI.
+        We _strongly_ recommend that you use Apache 1.3 or FastCGI.
 
         Compiling mod_perl on Apache 1.3.x as a DSO has been known 
-         to have massive stability problems and is not recommended.
+        to have massive stability problems and is not recommended.
 
         mod_perl 1.x must be build with EVERYTHING=1
 
@@ -66,100 +64,112 @@
 
     http://wiki.bestpractical.com/index.cgi?InstallationGuides
 
-1   Unpack this distribution SOMWHERE OTHER THAN where you want to install RT
+1   Unpack this distribution other than where you want to install RT
 
-        Granted, you've already got it open. To do this cleanly:
+     To do this cleanly, run the following command:
 
-                tar xzvf rt.tar.gz -C /tmp
+       tar xzvf rt.tar.gz -C /tmp
 
 2   Run the "configure" script. 
 
-        ./configure --help to see the list of options
-        ./configure (with the flags you want)
+       ./configure --help to see the list of options
+       ./configure (with the flags you want)
 
-3   Make sure that RT has everything it needs to run:
+    RT defaults to installing in /opt/rt3 with MySQL as its database. It
+    tries to guess which of www-data, www, apache or nobody your webserver
+    will run as, but you can override that behavior.
 
-3.1   Check for missing dependencies:
+3   Make sure that RT has everything it needs to run.
 
-        make testdeps        
+    Check for missing dependencies by running:
 
-3.2   If there are unsatisfied dependencies, install them by hand or run:
+       make testdeps        
 
-        make fixdeps
+4   If the script reports any missing dependencies, install them by hand
+    or run the following command as a user who has permission to install perl
+    modules on your system:
 
-3.3   Check to make sure everything was installed properly:
-        
-        make testdeps
+     make fixdeps
 
-        It might sometimes be necessary to run "make fixdeps" several times
-        to install all necessary perl modules.
+5   Check to make sure everything was installed properly.
+     
+       make testdeps
 
-4   Create a group called 'rt'
+     It might sometimes be necessary to run "make fixdeps" several times
+     to install all necessary perl modules.
 
-5a  FOR A NEW INSTALLATION: 
-        
-        As root, type:
-                 make install   
-                       
-                 make initialize-database 
+6   If this is a new installation:
+     
+     As a user with permission to install RT in your chosen directory, type:
 
-        If the make fails, type:
-                make dropdb 
-        and start over from step 5a
+       make install   
+                    
+     Set up etc/RT_SiteConfig.pm in your RT installation directory.
+     You'll need to add any values you need to change from the defaults 
+     in etc/RT_Config.pm
 
-5b  FOR UPGRADING: (Within the RT 3.x series)
+     As a user with permission to read RT's configuration file, type:
+     
+       make initialize-database 
 
-        Read through the UPGRADING document included in this distribution.
-        It may contain important instructions which will help you upgrade
-        RT safely.
+     If the make fails, type:
+     
+       make dropdb 
 
-        As root, type: 
-                make upgrade    
+     and start over from step 6
 
-        This will build new binaries, config files and libraries without
-        overwriting your RT database. 
+7   If you're upgrading from RT 3.0 or newer:
 
-        You may also need to update RT's database.  To find out, type:
+     Read through the UPGRADING document included in this distribution.
+     
+     It includes special upgrade instructions that will help you get this
+     new version of RT up and running smoothly.
 
-           ls etc/upgrade
+     As a user with permission to install RT in your chosen installation
+     directory, type: 
 
-        For each item in that directory whose name is greater than
-        your previously installed RT version, run:
-            /opt/rt3/sbin/rt-setup-database --action schema \
-                --datadir etc/upgrade/<version>
-            /opt/rt3/sbin/rt-setup-database --action acl \
-                --datadir etc/upgrade/<version>
-            /opt/rt3/sbin/rt-setup-database --action insert \
-                 --datadir etc/upgrade/<version>
+       make upgrade    
 
-        Some of these commands will generate errors related to missing files.
-        That just means that no action was needed.
+     This will install new binaries, config files and libraries without
+     overwriting your RT database. 
 
+     Update etc/RT_SiteConfig.pm in your RT installation directory.
+     You'll need to add any new values you need to change from the defaults 
+     in etc/RT_Config.pm
 
-5c  FOR UPGRADING: (From RT 2.0.x)
+     You may also need to update RT's database.  To find out, type:
 
-    Please upgrade from RT 2.0 to RT 3.2 and then follow the instructions
-    for section 5b above.
+       ls etc/upgrade
+
+     For each item in that directory whose name is greater than
+     your previously installed RT version, run:
 
-6   Edit etc/RT_SiteConfig.pm in your RT installation directory, by specifying
-    any values you need to change from the defaults in etc/RT_Config.pm
+       /opt/rt3/sbin/rt-setup-database --action schema \
+           --datadir etc/upgrade/<version>
+       /opt/rt3/sbin/rt-setup-database --action acl \
+           --datadir etc/upgrade/<version>
+       /opt/rt3/sbin/rt-setup-database --action insert \
+            --datadir etc/upgrade/<version>
 
-7   Configure the email and web gateways, as described below. 
+8  If you're upgrading from RT 2.0:
 
-8   Stop and start your webserver, so it picks up your configuration changes.
+    Please upgrade from RT 2.0 to RT 3.2 and then follow the instructions
+    for section 7.
+
+9   Configure the email and web gateways, as described below. 
 
     NOTE: root's password for the web interface is "password" 
     (without the quotes.)  Not changing this is a SECURITY risk
     
-9   Configure RT per the instructions in RT's manual.
+10   Set up users, groups, queues, scrips and access control.
 
     Until you do this, RT will not be able to send or receive email,
     nor will it be more than marginally functional.  This is not an
     optional step.
 
 
-THE WEB INTERFACE
------------------
+SETTING UP THE WEB INTERFACE
+----------------------------
 
 RT's web interface is based around HTML::Mason, which works well with
 the mod_perl perl interpreter within Apache httpd and FastCGI
@@ -168,8 +178,13 @@
 --------
 
 To install RT with mod_perl, you'll need to install the
-apache database connection cache and add a few lines to your 
-Apache configuration file telling it about RT:
+apache database connection cache.  To make sure it's installed, run
+the following command:
+
+    perl -MCPAN -e'install Apache::DBI'
+
+Next, add a few lines to your Apache configuration file, so that
+it knows where to find RT:
 
 <VirtualHost your.ip.address>
     ServerName your.rt.server.hostname
@@ -180,17 +195,11 @@
     PerlRequire /opt/rt3/bin/webmux.pl
 
     <Location />
-        SetHandler perl-script
-        PerlHandler RT::Mason
+     SetHandler perl-script
+     PerlHandler RT::Mason
     </Location>
 </VirtualHost>
 
-To make sure that the Apache database connection cache is installed, run
-the following command:
-
-    perl -MCPAN -e'install Apache::DBI'
-
-
 FastCGI
 -------
 
@@ -226,26 +235,22 @@
 SETTING UP THE MAIL GATEWAY 
 ---------------------------
 
-RT can accept incoming email using a simple program run as a "pipe" 
-by your mail server.
+To let email flow to your RT server, you need to add a few lines of
+configuration to your mail server's "aliases" file. These lines "pipe"
+incoming email messages from your mail server to RT.
 
-Add the following lines to /etc/aliases (or your local equivalent) :
+Add the following lines to /etc/aliases (or your local equivalent) on your mail server:
 
-rt:         "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://localhost/"
-rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://localhost/"
-                                            |                |             |
-                            <queue-name>----/                |             |
-                                                             |             |
-               <correspond or comment depending on whether   |             |
-               the mail should be resent to the requestor>---/             |
-                                                                           |
-                                            <URL for RT's web interface>---/
+rt:         "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com/"
+rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://rt.example.com/"
 
+You'll need to add similar lines for each queue you want to be able
+to send email to. To find out more about how to configure RT's email
+gateway, type:
+
+       perldoc /opt/rt3/bin/rt-mailgate
 
-BUGS
-----
 
-To report a bug, send email to <rt-bugs at fsck.com>.
 
 GETTING HELP
 ------------
@@ -260,17 +265,29 @@
 <sales at bestpractical.com> to discuss rates and availability.
 
 
+
+RT WEBSITE
+----------
+
+For current information about RT, check out the RT website at 
+     http://www.bestpractical.com/  
+
+You'll find screenshots, a pointer to the current version of RT, contributed 
+patches, and lots of other great stuff.
+
+
+
 RT-USERS MAILINGLIST
 --------------------
 
 To keep up to date on the latest RT tips, techniques and extensions,
 you probably want to join the rt-users mailing list.  Send a message to:
 
-         <rt-users-request at lists.bestpractical.com>
+      rt-users-request at lists.bestpractical.com 
 
 With the body of the message consisting of only the word:
 
-        subscribe
+     subscribe
 
 If you're interested in hacking on RT, you'll want to subscribe to
 <rt-devel at lists.bestpractical.com>.  Subscribe to it with instructions
@@ -282,15 +299,17 @@
 <jesse at bestpractical.com>.
 
 
-RT WEBSITE
-----------
-
-For current information about RT, check out the RT website at 
-        http://www.bestpractical.com/  
 
+BUGS
+----
 
-You'll find screenshots, a pointer to the current version of RT, contributed 
-patches, and lots of other great stuff.
+RT's a pretty complex application and as you get up to speed, you might
+run into some trouble. Generally, it's best to ask about things you
+run into on the rt-users mailinglist (or pick up a commercial support
+contract from Best Practical). But, sometimes people do run into bugs. In
+the exceedingly unlikely event that you hit a bug in RT, please report
+it! We'd love to hear about problems you have with RT, so we can fix them.
+To report a bug, send email to rt-bugs at fsck.com.
 
 
 # BEGIN BPS TAGGED BLOCK {{{

Modified: rt/branches/PLATANO-EXPERIMENTAL/bin/standalone_httpd.in
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/bin/standalone_httpd.in	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/bin/standalone_httpd.in	Mon Mar 28 05:33:39 2005
@@ -44,170 +44,23 @@
 # those contributions and any derivatives thereof.
 # 
 # END BPS TAGGED BLOCK }}}
-package RT::Mason;
 
+use warnings;
 use strict;
-use vars '$Handler';
-
-BEGIN { require ('@RT_BIN_PATH@/webmux.pl') };
-
-use lib( "@LOCAL_LIB_PATH@", "@RT_LIB_PATH@");
-
-use Socket;
-
-$SIG{CHLD} = 'IGNORE'; # reap child processes
-$SIG{HUP} = sub {
-    # on a "kill -HUP", we first close our socket handles.
-    close Remote;
-    close HTTPDaemon;
-
-    # and then, on systems implementing fork(), we make sure
-    # we are running with a new pid, so another -HUP will still
-    # work on the new process.
-    require Config;
-    if ($Config::Config{d_fork} and my $pid = fork()) {
-        # finally, allow ^C on the parent process to terminate
-        # the children.
-        waitpid($pid, 0); exit;
-    }
-
-    # do the exec. if $0 is not executable, try running it with $^X.
-    exec { $0 } ( ((-x $0) ? () : ($^X)), $0, @ARGV );
-};
 
+BEGIN {
+    use lib( "@LOCAL_LIB_PATH@", "@RT_LIB_PATH@");
+    use RT;
+    RT::LoadConfig();
+    if ($RT::DevelMode) { require Module::Refresh; }
+}
 
 RT::Init();
 
-my $port = shift || '8080';
-
-main_loop($port);
-
-sub main_loop {
-    my $port = shift;
-    my $tcp  = getprotobyname('tcp');
-
-    socket( HTTPDaemon, PF_INET, SOCK_STREAM, $tcp ) or die "socket: $!";
-    setsockopt( HTTPDaemon, SOL_SOCKET, SO_REUSEADDR, pack( "l", 1 ) )
-      or warn "setsockopt: $!";
-    bind( HTTPDaemon, sockaddr_in( $port, INADDR_ANY ) ) or die "bind: $!";
-    listen( HTTPDaemon, SOMAXCONN ) or die "listen: $!";
-
-    print("You can connect to your RT server at http://localhost:$port/\n");
-
-    while (1) {
-
-        for ( ; accept( Remote, HTTPDaemon ); close Remote ) {
-            Module::Refresh->refresh if $RT::DevelMode;
-
-            binmode *Remote, ':utf8';
-            *STDIN  = *Remote;
-            *STDOUT = *Remote;
-
-            my $remote_sockaddr = getpeername(STDIN);
-            my ( undef, $iaddr ) = sockaddr_in($remote_sockaddr);
-            my $peername = gethostbyaddr( $iaddr, AF_INET ) || "localhost";
-            my $peeraddr = inet_ntoa($iaddr) || "127.0.0.1";
-
-            my $local_sockaddr = getsockname(STDIN);
-            my ( undef, $localiaddr ) = sockaddr_in($local_sockaddr);
-            my $localname = gethostbyaddr( $localiaddr, AF_INET )
-              || "localhost";
-            my $localaddr = inet_ntoa($localiaddr) || "127.0.0.1";
-
-            chomp( $_ = <STDIN> );
-            my ( $method, $request_uri, $proto, undef ) = split;
-
-            #$request_uri =~ s#\\#/#g;
-            $RT::Logger->info("<- $peername: $_\n");
-            my ( $file, undef, $query_string ) =
-              ( $request_uri =~ /([^?]*)(\?(.*))?/ );    # split at ?
-            #$file =~ s/%([\dA-Fa-f]{2})/chr(hex($1))/eg;  # decode url-escaped entities
-
-            last if ( $method !~ /^(GET|POST|HEAD)$/ );
-
-            $query_string = '' if !defined $query_string;
-
-            build_cgi_env( method       => $method,
-                           query_string => $query_string,
-                           path         => $file,
-                           protocol     => $proto,
-                           port         => $port,
-                           peername     => $peername,
-                           peeraddr     => $peeraddr,
-                           localname    => $localname,
-                           request_uri  => $request_uri );
-
-            RT::ConnectToDatabase();
-            my $cgi = CGI->new();
-
-            print "HTTP/1.0 200 OK\n";    # probably OK by now
-
-            if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
-                && ($Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) )
-              ) {
-                $cgi->path_info( $cgi->path_info . "/index.html" );
-            }
-
-            eval { $Handler->handle_cgi_object($cgi); };
-            $RT::Logger->crit($@) if ($@);
-
-	    RT::Interface::Web::Handler->CleanupRequest();
-        }
-
-    }
-
-}
-
+use RT::Interface::Web::Standalone;
 
+my $server = RT::Interface::Web::Standalone->new;
+$server->port(shift @ARGV) if ($ARGV[0]);
+$server->run();
 
-sub build_cgi_env {
-        my %args = ( query_string => '',
-                     path => '',
-                     port => undef,
-                     protocol => undef,
-                     localname => undef,
-                     method => undef,
-                     remote_name => undef,
- 
-
-                        @_);
-                    
-        foreach my $var qw(USER_AGENT CONTENT_LENGTH CONTENT_TYPE
-          COOKIE SERVER_PORT SERVER_PROTOCOL SERVER_NAME
-          PATH_INFO REQUEST_URI REQUEST_METHOD REMOTE_ADDR
-          REMOTE_HOST QUERY_STRING SERVER_SOFTWARE) {
-            delete $ENV{$var};
-          }
-        while (<STDIN>) {
-            s/[\r\l\n\s]+$//;
-            if( /^([\w\-]+): (.+)/i) {
-                my $tag = uc($1);
-                $tag =~ s/^COOKIES$/COOKIE/;
-                my $val = $2;
-                $tag =~ s/-/_/g;
-                $tag = "HTTP_".$tag unless (grep /^$tag$/, qw(CONTENT_LENGTH CONTENT_TYPE COOKIE));
-                if ($ENV{$tag}) {
-                $ENV{$tag} .= "; $val";
-                }
-                else {
-                $ENV{$tag} = $val;
-                }
-            } 
-            last if (/^$/);
-        }
-
-
-        $ENV{SERVER_PROTOCOL} = $args{protocol};
-        $ENV{SERVER_PORT}     = $args{port};
-        $ENV{SERVER_NAME}     = $args{'localname'};
-        $ENV{SERVER_URL}      = "http://".$args{'localname'}.":".$args{'port'}."/";
-        $ENV{PATH_INFO}       = $args{'path'};
-        $ENV{REQUEST_URI}     = $args{'request_uri'};
-        $ENV{REQUEST_METHOD}  = $args{method};
-        $ENV{REMOTE_ADDR}     = $args{'peeraddr'};
-        $ENV{REMOTE_HOST}     = $args{'peername'};
-        $ENV{QUERY_STRING}    = $args{'query_string'};
-        $ENV{SERVER_SOFTWARE} = "rt-standalone/$RT::VERSION";
 
-        CGI::initialize_globals();
-} 

Modified: rt/branches/PLATANO-EXPERIMENTAL/bin/webmux.pl.in
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/bin/webmux.pl.in	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/bin/webmux.pl.in	Mon Mar 28 05:33:39 2005
@@ -53,6 +53,9 @@
     $ENV{'ENV'}    = '' if defined $ENV{'ENV'};
     $ENV{'IFS'}    = '' if defined $ENV{'IFS'};
 
+    use CGI qw(-private_tempfiles);    #bring this in before mason, to make sure we
+                                   #set private_tempfiles
+
     eval { require Apache2; require Apache::Request; 1 } or
     eval { require Apache2; require Apache::compat; 1 } or die $@
       if $ENV{'MOD_PERL'}
@@ -65,11 +68,6 @@
 
 package RT::Mason;
 
-use CGI qw(-private_tempfiles);    #bring this in before mason, to make sure we
-                                   #set private_tempfiles
-
-use HTML::Mason;    # brings in subpackages: Parser, Interp, etc.
-
 use vars qw($Nobody $SystemUser $Handler $r);
 
 #This drags in RT's config.pm
@@ -78,24 +76,14 @@
     if ($RT::DevelMode) { require Module::Refresh; }
 }
 
-use Carp;
 
 {
 
     package HTML::Mason::Commands;
     use vars qw(%session);
-
-    use RT::Interface::Web;
-    use MIME::Entity;
-    use Text::Wrapper;
-    use CGI::Cookie;
-    use Time::ParseDate;
-    use Time::HiRes;
-    use HTML::Entities;
-    use HTML::Scrubber;
-    use Text::Quoted;
 }
 
+use RT::Interface::Web;
 use RT::Interface::Web::Handler;
 $Handler = RT::Interface::Web::Handler->new(@RT::MasonParameters);
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/etc/RT_SiteConfig.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/etc/RT_SiteConfig.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/etc/RT_SiteConfig.pm	Mon Mar 28 05:33:39 2005
@@ -1 +1,19 @@
+# Any configuration directives you include  here will override 
+# RT's default configuration file, RT_Config.pm
+#
+# To include a directive here, just copy the equivalent statement
+# from RT_Config.pm and change the value. We've included a single
+# sample value below.
+#
+# This file is actually a perl module, so you can include valid
+# perl code, as well.
+#
+# The converse is also true, if this file isn't valid perl, you're
+# going to run into trouble. To check your SiteConfig file, use
+# this comamnd:
+#
+#   perl -C /opt/rt3/etc/RT_SiteConfig.pm
+
+Set( $rtname => 'example.com');
+
 1;

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Queues/index.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Queues/index.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Queues/index.html	Mon Mar 28 05:33:39 2005
@@ -50,13 +50,14 @@
 
 
 
-<%$caption%>:<BR>
+<h1><%$caption%></h1>
+<p><&|/l&>Select a queue</&>:</p>
 <UL>
 %if ($queues->Count == 0) {
-<LI> <i><&|/l&>No queues matching search criteria found.</&></i>
+<li><i><&|/l&>No queues matching search criteria found.</&></i></li>
 % }
 %while ( $queue = $queues->Next) {
-<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
+<li><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></li>
 %}
 </UL>
 <BR>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/Modify.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/Modify.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/Modify.html	Mon Mar 28 05:33:39 2005
@@ -222,12 +222,12 @@
 <TR>
 <TD colspan="2">
 <& /Elements/TitleBoxStart, title => loc('Comments about this user') &>
-<TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
+<TEXTAREA class="comments" name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
 <& /Elements/TitleBoxEnd &>
 %if ($UserObj->Privileged) {
 <BR>
 <& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
+<TEXTAREA class="signature" COLS=80 ROWS=5 name="Signature" WRAP=HARD><%$UserObj->Signature%></TEXTAREA>
 <& /Elements/TitleBoxEnd &>
 % }
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/index.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/index.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/Users/index.html	Mon Mar 28 05:33:39 2005
@@ -48,13 +48,11 @@
     current_subtab => 'Admin/Users/',
     Title => loc('Select a user') &>
 
-
-
-
-<%$caption%>:<BR>
-<UL>
+<h1><%$caption%></h1>
+<p><&|/l&>Select a user</&>:</p>
+<ul>
 %if ($users->Count == 0) {
-<LI> <i><&|/l&>No users matching search criteria found.</&></i>
+<li><i><&|/l&>No users matching search criteria found.</&></i></li>
 % }
 %my @ids;
 %while ( $user = $users->Next) {

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Admin/index.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Admin/index.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Admin/index.html	Mon Mar 28 05:33:39 2005
@@ -5,7 +5,7 @@
 %# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC 
 %#                                          <jesse at bestpractical.com>
 %# 
-%# (Except where explicitly superseded by other copyright notices)
+%# (Except where explicitly superseded by other copyright notices),
 %# 
 %# 
 %# LICENSE:
@@ -31,7 +31,7 @@
 %# to you to modify and distribute this software under the terms of
 %# the GNU General Public License and is only of importance to you if
 %# you choose to contribute your changes and enhancements to the
-%# community by submitting them to Best Practical Solutions, LLC.)
+%# community by submitting them to Best Practical Solutions, LLC.),
 %# 
 %# By intentionally submitting any modifications, corrections or
 %# derivatives to this work, or any other work intended for use with
@@ -47,19 +47,53 @@
 <& /Admin/Elements/Tabs, Title => loc('RT Administration') &>
 
 <ul>
-<li><font size="+2"><a href="Users/"><&|/l&>Users</&></a></font><br>
-<&|/l&>Manage users and passwords</&>
-</li>
-<li><font size="+2"><a href="Groups/"><&|/l&>Groups</&></a></font><br>
-<&|/l&>Manage groups and group membership</&>
-</li>
-<li><font size="+2"><a href="Queues/"><&|/l&>Queues</&></a></font><br>
-<&|/l&>Manage queues and queue-specific properties</&>
-</li>
-<li><font size="+2"><a href="CustomFields/"><&|/l&>Custom Fields</&></a></font><br>
-<&|/l&>Manage custom fields and custom field values</&>
-</li>
-<li><font size="+2"><a href="Global/"><&|/l&>Global</&></a></font><br>
-<&|/l&>Manage properties and configuration which apply to all queues</&>
+%    foreach my $key (sort keys %$tabs) {
+<li><font size="+2"><a href="<%$RT::WebPath%>/<%$tabs->{$key}->{'path'}|n %>"><%$tabs->{$key} ->{'title'}%></a></font><br>
+<%$tabs->{$key}->{description}%>
 </li>
+%}
 </ul>
+<%init>
+
+
+
+my $tabs = {
+    A => {
+        title       => loc('Users'),
+        path        => 'Admin/Users/index.html',
+        description => loc('Manage users and passwords'),
+    },
+    B => {
+        title => loc('Groups'),
+        path  => 'Admin/Groups/index.html',
+        description => loc('Manage groups and group membership'),
+    },
+    C => {
+        title       => loc('Queues'),
+        path        => 'Admin/Queues/index.html',
+        description => loc('Manage queues and queue-specific properties'),
+    },
+    D => {
+        'title'     => loc('Custom Fields'),
+        description => loc('Manage custom fields and custom field values'),
+          path      => 'Admin/CustomFields/index.html',
+    },
+    E => {
+        'title'     => loc('Global'),
+        path        => 'Admin/Global/index.html',
+        description =>
+          loc('Manage properties and configuration which apply to all queues'),
+    },
+    F => {
+        'title'     => loc('Tools'),
+        path        => 'Admin/Tools/index.html',
+        description => loc('Use other RT administrative tools')
+    },
+};
+
+  $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+
+
+
+</%init>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Header
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Header	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Header	Mon Mar 28 05:33:39 2005
@@ -77,7 +77,7 @@
 >
 <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
   <tr> 
-    <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="" width="230" height="50"></a></td>
+    <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="<%loc("Best Practical Solutions, LLC corporate logo")%>" width="230" height="50"></a></td>
     <td>&nbsp;</td>
     <td>&nbsp;</td>
     <td width="50%" align="right">

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Login
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Login	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/Login	Mon Mar 28 05:33:39 2005
@@ -67,7 +67,7 @@
 contentbg=>"#cccccc" &>
 
 % unless ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth) {
-<FORM METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
+<FORM id="login" name="login" METHOD=POST ACTION="<% (UNIVERSAL::can($r, 'uri') && ($r->uri) =~ m!.*/(.*)!) %>" >
 <TABLE BORDER=0 WIDTH=100%>
 <TR ALIGN=RIGHT>
 <TD ALIGN=RIGHT><&|/l&>Username</&>:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MessageBox
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MessageBox	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/MessageBox	Mon Mar 28 05:33:39 2005
@@ -43,7 +43,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<TEXTAREA COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></TEXTAREA>
+<textarea class="messagebox" COLS=<%$Width%> ROWS=<%$Height%> WRAP=<%$Wrap%> NAME="<%$Name%>"><& /Elements/Callback, %ARGS &><% $Default %><%$message%><%$IncludeSignature ? $signature : ''%></textarea>
 <%INIT>
 
 my ($message);

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Elements/SelectOwner
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Elements/SelectOwner	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Elements/SelectOwner	Mon Mar 28 05:33:39 2005
@@ -45,10 +45,16 @@
 %# END BPS TAGGED BLOCK }}}
 <SELECT NAME="<%$Name%>">
 %if ($DefaultValue) {
-<OPTION <% !$Default && "SELECTED" %> VALUE=""><%$DefaultLabel%></OPTION>
+<OPTION <% !$Default ? "SELECTED" : '' %> VALUE=""><%$DefaultLabel%></OPTION>
 %}
 %foreach my $User ( @users)  {
-<OPTION <% ($User->Id == $Default)         && "SELECTED" %> VALUE="<%$User->Id()%>"><%$User->Name()%></OPTION>
+<OPTION <% ($User->Id == $Default) ? "SELECTED" : ''%>
+%if ($ValueAttribute eq 'id') {
+    value="<%$User->id%>"
+%} elsif ($ValueAttribute eq 'Name') {
+    value="<%$User->Name%>"
+%}
+><%$User->Name()%></OPTION>
 %}
 </SELECT>
 <%INIT>
@@ -97,5 +103,6 @@
 $TicketObj => undef
 $DefaultValue => 1
 $DefaultLabel => "-"
+$ValueAttribute => 'id'
 $cfqueues => undef
 </%ARGS>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/images/autohandler
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/images/autohandler	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/images/autohandler	Mon Mar 28 05:33:39 2005
@@ -15,7 +15,10 @@
 die unless (-f $file && -r $file);
 $r->content_type($type);
 open (FILE, "<$file") || die;
-$m->out($_) while (<FILE>);
-close(FILE);
+{
+    local $/ = \16384;
+    $m->out($_) while (<FILE>);
+    close(FILE);
+}
 $m->abort;
 </%init>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/webrt.css
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/webrt.css	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/NoAuth/webrt.css	Mon Mar 28 05:33:39 2005
@@ -604,6 +604,17 @@
                           padding-right: .5em;
                         }
 
+textarea.signature {
+    width: 100%;
+}
+textarea.comments {
+    width: 100%;
+}
+
+textarea.messagebox {
+    width: 100%;
+}
+
 %# Provide a callback for adding/modifying the style sheet.
 %# http://www.w3.org/TR/REC-CSS1 - section 3.2, says:
 %#   "latter specified rule wins"

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/BuildFormatString
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/BuildFormatString	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/BuildFormatString	Mon Mar 28 05:33:39 2005
@@ -66,33 +66,52 @@
 
 # All the things we can display in the format string by default
 my @fields = qw(
-    QueueName        
-    OwnerName
-    id               Status
-    Subject          ExtendedStatus
-    Priority         InitialPriority
-    FinalPriority    Type
-    TimeWorked       TimeLeft
-    TimeEstimated    Requestors
-    Cc               AdminCc
-    StartsRelative   StartedRelative
-    CreatedRelative  LastUpdatedRelative
-    ToldRelative     DueRelative
-    ResolvedRelative Starts
-    Started          Created
-    CreatedBy        LastUpdated
-    LastUpdatedBy    Told
-    Due              Resolved
-    NEWLINE          RefersTo
-    ReferredToBy     DependsOn
-    DependedOnBy     MemberOf
-    Members          Parents
-    Children         -
+  id
+  Status
+  ExtendedStatus
+  Subject
+  QueueName
+  OwnerName
+  Priority
+  InitialPriority
+  FinalPriority
+  Type
+  TimeWorked
+  TimeLeft
+  TimeEstimated
+  CreatedBy
+  LastUpdatedBy
+  Requestors
+  Cc
+  AdminCc
+  Starts
+  StartsRelative
+  Started
+  StartedRelative
+  Created
+  CreatedRelative
+  LastUpdated
+  LastUpdatedRelative
+  Told
+  ToldRelative
+  Due
+  DueRelative
+  Resolved
+  ResolvedRelative
+  RefersTo
+  ReferredToBy
+  DependsOn
+  DependedOnBy
+  MemberOf
+  Members
+  Parents
+  Children
+  NEWLINE
 );
 
 my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
-foreach (keys %cfqueues) {
-    my $id = $_;
+foreach my $id (keys %cfqueues) {
+    # What does this _do_? What are the keys to cfqueues
     $id =~ s/^.'*(.*).'*$/$1/;
     # Gotta load up the $queue object, since queues get stored by name now.
     my $queue = RT::Queue->new($session{'CurrentUser'});
@@ -173,9 +192,7 @@
         $column{Suffix} .= "</a>";
     }
     elsif ( $Link eq "Take" ) {
-        $column{Prefix} .=
-            "<A HREF=\""
-          . $RT::WebPath
+        $column{Prefix} .= "<A HREF=\"" . $RT::WebPath
           . "/Ticket/Display.html?Action=Take&id=__id__\">";
         $column{Suffix} .= "</a>";
     }

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/DisplayOptions
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/DisplayOptions	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/DisplayOptions	Mon Mar 28 05:33:39 2005
@@ -54,12 +54,12 @@
 <tr>
 <td class=label>
 <&|/l&>Order by</&>:
-</td><td class=label>
+</td><td class=value>
 <select name="OrderBy">
 % foreach my $field (keys %fields) {
 %    next unless $field;
 <option value=<%$field%>
-% if ($field eq $OrderBy) {
+% if ($field =~ /$OrderBy/i) {
 SELECTED
 % }
 ><%$field%></option>
@@ -81,7 +81,7 @@
 </tr>
 <td class=label>
 <&|/l&>Rows per page</&>:
-</td><td>
+</td><td class="value">
 <& /Elements/SelectResultsPerPage, 
     Name => "RowsPerPage", 
     Default => $RowsPerPage &>
@@ -97,6 +97,8 @@
 my $tickets = new RT::Tickets($session{'CurrentUser'});
 my %fields = %{$tickets->FIELDS};
 map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields;
+delete $fields{'EffectiveId'};
+
 
 </%INIT>
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/EditFormat
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/EditFormat	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/EditFormat	Mon Mar 28 05:33:39 2005
@@ -49,7 +49,7 @@
 <&|/l&>Add Columns</&>:
 </td>
 <td>
-Format:
+<&|/l&>Format</&>:
 </td>
 <td></td>
 <td>
@@ -59,32 +59,27 @@
 <td valign=top>
 <select size="6" name="SelectDisplayColumns" multiple>
 % foreach my $field ( @$AvailableColumns) {
-<option value="<%$field%>"><%
-loc($m->comp(
-                '/Elements/RT__Ticket/ColumnMap',
-                Name => $field,
-                Attr => 'title'
-              )
-              || $field) %></option>
+<option value="<%$field%>"><% loc( $field) %></option>
+%# $m->comp( '/Elements/RT__Ticket/ColumnMap', Name => $field, Attr => 'title') || 
 % }
 </select>
 </td>
 <td>
-Link:
-<select name=Link>
+<&|/l&>Link</&>:
+<select name="Link">
 <option value="None">-</option>
 <option value="Display"><&|/l&>Display</&></option>
 <option value="Take"><&|/l&>Take</&></option>
 </select>
-<br>Title: <input name="Title" size=10>
-<br>Size:
-<select name=Size>
+<br><&|/l&>Title</&>: <input name="Title" size=10>
+<br><&|/l&>Size</&>:
+<select name="Size">
 <option value="">-</option>
 <option value="Small"><&|/l&>Small</&></option>
 <option value="Large"><&|/l&>Large</&></option>
 </select>
-<br>Face:
-<select name=Face>
+<br><&|/l&>Style</&>:
+<select name="Face">
 <option value="">-</option>
 <option value="Bold"><&|/l&>Bold</&></option>
 <option value="Italic"><&|/l&>Italic</&></option>
@@ -98,11 +93,7 @@
 % my $i=0;
 % foreach my $field (@$CurrentFormat) {
 <option value="<%$i++%>><%$field->{Column}%>">
-<%loc($m->comp(
-                '/Elements/RT__Ticket/ColumnMap',
-                Name => $field->{Column},
-                Attr => 'title'
-              ) || $field->{Column}) %></option>
+<%loc( $field->{Column}) %></option>
 % }
 </select>
 <br>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/PickBasics
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/PickBasics	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Search/Elements/PickBasics	Mon Mar 28 05:33:39 2005
@@ -108,7 +108,7 @@
 					  FalseVal => '!=' 
 &> 
 </td><td>
-<& /Elements/SelectOwner, Name => "ValueOfActor" &>
+<& /Elements/SelectOwner, Name => "ValueOfActor", ValueAttribute => 'Name' &>
 </td>
 </tr>
 <tr>

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/Ticket/Update.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/Ticket/Update.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/Ticket/Update.html	Mon Mar 28 05:33:39 2005
@@ -107,7 +107,7 @@
 <TD ALIGN=RIGHT><% $CF->Name %>:</TD>
 <TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
     "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %></em></TD>
-</TD></TR>
+</TR>
 %    } # end if while
 % } # end of if
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/html/User/Prefs.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/html/User/Prefs.html	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/html/User/Prefs.html	Mon Mar 28 05:33:39 2005
@@ -165,7 +165,7 @@
 %if ($UserObj->Privileged) {
 <BR>
 <& /Elements/TitleBoxStart, title => loc('Signature') &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
+<TEXTAREA COLS=80 ROWS=5 name="Signature" class="signature" WRAP=HARD>
 <%$UserObj->Signature%></TEXTAREA>
 <& /Elements/TitleBoxEnd &>
 % }

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Attachment_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Attachment_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Attachment_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -156,6 +156,13 @@
     defined($Subject) or $Subject = '';
     chomp($Subject);
 
+    #Get the Message-id
+    my $MessageId = $Attachment->head->get( 'Message-Id', 0 );
+    defined($MessageId) or $MessageId = '';
+    chomp ($MessageId);
+    $MessageId =~ s/^<(.*)>$/$1/go;
+
+
     #Get the filename
     my $Filename = $Attachment->head->recommended_filename || eval {
 	${ $Attachment->head->{mail_hdr_hash}{'Content-Disposition'}[0] }
@@ -171,6 +178,7 @@
             Parent        => 0,
             ContentType   => $Attachment->mime_type,
             Headers => $Attachment->head->as_string,
+            MessageId => $MessageId,
             Subject => $Subject);
         
         unless ($id) {
@@ -202,7 +210,9 @@
                                                   Headers       =>  $Attachment->head->as_string,
                                        Subject       =>  $Subject,
                                        Content         => $Body,
-                                       Filename => $Filename, );
+                                       Filename => $Filename, 
+                                        MessageId => $MessageId
+                                    );
         unless ($id) {
             $RT::Logger->crit("Attachment insert failed - ".$RT::Handle->dbh->errstr);
         }

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -242,11 +242,14 @@
 sub SetDisabled {
     my $self = shift;
     my $val = shift;
-    
+ 
+    # if it's already disabled, we're good.
+    return {1} if ($self->__Value('Disabled') == $val);
     my $err = $self->SUPER::SetDisabled($val);
-    unless ($err) {
-        $RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $self->Id );
-        return (undef);
+    my ($retval, $msg) = $err->as_array();
+    unless ($retval) {
+        $RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $self->Id .": $msg");
+        return ($err);
     }
     
     my $member = $self->MemberObj();
@@ -260,7 +263,7 @@
             my $kid_err = $kid->SetDisabled($val );
             unless ($kid_err) {
                 $RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $kid->Id );
-                return (undef);
+                return ($kid_err);
             }
         }
     }

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CurrentUser.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CurrentUser.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CurrentUser.pm	Mon Mar 28 05:33:39 2005
@@ -400,7 +400,7 @@
 
 sub loc_fuzzy {
     my $self = shift;
-    return '' if $_[0] eq '';
+    return '' if (!$_[0] ||  $_[0] eq '');
 
     # XXX: work around perl's deficiency when matching utf8 data
     return $_[0] if Encode::is_utf8($_[0]);

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/CustomField_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -284,7 +284,8 @@
 is($cf->Type, 'Select');
 is($cf->MaxValues, 1);
 
-ok($cf->SetType('SelectMultiple'));
+my ($val, $msg) = $cf->SetMaxValues('0');
+ok($val, $msg);
 is($cf->Type, 'Select');
 is($cf->MaxValues, 0);
 ok(!$cf->SingleValue );

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Handler.pm	Mon Mar 28 05:33:39 2005
@@ -43,8 +43,23 @@
 # those contributions and any derivatives thereof.
 # 
 # END BPS TAGGED BLOCK }}}
+
 package RT::Interface::Web::Handler;
 
+use CGI qw/-private_tempfiles/;
+use MIME::Entity;
+use Text::Wrapper;
+use CGI::Cookie;
+use Time::ParseDate;
+use Time::HiRes;
+use HTML::Entities;
+use HTML::Scrubber;
+use Text::Quoted;
+use RT::Interface::Web::Handler;
+use File::Path qw( rmtree );
+use File::Glob qw( bsd_glob );
+use File::Spec::Unix;
+
 sub DefaultHandlerArgs  { (
     comp_root => [
         [ local    => $RT::MasonLocalComponentRoot ],

Added: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Standalone.pm
==============================================================================
--- (empty file)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Interface/Web/Standalone.pm	Mon Mar 28 05:33:39 2005
@@ -0,0 +1,54 @@
+package RT::Interface::Web::Standalone;
+
+use strict;
+use base 'HTTP::Server::Simple::Mason';
+use RT::Interface::Web::Handler;
+use RT::Interface::Web;
+
+sub new_handler {
+   my $m;
+   $m=  RT::Interface::Web::Handler->new(@RT::MasonParameters,
+   # Override mason's default output method so 
+   # we can change the binmode to our encoding if
+   # we happen to be handed character data instead
+   # of binary data.
+   # 
+   # Cloned from HTML::Mason::CGIHandler
+    out_method => 
+      sub {
+            my $m = HTML::Mason::Request->instance;
+            my $r = $m->cgi_request;
+            # Send headers if they have not been sent by us or by user.
+            # We use instance here because if we store $request we get a
+            # circular reference and a big memory leak.
+                unless ($r->http_header_sent) {
+                       $r->send_http_header();
+                }
+            {
+            if ($r->content_type =~ /charset=([\w-]+)$/ ) {
+                my $enc = $1;
+                binmode *STDOUT, ":encoding($enc)";
+            }
+            # We could perhaps install a new, faster out_method here that
+            # wouldn't have to keep checking whether headers have been
+            # sent and what the $r->method is.  That would require
+            # additions to the Request interface, though.
+             print STDOUT grep {defined} @_;
+            }
+        }
+    );
+        return ($m); 
+}
+
+sub handle_request {
+
+    my $self = shift;
+    my $cgi = shift;
+    $self->SUPER::handle_request($cgi);
+    $RT::Logger->crit($@) if ($@);
+
+    RT::Interface::Web::Handler->CleanupRequest();
+
+}
+
+1;

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Record.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Record.pm	Mon Mar 28 05:33:39 2005
@@ -474,12 +474,33 @@
         $args{'Value'} = 0;
     }
 
-    $self->_SetLastUpdated();
-    my ( $val, $msg ) = $self->SUPER::_Set(
+    my $old_val = $self->__Value($args{'Field'});
+     $self->_SetLastUpdated();
+    my $ret = $self->SUPER::_Set(
         Field => $args{'Field'},
         Value => $args{'Value'},
         IsSQL => $args{'IsSQL'}
     );
+        my ($status, $msg) =  $ret->as_array();
+
+        # @values has two values, a status code and a message.
+
+    # $ret is a Class::ReturnValue object. as such, in a boolean context, it's a bool
+    # we want to change the standard "success" message
+    if ($status) {
+        $msg =
+          $self->loc(
+            "[_1] changed from [_2] to [_3]",
+            $args{'Field'},
+            ( $old_val ? "'$old_val'" : $self->loc("(no value)") ),
+            '"' . $self->__Value( $args{'Field'}) . '"' 
+          );
+      } else {
+
+          $msg = $self->CurrentUser->loc_fuzzy($msg);
+    }
+    return wantarray ? ($status, $msg) : $ret;     
+
 }
 
 # }}}
@@ -871,12 +892,12 @@
         next if ( $value eq $self->$attribute() );
         my $method = "Set$attribute";
         my ( $code, $msg ) = $self->$method($value);
-
         my ($prefix) = ref($self) =~ /RT::(\w+)/;
-        push @results,
-          $self->loc( "$prefix [_1]", $self->id ) . ': '
-          . $self->loc($attribute) . ': '
-          . $self->CurrentUser->loc_fuzzy($msg);
+
+        # Default to $id, but use name if we can get it.
+        my $label = $self->id;
+        $label = $self->Name if (UNIVERSAL::can($self,'Name'));
+        push @results, $self->loc( "$prefix [_1]", $label ) . ': '. $msg;
 
 =for loc
                                    "[_1] could not be set to [_2].",       # loc
@@ -1014,10 +1035,12 @@
 
 my ($rid, $rmsg)= $t1->Resolve();
 ok(!$rid, $rmsg);
-ok($t2->Resolve);
+my ($rid2, $rmsg2) = $t2->Resolve();
+ok ($rid2, $rmsg2);
 ($rid, $rmsg)= $t1->Resolve();
 ok(!$rid, $rmsg);
-ok($t3->Resolve);
+my ($rid3,$rmsg3) = $t3->Resolve;
+ok ($rid3,$rmsg3);
 ($rid, $rmsg)= $t1->Resolve();
 ok($rid, $rmsg);
 

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -3448,7 +3448,7 @@
                                                OldValue  => $Old,
                                                TimeTaken => $args{'TimeTaken'},
         );
-        return ( $Trans, scalar $TransObj->Description );
+        return ( $Trans, scalar $TransObj->BriefDescription );
     }
     else {
         return ( $ret, $msg );

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/Transaction_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -424,7 +424,7 @@
         }
 
         #if they ain't got rights to see, return an empty object
-        else {
+        elsif ($self->__Value('ObjectType') eq "RT::Ticket") {
             unless ( $self->CurrentUserHasRight('ShowTicket') ) {
                 return ( $self->{'attachments'} );
             }
@@ -505,7 +505,7 @@
     }
 
     #if they ain't got rights to see, don't let em
-    else {
+    elsif ($self->__Value('ObjectType') eq "RT::Ticket") {
         unless ( $self->CurrentUserHasRight('ShowTicket') ) {
             return ($self->loc("Permission Denied") );
         }
@@ -531,7 +531,6 @@
 sub BriefDescription {
     my $self = shift;
 
-
     #If it's a comment or a comment email record,
     #  we need to be extra special careful
     if ( $self->__Value('Type') =~ /^Comment/ ) {
@@ -541,44 +540,67 @@
     }
 
     #if they ain't got rights to see, don't let em
-    else {
+    elsif ( $self->__Value('ObjectType') eq "RT::Ticket" ) {
         unless ( $self->CurrentUserHasRight('ShowTicket') ) {
             return ( $self->loc("Permission Denied") );
         }
     }
 
-    my $type = $self->Type; #cache this, rather than calling it 30 times
+    my $type = $self->Type;    #cache this, rather than calling it 30 times
 
-    if ( !defined( $type ) ) {
+    if ( !defined($type) ) {
         return $self->loc("No transaction type specified");
     }
 
     my $obj_type = $self->FriendlyObjectType;
 
     if ( $type eq 'Create' ) {
-        return ($self->loc("[_1] created", $obj_type));
+        return ( $self->loc( "[_1] created", $obj_type ) );
     }
     elsif ( $type =~ /Status/ ) {
         if ( $self->Field eq 'Status' ) {
             if ( $self->NewValue eq 'deleted' ) {
-                return ($self->loc("[_1] deleted", $obj_type));
+                return ( $self->loc( "[_1] deleted", $obj_type ) );
             }
             else {
-                return ( $self->loc("Status changed from [_1] to [_2]", $self->loc($self->OldValue), $self->loc($self->NewValue) ));
+                return (
+                    $self->loc(
+                        "Status changed from [_1] to [_2]",
+                        "'" . $self->loc( $self->OldValue ) . "'",
+                        "'" . $self->loc( $self->NewValue ) . "'"
+                    )
+                );
 
             }
         }
 
         # Generic:
-       my $no_value = $self->loc("(no value)"); 
-        return ( $self->loc( "[_1] changed from [_2] to [_3]", $self->Field , ( $self->OldValue || $no_value ) ,  $self->NewValue ));
+        my $no_value = $self->loc("(no value)");
+        return (
+            $self->loc(
+                "[_1] changed from [_2] to [_3]",
+                $self->Field,
+                ( $self->OldValue ? "'" . $self->OldValue . "'" : $no_value ),
+                "'" . $self->NewValue . "'"
+            )
+        );
     }
 
-    if (my $code = $_BriefDescriptions{$type}) {
+    if ( my $code = $_BriefDescriptions{$type} ) {
         return $code->($self);
     }
 
-    return $self->loc( "Default: [_1]/[_2] changed from [_3] to [_4]", $type, $self->Field, $self->OldValue, $self->NewValue );
+    return $self->loc(
+        "Default: [_1]/[_2] changed from [_3] to [_4]",
+        $type,
+        $self->Field,
+        (
+            $self->OldValue
+            ? "'" . $self->OldValue . "'"
+            : $self->loc("(no value)")
+        ),
+        "'" . $self->NewValue . "'"
+    );
 }
 
 %_BriefDescriptions = (
@@ -742,7 +764,10 @@
     },
     Set => sub {
         my $self = shift;
-        if ( $self->Field eq 'Queue' ) {
+        if ( $self->Field eq 'Password' ) {
+            return $self->loc('Password changed');
+        }
+        elsif ( $self->Field eq 'Queue' ) {
             my $q1 = new RT::Queue( $self->CurrentUser );
             $q1->Load( $self->OldValue );
             my $q2 = new RT::Queue( $self->CurrentUser );
@@ -759,7 +784,7 @@
             return $self->loc( "[_1] changed from [_2] to [_3]", $self->Field, $t2->AsString, $t1->AsString );
         }
         else {
-            return $self->loc( "[_1] changed from [_2] to [_3]", $self->Field, $self->OldValue, $self->NewValue );
+            return $self->loc( "[_1] changed from [_2] to [_3]", $self->Field, ($self->OldValue? "'".$self->OldValue ."'" : $self->loc("(no value)")) , "'". $self->NewValue."'" );
         }
     },
     PurgeTransaction => sub {
@@ -861,7 +886,7 @@
 
 
     #if they ain't got rights to see, don't let em
-    else {
+    elsif ($self->__Value('ObjectType') eq "RT::Ticket") {
         unless ( $self->CurrentUserHasRight('ShowTicket') ) {
             return (undef);
         }

Modified: rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/RT/User_Overlay.pm	Mon Mar 28 05:33:39 2005
@@ -121,41 +121,41 @@
 
 my $u1 = RT::User->new($RT::SystemUser);
 is(ref($u1), 'RT::User');
-my ($id, $msg) = $u1->Create(Name => 'CreateTest1', EmailAddress => 'create-test-1 at example.com');
+my ($id, $msg) = $u1->Create(Name => 'CreateTest1'.$$, EmailAddress => $$.'create-test-1 at example.com');
 ok ($id, "Creating user CreateTest1 - " . $msg );
 
 # Make sure we can't create a second user with the same name
 my $u2 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u2->Create(Name => 'CreateTest1', EmailAddress => 'create-test-2 at example.com');
+($id, $msg) = $u2->Create(Name => 'CreateTest1'.$$, EmailAddress => $$.'create-test-2 at example.com');
 ok (!$id, $msg);
 
 
 # Make sure we can't create a second user with the same EmailAddress address
 my $u3 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u3->Create(Name => 'CreateTest2', EmailAddress => 'create-test-1 at example.com');
+($id, $msg) = $u3->Create(Name => 'CreateTest2'.$$, EmailAddress => $$.'create-test-1 at example.com');
 ok (!$id, $msg);
 
 # Make sure we can create a user with no EmailAddress address
 my $u4 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u4->Create(Name => 'CreateTest3');
+($id, $msg) = $u4->Create(Name => 'CreateTest3'.$$);
 ok ($id, $msg);
 
 # make sure we can create a second user with no EmailAddress address
 my $u5 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u5->Create(Name => 'CreateTest4');
+($id, $msg) = $u5->Create(Name => 'CreateTest4'.$$);
 ok ($id, $msg);
 
 # make sure we can create a user with a blank EmailAddress address
 my $u6 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u6->Create(Name => 'CreateTest6', EmailAddress => '');
+($id, $msg) = $u6->Create(Name => 'CreateTest6'.$$, EmailAddress => '');
 ok ($id, $msg);
 # make sure we can create a second user with a blankEmailAddress address
 my $u7 = RT::User->new($RT::SystemUser);
-($id, $msg) = $u7->Create(Name => 'CreateTest7', EmailAddress => '');
+($id, $msg) = $u7->Create(Name => 'CreateTest7'.$$, EmailAddress => '');
 ok ($id, $msg);
 
 # Can we change the email address away from from "";
-($id,$msg) = $u7->SetEmailAddress('foo at bar');
+($id,$msg) = $u7->SetEmailAddress('foo at bar'.$$);
 ok ($id, $msg);
 # can we change the address back to "";  
 ($id,$msg) = $u7->SetEmailAddress('');
@@ -211,7 +211,7 @@
         $args{'Password'} = '*NO-PASSWORD*';
     }
     elsif ( length( $args{'Password'} ) < $RT::MinimumPasswordLength ) {
-        return ( 0, $self->loc("Password too short") );
+        return ( 0, $self->loc("Password needs to be at least [_1] characters long",$RT::MinimumPasswordLength) );
     }
 
     else {
@@ -1032,7 +1032,7 @@
         return ( 0, $self->loc("No password set") );
     }
     elsif ( length($password) < $RT::MinimumPasswordLength ) {
-        return ( 0, $self->loc("Password too short") );
+        return ( 0, $self->loc("Password needs to be at least [_1] characters long", $RT::MinimumPasswordLength) );
     }
     else {
         $password = $self->_GeneratePassword($password);
@@ -1282,7 +1282,7 @@
 ok ($rootq->CurrentUser->HasRight(Right=> 'CreateTicket', Object => $rootq), "Root can create tickets");
 
 my $new_user = RT::User->new($RT::SystemUser);
-my ($id, $msg) = $new_user->Create(Name => 'ACLTest');
+my ($id, $msg) = $new_user->Create(Name => 'ACLTest'.$$);
 
 ok ($id, "Created a new user for acl test $msg");
 
@@ -1313,7 +1313,7 @@
 ok (!$new_user->HasRight( Object => $new_tick, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
 # Create a new group
 my $group = RT::Group->new($RT::SystemUser);
-$group->CreateUserDefinedGroup(Name => 'ACLTest');
+$group->CreateUserDefinedGroup(Name => 'ACLTest'.$$);
 ok($group->Id, "Created a new group Ok");
 # Grant a group the right to modify tickets in a queue
 ok(my ($gv,$gm) = $group->PrincipalObj->GrantRight( Object => $q, Right => 'ModifyTicket'),"Granted the group the right to modify tickets");
@@ -1348,7 +1348,7 @@
 
 # Create a subgroup
 my $subgroup = RT::Group->new($RT::SystemUser);
-$subgroup->CreateUserDefinedGroup(Name => 'Subgrouptest');
+$subgroup->CreateUserDefinedGroup(Name => 'Subgrouptest',$$);
 ok($subgroup->Id, "Created a new group ".$subgroup->Id."Ok");
 #Add the subgroup as a subgroup of the group
 my ($said, $samsg) =  $group->AddMember($subgroup->PrincipalId);
@@ -1363,8 +1363,8 @@
 #  {{{ Deal with making sure that members of subgroups of a disabled group don't have rights
 
 my ($id, $msg);
- ($id, $msg) =  $group->SetDisabled(1);
- ok ($id,$msg);
+($id, $msg) =  $group->SetDisabled(1);
+ok ($id,$msg);
 ok (!$new_user->HasRight( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket when the group ".$group->Id. " is disabled");
  ($id, $msg) =  $group->SetDisabled(0);
 ok($id,$msg);
@@ -1694,7 +1694,7 @@
                                                OldValue  => $Old,
                                                TimeTaken => $args{'TimeTaken'},
         );
-        return ( $Trans, scalar $TransObj->Description );
+        return ( $Trans, scalar $TransObj->BriefDescription );
     }
     else {
         return ( $ret, $msg );

Added: rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/02basic_web.t
==============================================================================
--- (empty file)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/02basic_web.t	Mon Mar 28 05:33:39 2005
@@ -0,0 +1,148 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More qw/no_plan/;
+use WWW::Mechanize;
+use HTTP::Request::Common;
+use HTTP::Cookies;
+use LWP;
+use Encode;
+
+my $cookie_jar = HTTP::Cookies->new;
+my $agent = WWW::Mechanize->new();
+
+# give the agent a place to stash the cookies
+
+$agent->cookie_jar($cookie_jar);
+
+
+# get the top page
+my $url = "http://localhost".$RT::WebPath."/";
+$agent->get($url);
+
+is ($agent->{'status'}, 200, "Loaded a page");
+
+
+# {{{ test a login
+
+# follow the link marked "Login"
+
+ok($agent->{form}->find_input('user'));
+
+ok($agent->{form}->find_input('pass'));
+ok ($agent->{'content'} =~ /username:/i);
+$agent->field( 'user' => 'root' );
+$agent->field( 'pass' => 'password' );
+# the field isn't named, so we have to click link 0
+$agent->click(0);
+is($agent->{'status'}, 200, "Fetched the page ok");
+ok( $agent->{'content'} =~ /Logout/i, "Found a logout link");
+
+
+
+$agent->get($url."Ticket/Create.html?Queue=1");
+is ($agent->{'status'}, 200, "Loaded Create.html");
+$agent->form(3);
+# Start with a string containing characters in latin1
+my $string = "I18N Web Testing æøå";
+Encode::from_to($string, 'iso-8859-1', 'utf8');
+$agent->field('Subject' => "Ticket with utf8 body");
+$agent->field('Content' => $string);
+ok($agent->submit(), "Created new ticket with $string as Content");
+ok( $agent->{'content'} =~ qr{$string} , "Found the content");
+$agent->get($url."Ticket/Create.html?Queue=1");
+is ($agent->{'status'}, 200, "Loaded Create.html");
+$agent->form(3);
+# Start with a string containing characters in latin1
+my $string = "I18N Web Testing æøå";
+Encode::from_to($string, 'iso-8859-1', 'utf8');
+$agent->field('Subject' => $string);
+$agent->field('Content' => "Ticket with utf8 subject");
+ok($agent->submit(), "Created new ticket with $string as Subject");
+
+ok( $agent->{'content'} =~ qr{$string} , "Found the content");
+
+
+
+# }}}
+
+# {{{ Query Builder tests
+
+my $response = $agent->get($url."Search/Build.html");
+ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
+
+# Parsing TicketSQL
+#
+# Adding items
+
+# set the first value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "aaa");
+$agent->submit();
+
+# set the next value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "bbb");
+$agent->submit();
+
+ok($agent->form_name('BuildQuery'));
+
+# get the query
+my $query = $agent->current_form->find_input("Query")->value;
+# strip whitespace from ends
+$query =~ s/^\s*//g;
+$query =~ s/\s*$//g;
+
+# collapse other whitespace
+$query =~ s/\s+/ /g;
+
+is ($query, "Subject LIKE 'aaa' AND Subject LIKE 'bbb'");
+
+# - new items go one level down
+# - add items at currently selected level
+# - if nothing is selected, add at end, one level down
+#
+# move left
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move left if you're at the top level
+#
+# move right
+# - error if nothing selected
+# - same item should be selected after move
+# - can always move right (no max depth...should there be?)
+#
+# move up
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move up if you're first in the list
+#
+# move down
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move down if you're last in the list
+#
+# toggle
+# - error if nothing selected
+# - change all aggregators in the grouping
+# - don't change any others
+#
+# delete
+# - error if nothing selected
+# - delete currently selected item
+# - delete all children of a grouping
+# - if delete leaves a node with no children, delete that, too
+# - what should be selected?
+#
+# Clear
+# - clears entire query
+# - clears it from the session, too
+
+# }}}
+
+
+1;

Added: rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t
==============================================================================
--- (empty file)
+++ rt/branches/PLATANO-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t	Mon Mar 28 05:33:39 2005
@@ -0,0 +1,64 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More qw/no_plan/;
+use WWW::Mechanize;
+use HTTP::Request::Common;
+use HTTP::Cookies;
+use LWP;
+use Encode;
+
+my $cookie_jar = HTTP::Cookies->new;
+my $agent = WWW::Mechanize->new();
+
+# give the agent a place to stash the cookies
+
+$agent->cookie_jar($cookie_jar);
+
+
+# get the top page
+my $url = "http://localhost".$RT::WebPath."/";
+$agent->get($url);
+
+is ($agent->{'status'}, 200, "Loaded a page");
+
+
+# {{{ test a login
+
+# follow the link marked "Login"
+
+ok($agent->{form}->find_input('user'));
+
+ok($agent->{form}->find_input('pass'));
+ok ($agent->{'content'} =~ /username:/i);
+$agent->field( 'user' => 'root' );
+$agent->field( 'pass' => 'password' );
+# the field isn't named, so we have to click link 0
+$agent->click(0);
+is($agent->{'status'}, 200, "Fetched the page ok");
+ok( $agent->{'content'} =~ /Logout/i, "Found a logout link");
+
+
+use File::Find;
+find ( \&wanted , 'html/');
+
+sub wanted {
+        -f  && /\.html$/ && $_ !~ /Logout.html$/  && test_get($File::Find::name);
+}       
+
+sub test_get {
+        my $file = shift;
+
+
+        $file =~ s#^html/##; 
+        ok ($agent->get("$url/$file", "GET $url/$file"));
+        is ($agent->{'status'}, 200, "Loaded $file");
+#        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
+        ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");
+        ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
+        
+}
+
+# }}}
+
+1;

Modified: rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL/sbin/rt-test-dependencies.in	Mon Mar 28 05:33:39 2005
@@ -162,6 +162,8 @@
 Storable 2.08
 Apache::Session 1.53
 XML::RSS
+HTTP::Server::Simple 0.07
+HTTP::Server::Simple::Mason 0.03
 .
 
 $deps{'MAILGATE'} = [ _( << '.') ];


More information about the Rt-commit mailing list