]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 276842: Move @default_column_list out of globals.pl into Bugzilla/Const...
authorjocuri%softhome.net <>
Mon, 17 Jan 2005 04:27:24 +0000 (04:27 +0000)
committerjocuri%softhome.net <>
Mon, 17 Jan 2005 04:27:24 +0000 (04:27 +0000)
Bugzilla/Constants.pm
buglist.cgi
colchange.cgi
globals.pl

index 284506e15d8e99e914a27f37d74cd0c77c7670fd..7e22ed2f7305046cdd2dbe32c53e4418fdb4c9cc 100644 (file)
@@ -61,6 +61,8 @@ use base qw(Exporter);
     GROUP_MEMBERSHIP
     GROUP_BLESS
     GROUP_VISIBLE
+
+    DEFAULT_COLUMN_LIST
 );
 
 @Bugzilla::Constants::EXPORT_OK = qw(contenttypes);
@@ -199,4 +201,10 @@ use constant GROUP_MEMBERSHIP => 0;
 use constant GROUP_BLESS => 1;
 use constant GROUP_VISIBLE => 2;
 
+# The default list of columns for buglist.cgi
+use constant DEFAULT_COLUMN_LIST => (
+    "bug_severity", "priority", "rep_platform","assigned_to",
+    "bug_status", "resolution", "short_short_desc"
+);
+
 1;
index 4286f81f40ea9dbf12909759f239670f0a1171aa..2c194d5a6204af4e4694c54f0f39c29e300a7843 100755 (executable)
@@ -44,7 +44,6 @@ require "CGI.pl";
 
 use vars qw($db_name
             @components
-            @default_column_list
             $defaultqueryname
             @legal_keywords
             @legal_platform
@@ -513,7 +512,7 @@ elsif (defined $cgi->cookie('COLUMNLIST')) {
 }
 else {
     # Use the default list of columns.
-    @displaycolumns = @::default_column_list;
+    @displaycolumns = DEFAULT_COLUMN_LIST;
 }
 
 # Weed out columns that don't actually exist to prevent the user 
index 8e2fc2d49ad4ff5bbfdbc1ec6d7ca8ac059b539b..d84ee5404fb06ada465896e6f390cdd80727a998 100755 (executable)
@@ -33,7 +33,7 @@ use vars qw(
 );
 
 use Bugzilla;
-
+use Bugzilla::Constants;
 require "CGI.pl";
 
 Bugzilla->login();
@@ -88,7 +88,7 @@ my @collist;
 if (defined $cgi->param('rememberedquery')) {
     my $splitheader = 0;
     if (defined $cgi->param('resetit')) {
-        @collist = @::default_column_list;
+        @collist = DEFAULT_COLUMN_LIST;
     } else {
         foreach my $i (@masterlist) {
             if (defined $cgi->param("column_$i")) {
@@ -133,7 +133,7 @@ if (defined $cgi->param('rememberedquery')) {
 if (defined $cgi->cookie('COLUMNLIST')) {
     @collist = split(/ /, $cgi->cookie('COLUMNLIST'));
 } else {
-    @collist = @::default_column_list;
+    @collist = DEFAULT_COLUMN_LIST;
 }
 
 $vars->{'collist'} = \@collist;
index 00a44af7af0376d55276a91c900060aa6c805586..095ada57d6a77c5f42afeb6e68308169ecb26f8b 100644 (file)
@@ -110,10 +110,6 @@ $::unconfirmedstate = "UNCONFIRMED";
 #}
 #$::SIG{__DIE__} = \&die_with_dignity;
 
-@::default_column_list = ("bug_severity", "priority", "rep_platform", 
-                          "assigned_to", "bug_status", "resolution",
-                          "short_short_desc");
-
 sub AppendComment {
     my ($bugid, $who, $comment, $isprivate, $timestamp, $work_time) = @_;
     $work_time ||= 0;