Commit 698c612d authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 276842: Move @default_column_list out of globals.pl into…

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.
parent c3274f47
...@@ -61,6 +61,8 @@ use base qw(Exporter); ...@@ -61,6 +61,8 @@ use base qw(Exporter);
GROUP_MEMBERSHIP GROUP_MEMBERSHIP
GROUP_BLESS GROUP_BLESS
GROUP_VISIBLE GROUP_VISIBLE
DEFAULT_COLUMN_LIST
); );
@Bugzilla::Constants::EXPORT_OK = qw(contenttypes); @Bugzilla::Constants::EXPORT_OK = qw(contenttypes);
...@@ -199,4 +201,10 @@ use constant GROUP_MEMBERSHIP => 0; ...@@ -199,4 +201,10 @@ use constant GROUP_MEMBERSHIP => 0;
use constant GROUP_BLESS => 1; use constant GROUP_BLESS => 1;
use constant GROUP_VISIBLE => 2; 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; 1;
...@@ -44,7 +44,6 @@ require "CGI.pl"; ...@@ -44,7 +44,6 @@ require "CGI.pl";
use vars qw($db_name use vars qw($db_name
@components @components
@default_column_list
$defaultqueryname $defaultqueryname
@legal_keywords @legal_keywords
@legal_platform @legal_platform
...@@ -513,7 +512,7 @@ elsif (defined $cgi->cookie('COLUMNLIST')) { ...@@ -513,7 +512,7 @@ elsif (defined $cgi->cookie('COLUMNLIST')) {
} }
else { else {
# Use the default list of columns. # 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 # Weed out columns that don't actually exist to prevent the user
......
...@@ -33,7 +33,7 @@ use vars qw( ...@@ -33,7 +33,7 @@ use vars qw(
); );
use Bugzilla; use Bugzilla;
use Bugzilla::Constants;
require "CGI.pl"; require "CGI.pl";
Bugzilla->login(); Bugzilla->login();
...@@ -88,7 +88,7 @@ my @collist; ...@@ -88,7 +88,7 @@ my @collist;
if (defined $cgi->param('rememberedquery')) { if (defined $cgi->param('rememberedquery')) {
my $splitheader = 0; my $splitheader = 0;
if (defined $cgi->param('resetit')) { if (defined $cgi->param('resetit')) {
@collist = @::default_column_list; @collist = DEFAULT_COLUMN_LIST;
} else { } else {
foreach my $i (@masterlist) { foreach my $i (@masterlist) {
if (defined $cgi->param("column_$i")) { if (defined $cgi->param("column_$i")) {
...@@ -133,7 +133,7 @@ if (defined $cgi->param('rememberedquery')) { ...@@ -133,7 +133,7 @@ if (defined $cgi->param('rememberedquery')) {
if (defined $cgi->cookie('COLUMNLIST')) { if (defined $cgi->cookie('COLUMNLIST')) {
@collist = split(/ /, $cgi->cookie('COLUMNLIST')); @collist = split(/ /, $cgi->cookie('COLUMNLIST'));
} else { } else {
@collist = @::default_column_list; @collist = DEFAULT_COLUMN_LIST;
} }
$vars->{'collist'} = \@collist; $vars->{'collist'} = \@collist;
......
...@@ -110,10 +110,6 @@ $::unconfirmedstate = "UNCONFIRMED"; ...@@ -110,10 +110,6 @@ $::unconfirmedstate = "UNCONFIRMED";
#} #}
#$::SIG{__DIE__} = \&die_with_dignity; #$::SIG{__DIE__} = \&die_with_dignity;
@::default_column_list = ("bug_severity", "priority", "rep_platform",
"assigned_to", "bug_status", "resolution",
"short_short_desc");
sub AppendComment { sub AppendComment {
my ($bugid, $who, $comment, $isprivate, $timestamp, $work_time) = @_; my ($bugid, $who, $comment, $isprivate, $timestamp, $work_time) = @_;
$work_time ||= 0; $work_time ||= 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment