From: Chad Horohoe Date: Thu, 3 Jul 2008 05:25:38 +0000 (+0000) Subject: bug 12716 - trying to unprotect a title that isn't protected no longer generates... X-Git-Tag: 1.31.0-rc.0~46783 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9f45fc563f447da127241aa900e69a1e0d5e917a;p=lhc%2Fweb%2Fwiklou.git bug 12716 - trying to unprotect a title that isn't protected no longer generates a log entry. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 23c776b40c..5cec8db2c9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -410,6 +410,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN account creation. * (bug 3481) Pages moved shortly after creation are shown at their new title on Special:Newpages. +* (bug 12716) Trying to unprotect a title that isn't protected no longer + generates a log entry. === API changes in 1.13 === diff --git a/includes/Title.php b/includes/Title.php index 1b0512bbea..3698791deb 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1358,6 +1358,11 @@ class Title { $dbw->delete( 'protected_titles', array( 'pt_namespace' => $namespace, 'pt_title' => $title ), __METHOD__ ); } + if($dbw->affectedRows() == 0) { + //No Change + return true; + } + # Update the protection log $log = new LogPage( 'protect' );