[Rt-commit] [svn] r1669 - in rt/branches/3.3-TESTING: . etc lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Wed Oct 20 15:20:00 EDT 2004


Author: jesse
Date: Wed Oct 20 15:19:59 2004
New Revision: 1669

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/etc/RT_Config.pm.in
   rt/branches/3.3-TESTING/lib/RT/Queue_Overlay.pm
Log:
 r6055 at tinbook:  jesse | 2004-10-20T18:56:31.219026Z
 RT-Ticket: 5569
 RT-Status: resolved
 
 Status is nowdefinablein the RT_Config file.
 


Modified: rt/branches/3.3-TESTING/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.3-TESTING/etc/RT_Config.pm.in	(original)
+++ rt/branches/3.3-TESTING/etc/RT_Config.pm.in	Wed Oct 20 15:19:59 2004
@@ -421,4 +421,15 @@
 
 # }}}
 
+# {{{ Miscellaneous RT Settings
+
+# You can define new statuses and even reorder existing statuses here.
+# WARNING. DO NOT DELETE ANY OF THE DEFAULT STATUSES. If you do, RT
+# will break horribly.
+
+ at ActiveStatus = qw(new open stalled) unless @ActiveStatus;
+ at InactiveStatus = qw(resolved rejected deleted) unless @InactiveStatus;
+
+# }}}
+
 1;

Modified: rt/branches/3.3-TESTING/lib/RT/Queue_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Queue_Overlay.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Queue_Overlay.pm	Wed Oct 20 15:19:59 2004
@@ -67,15 +67,14 @@
 use strict;
 no warnings qw(redefine);
 
-use vars qw(@STATUS @ACTIVE_STATUS @INACTIVE_STATUS $RIGHTS);
+use vars qw(@DEFAULT_ACTIVE_STATUS @DEFAULT_INACTIVE_STATUS $RIGHTS);
+
 use RT::Groups;
 use RT::ACL;
 use RT::Interface::Email;
 
-
- at ACTIVE_STATUS = qw(new open stalled);
- at INACTIVE_STATUS = qw(resolved rejected deleted);
- at STATUS = (@ACTIVE_STATUS, @INACTIVE_STATUS);
+ at DEFAULT_ACTIVE_STATUS = qw(new open stalled);+
+ at DEFAULT_INACTIVE_STATUS = qw(resolved rejected deleted);  
 
 # $self->loc('new'); # For the string extractor to get a string to localize
 # $self->loc('open'); # For the string extractor to get a string to localize
@@ -180,7 +179,12 @@
 
 sub ActiveStatusArray {
     my $self = shift;
-    return (@ACTIVE_STATUS);
+    if (@RT::ActiveStatus) {
+    	return (@RT::ActiveStatus)
+    } else {
+        $RT::Logger->warn("RT::ActiveStatus undefined, falling back to deprecated defaults");
+        return (@DEFAULT_ACTIVE_STATUS);
+    }
 }
 
 # }}}
@@ -195,7 +199,12 @@
 
 sub InactiveStatusArray {
     my $self = shift;
-    return (@INACTIVE_STATUS);
+    if (@RT::InactiveStatus) {
+    	return (@RT::InactiveStatus)
+    } else {
+        $RT::Logger->warn("RT::InactiveStatus undefined, falling back to deprecated defaults");
+        return (@DEFAULT_INACTIVE_STATUS);
+    }
 }
 
 # }}}
@@ -210,7 +219,7 @@
 
 sub StatusArray {
     my $self = shift;
-    return (@STATUS);
+    return ($self->ActiveStatusArray(), $self->InactiveStatusArray());
 }
 
 # }}}


More information about the Rt-commit mailing list