From fab5d3a38aadaed1e6153c0fbd820449258586b2 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 3 Oct 2008 06:30:38 +0000 Subject: Bug 455641: Implement Bugzilla::Field::Choice->update and have editvalues.cgi use it Patch By Max Kanat-Alexander r=bbaetz, a=mkanat --- Bugzilla/Object.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Bugzilla/Object.pm') diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index bcd436484..cde440b95 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -283,6 +283,10 @@ sub update { $dbh->bz_commit_transaction(); + if (wantarray) { + return (\%changes, $old_self); + } + return \%changes; } @@ -703,6 +707,8 @@ updated, and they will only be updated if their values have changed. =item B +B + A hashref showing what changed during the update. The keys are the column names from L. If a field was not changed, it will not be in the hash at all. If the field was changed, the key will point to an arrayref. @@ -711,6 +717,13 @@ will be the new value. If there were no changes, we return a reference to an empty hash. +B + +Returns a list, where the first item is the above hashref. The second item +is the object as it was in the database before update() was called. (This +is mostly useful to subclasses of C that are implementing +C.) + =back =back -- cgit v1.2.3-24-g4f1b