* MySQL 5.0 strict mode fix for moving unwatched pages
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Oct 2005 06:26:16 +0000 (06:26 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Oct 2005 06:26:16 +0000 (06:26 +0000)
It was doing an empty REPLACE, which apparently is unpopular.

RELEASE-NOTES
includes/WatchedItem.php

index 9ce790b..e132b2f 100644 (file)
@@ -180,6 +180,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Fail gracefully on invalid namespace in Special:Newpages
 * (bug 3806) Gracefully fall back to client-side scaling on |thumb| image
   that passes $wgMaxImageArea
+* MySQL 5.0 strict mode fix for moving unwatched pages
 
 
 === Caveats ===
index fbbc366..2b01a31 100644 (file)
@@ -160,6 +160,11 @@ class WatchedItem {
                        );
                }
                $dbw->freeResult( $res );
+               
+               if( empty( $values ) ) {
+                       // Nothing to do
+                       return true;
+               }
 
                # Perform replace
                # Note that multi-row replace is very efficient for MySQL but may be inefficient for