r64358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64357‎ | r64358 | r64359 >
Date:19:45, 29 March 2010
Author:churchofemacs
Status:ok
Tags:
Comment:
(bug 22627) Remove PHP notice when deleting a page only hidden users edited.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2545,13 +2545,17 @@
25462546
25472547 $hasHistory = ( $res->numRows() > 1 );
25482548 $row = $dbw->fetchObject( $res );
2549 - $onlyAuthor = $row->rev_user_text;
2550 - // Try to find a second contributor
2551 - foreach ( $res as $row ) {
2552 - if ( $row->rev_user_text != $onlyAuthor ) {
2553 - $onlyAuthor = false;
2554 - break;
 2549+ if ( $row ) { // $row is false if the only contributor is hidden
 2550+ $onlyAuthor = $row->rev_user_text;
 2551+ // Try to find a second contributor
 2552+ foreach ( $res as $row ) {
 2553+ if ( $row->rev_user_text != $onlyAuthor ) { // Bug 22999
 2554+ $onlyAuthor = false;
 2555+ break;
 2556+ }
25552557 }
 2558+ } else {
 2559+ $onlyAuthor = false;
25562560 }
25572561 $dbw->freeResult( $res );
25582562
Index: trunk/phase3/RELEASE-NOTES
@@ -66,6 +66,7 @@
6767 links with non-NFC character references work correctly.
6868 * (bug 22991) wgUserGroups JavaScript variable now reports * group for
6969 anonymous users instead of null.
 70+* (bug 22627) Remove PHP notice when deleting a page only hidden users edited.
7071
7172 == API changes in 1.17 ==
7273 * (bug 22738) Allow filtering by action type on query=logevent

Status & tagging log