From d9548f66b0f47af651f8fa62fa69cc7e65df0a60 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 16 Jun 2006 20:37:49 +0000 Subject: Bug 328438: Eliminate @::log_columns - Patch by Max Kanat-Alexander r=LpSolit a=myk --- Bugzilla/Bug.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 810b1daf9..aa5ad5a83 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -54,6 +54,7 @@ use base qw(Exporter); RemoveVotes CheckIfVotedConfirmed LogActivityEntry is_open_state + editable_bug_fields ); ##################################################################### @@ -731,6 +732,19 @@ sub AppendComment { $dbh->do("UPDATE bugs SET delta_ts = ? WHERE bug_id = ?", undef, $timestamp, $bugid); } + +# Represents which fields from the bugs table are handled by process_bug.cgi. +sub editable_bug_fields { + my @fields = Bugzilla->dbh->bz_table_columns('bugs'); + foreach my $remove ("bug_id", "creation_ts", "delta_ts", "lastdiffed") { + my $location = lsearch(\@fields, $remove); + splice(@fields, $location, 1); + } + # Sorted because the old @::log_columns variable, which this replaces, + # was sorted. + return sort(@fields); +} + # This method is private and is not to be used outside of the Bug class. sub EmitDependList { my ($myfield, $targetfield, $bug_id) = (@_); -- cgit v1.2.3-24-g4f1b