(bug 12716) Unprotecting a non-protected page leaves a log entry

This commit is contained in:
Roan Kattouw 2008-01-21 15:04:49 +00:00
parent bdc29a8758
commit 46777363ad
2 changed files with 8 additions and 7 deletions

View 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 ==

View 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',