diff options
author | jocuri%softhome.net <> | 2005-01-17 05:27:24 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2005-01-17 05:27:24 +0100 |
commit | 698c612d21b422d02797dbf30c8bdef2bc0bb9ad (patch) | |
tree | 0b50a27a6b2ac30886bf285b4cb6c6deb6a1c08d | |
parent | c3274f47d71e1526d9dbe33b158b1e4e8dd272f6 (diff) | |
download | bugzilla-698c612d21b422d02797dbf30c8bdef2bc0bb9ad.tar.gz bugzilla-698c612d21b422d02797dbf30c8bdef2bc0bb9ad.tar.xz |
Patch for bug 276842: Move @default_column_list out of globals.pl into Bugzilla/Constants.pm; patch by Max K-A <mkanat@kerio.com>, r=vladd, a=myk.
-rw-r--r-- | Bugzilla/Constants.pm | 8 | ||||
-rwxr-xr-x | buglist.cgi | 3 | ||||
-rwxr-xr-x | colchange.cgi | 6 | ||||
-rw-r--r-- | globals.pl | 4 |
4 files changed, 12 insertions, 9 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 284506e15..7e22ed2f7 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -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; diff --git a/buglist.cgi b/buglist.cgi index 4286f81f4..2c194d5a6 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -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 diff --git a/colchange.cgi b/colchange.cgi index 8e2fc2d49..d84ee5404 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -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; diff --git a/globals.pl b/globals.pl index 00a44af7a..095ada57d 100644 --- a/globals.pl +++ b/globals.pl @@ -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; |