diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/WatchedItem.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/WatchedItem.php')
-rw-r--r-- | includes/WatchedItem.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index d1c15296..dd6e247b 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -84,6 +84,8 @@ class WatchedItem { * @return bool */ public function removeWatch() { + wfProfileIn( __METHOD__ ); + $success = false; $dbw = wfGetDB( DB_MASTER ); $dbw->delete( 'watchlist', @@ -112,6 +114,8 @@ class WatchedItem { if ( $dbw->affectedRows() ) { $success = true; } + + wfProfileOut( __METHOD__ ); return $success; } @@ -143,14 +147,13 @@ class WatchedItem { ); # Construct array to replace into the watchlist $values = array(); - while ( $s = $dbw->fetchObject( $res ) ) { + foreach ( $res as $s ) { $values[] = array( 'wl_user' => $s->wl_user, 'wl_namespace' => $newnamespace, 'wl_title' => $newtitle ); } - $dbw->freeResult( $res ); if( empty( $values ) ) { // Nothing to do |