summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-10-03 08:30:38 +0200
committermkanat%bugzilla.org <>2008-10-03 08:30:38 +0200
commitfab5d3a38aadaed1e6153c0fbd820449258586b2 (patch)
tree2e1f8816d56aaf213fd9b4e6812b28ed3cbf8527 /Bugzilla/Object.pm
parent931bd3b651ccca832a618f7b28bbc35e503665d4 (diff)
downloadbugzilla-fab5d3a38aadaed1e6153c0fbd820449258586b2.tar.gz
bugzilla-fab5d3a38aadaed1e6153c0fbd820449258586b2.tar.xz
Bug 455641: Implement Bugzilla::Field::Choice->update and have editvalues.cgi use it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'Bugzilla/Object.pm')
-rw-r--r--Bugzilla/Object.pm13
1 files changed, 13 insertions, 0 deletions
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<Returns>
+B<In scalar context:>
+
A hashref showing what changed during the update. The keys are the column
names from L</UPDATE_COLUMNS>. 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<In array context:>
+
+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<Bugzilla::Object> that are implementing
+C<update>.)
+
=back
=back