(bug 12716) Unprotecting a non-protected page leaves a log entry
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 21 Jan 2008 15:04:49 +0000 (15:04 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 21 Jan 2008 15:04:49 +0000 (15:04 +0000)
RELEASE-NOTES
includes/Article.php

index 08567dc..454766a 100644 (file)
@@ -136,10 +136,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 10049) Prefix index search and namespaces in Special:Withoutinterwiki
 * (bug 12668) Support for custom iPhone bookmark icon via $wgAppleTouchIcon
 * Add option to include templates in Special:Export.
-* (bug 12655) Added $wgUserEmailUseReplyTo config option to put sender
-  address in Reply-To instead of From for user-to-user emails.
-  This protects against SPF problems and privacy-leaking bounce messages
-  when using mailers that set the envelope sender to the From header value.
 
 
 === Bug fixes in 1.12 ===
@@ -326,6 +322,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Creating a site with a name containing '#' is no longer permitted, since the
   name will not work (but $wgSiteName is not checked if manually set).
 * (bug 12695) Suppress dvips verbiage from web server error log
+* (bug 12716) Unprotecting a non-protected page leaves a log entry
 
 
 == Parser changes in 1.12 ==
index 824ccac..ce3e402 100644 (file)
@@ -1766,9 +1766,6 @@ class Article {
                                if ( $cascade )
                                        $comment .= "$cascade_description";
 
-                               $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true );
-                               $nullRevId = $nullRevision->insertOn( $dbw );
-
                                # Update restrictions table
                                foreach( $limit as $action => $restrictions ) {
                                        if ($restrictions != '' ) {
@@ -1781,6 +1778,13 @@ class Article {
                                                        'pr_type' => $action ), __METHOD__ );
                                        }
                                }
+                               if($dbw->affectedRows() == 0)
+                                       // No change
+                                       return true;
+
+                               # Insert a null revision
+                               $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true );
+                               $nullRevId = $nullRevision->insertOn( $dbw );
 
                                # Update page record
                                $dbw->update( 'page',