From 12f3e5d28adc4a30b2f4d52dc97358cf321ba15e Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 1 Aug 2007 21:42:59 +0000 Subject: [PATCH] (bug 10769) Database::update() should return boolean result --- RELEASE-NOTES | 1 + includes/Database.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b97f3c6450..543828731a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -342,6 +342,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN used in redirects (i.e. they now work) * (bug 8878) Changes to $dateFormats in German localization (removing unused, nonexistent formats, putting time after date) +* (bug 10769) Database::update() should return boolean result == API changes since 1.10 == diff --git a/includes/Database.php b/includes/Database.php index ebb4b2541a..e0969f2c73 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -1495,6 +1495,7 @@ class Database { * (for the log) * @param array $options An array of UPDATE options, can be one or * more of IGNORE, LOW_PRIORITY + * @return bool */ function update( $table, $values, $conds, $fname = 'Database::update', $options = array() ) { $table = $this->tableName( $table ); @@ -1503,7 +1504,7 @@ class Database { if ( $conds != '*' ) { $sql .= " WHERE " . $this->makeList( $conds, LIST_AND ); } - $this->query( $sql, $fname ); + return $this->query( $sql, $fname ); } /** -- 2.20.1