[Rt-commit] [svn] r849 - in rt/trunk: . bin html/Admin/Queues lib lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Thu May 6 21:00:25 EDT 2004


Author: jesse
Date: Thu May  6 21:00:24 2004
New Revision: 849

Modified:
   rt/trunk/   (props changed)
   rt/trunk/bin/rt.in
   rt/trunk/html/Admin/Queues/Scrip.html
   rt/trunk/lib/RT.pm.in
   rt/trunk/lib/RT/Tickets_Overlay.pm
Log:
 ----------------------------------------------------------------------
 r1486 at tinbook:  jesse | 2004-05-07T00:49:12.363243Z
 
 Fix for proper display of ScripId on scrip edit from Ruslan
 ----------------------------------------------------------------------
 r1487 at tinbook:  jesse | 2004-05-07T00:49:29.125437Z
 
 Fix for search on Cc and AdminCc from Ruslan
 ----------------------------------------------------------------------
 r1488 at tinbook:  jesse | 2004-05-07T00:52:40.234557Z
 
 Fix for a false positive error about directory permissions when opening the rt logfile from Ruslan
 ----------------------------------------------------------------------
 r1489 at tinbook:  jesse | 2004-05-07T00:58:03.221505Z
 
  (#4638) cli cookie handling improved from Muncus
 ----------------------------------------------------------------------


Modified: rt/trunk/bin/rt.in
==============================================================================
--- rt/trunk/bin/rt.in	(original)
+++ rt/trunk/bin/rt.in	Thu May  6 21:00:24 2004
@@ -125,8 +125,9 @@
         my $title = $item->[2]{Title};
         my @titles = ref $title eq 'ARRAY' ? @$title : $title;
 
-        foreach $title (grep $_, @titles) {
-            $help{$title} = $item->[2]{Text};
+            foreach $title (grep $_, @titles) {
+                $help{$title} = $item->[2]{Text};
+            }
         }
     }
 
@@ -218,7 +219,7 @@
     }
     return help("list", $type) if $bad;
 
-    my $r = submit("$REST/search/$type", { query => $q, %data, orderby => $orderby || "" });
+    my $r = submit("$REST/search/$type", { query => $q, %data, orderby => $data{orderby} || "" });
     print $r->content;
 }
 
@@ -828,7 +829,7 @@
     sub cookie {
         my ($self) = @_;
         my $cookie = $self->{sids}{$s}{$u};
-        return defined $cookie ? "RT_SID=$cookie" : undef;
+        return defined $cookie ? "RT_SID_$cookie" : undef;
     }
 
     # Deletes the current session cookie.
@@ -851,7 +852,7 @@
         my ($self, $response) = @_;
         my $cookie = $response->header("Set-Cookie");
 
-        if (defined $cookie && $cookie =~ /^RT_SID=([0-9A-Fa-f]+);/) {
+        if (defined $cookie && $cookie =~ /^RT_SID_(.[^;,\s]+=[0-9A-Fa-f]+);/) {
             $self->{sids}{$s}{$u} = $1;
         }
     }
@@ -868,7 +869,7 @@
             while (<F>) {
                 chomp;
                 next if /^$/ || /^#/;
-                next unless m#^https?://[^ ]+ \w+ [0-9A-Fa-f]+$#;
+                next unless m#^https?://[^ ]+ \w+ [^;,\s]+=[0-9A-Fa-f]+$#;
                 my ($server, $user, $cookie) = split / /, $_;
                 $sids->{$server}{$user} = $cookie;
             }

Modified: rt/trunk/html/Admin/Queues/Scrip.html
==============================================================================
--- rt/trunk/html/Admin/Queues/Scrip.html	(original)
+++ rt/trunk/html/Admin/Queues/Scrip.html	Thu May  6 21:00:24 2004
@@ -51,7 +51,7 @@
 if ($id) {
     $current_subtab = "Admin/Queues/Scrip.html?id=".$id."&Queue=".$QueueObj->id;
     $title = loc("Modify a scrip for queue [_1]", $QueueObj->Name);
-    $subtabs->{"C"} = { title => loc("Scrip #[_1]",$QueueObj->id),
+    $subtabs->{"C"} = { title => loc("Scrip #[_1]",$id),
 			path => "Admin/Queues/Scrip.html?id=$id&Queue=".$QueueObj->id };
 } else {
     $current_subtab = "Admin/Queues/Scrip.html?create=1&Queue=".$QueueObj->id;

Modified: rt/trunk/lib/RT.pm.in
==============================================================================
--- rt/trunk/lib/RT.pm.in	(original)
+++ rt/trunk/lib/RT.pm.in	Thu May  6 21:00:24 2004
@@ -168,21 +168,23 @@
     $RT::Logger=Log::Dispatch->new();
     
     if ($RT::LogToFile) {
-
-    unless (-d $RT::LogDir && -w $RT::LogDir) {
-        # localizing here would be hard when we don't have a current user yet
-        # die $self->loc("Log directory [_1] not found or couldn't be written.\n RT can't run.", $RT::LogDir);
-        die ("Log directory $RT::LogDir not found or couldn't be written.\n RT can't run.");
-    }
-
-	my $filename;
+	my ($filename, $logdir);
 	if ($RT::LogToFileNamed =~ m![/\\]!) {
 	    # looks like an absolute path.
 	    $filename = $RT::LogToFileNamed;
+	    ($logdir) = $RT::LogToFileNamed =~ m!^(.*[/\\])!;
 	}
 	else {
 	    $filename = "$RT::LogDir/$RT::LogToFileNamed";
+	    $logdir = $RT::LogDir;
 	}
+
+    unless ( -d $logdir && ( ( -f $filename && -w $filename ) || -w $logdir ) ) {
+        # localizing here would be hard when we don't have a current user yet
+        # die $self->loc("Log directory [_1] not found or couldn't be written.\n RT can't run.", $RT::LogDir);
+        die ("Log file $filename couldn't be written or created.\n RT can't run.");
+    }
+
     require Log::Dispatch::File;
 
 

Modified: rt/trunk/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/trunk/lib/RT/Tickets_Overlay.pm	(original)
+++ rt/trunk/lib/RT/Tickets_Overlay.pm	Thu May  6 21:00:24 2004
@@ -101,8 +101,8 @@
     Filename        => ['TRANSFIELD',],
     TransactionDate => ['TRANSDATE',],
     Requestor       => ['WATCHERFIELD' => 'Requestor',],
-    CC              => ['WATCHERFIELD' => 'Cc',],
-    AdminCC         => ['WATCHERFIELD' => 'AdminCC',],
+    Cc              => ['WATCHERFIELD' => 'Cc',],
+    AdminCc         => ['WATCHERFIELD' => 'AdminCC',],
     Watcher	    => ['WATCHERFIELD'],
     LinkedTo	    => ['LINKFIELD',],
     CustomFieldValue =>['CUSTOMFIELD',],


More information about the Rt-commit mailing list