r106008 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106007‎ | r106008 | r106009 >
Date:10:47, 13 December 2011
Author:raymond
Status:ok
Tags:
Comment:
Fix PHP Notice: Use of Title::userCanRead was deprecated in MediaWiki 1.19. [Called from SpecialSearch::showHit in /www/w/includes/specials/SpecialSearch.php at line 549] in /www/w/includes/GlobalFunctions.php on line 3520
in consequence of r105985
Modified paths:
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -546,7 +546,7 @@
547547 //If page content is not readable, just return the title.
548548 //This is not quite safe, but better than showing excerpts from non-readable pages
549549 //Note that hiding the entry entirely would screw up paging.
550 - if( !$t->userCanRead() ) {
 550+ if( !$t->userCan( 'read' ) ) {
551551 wfProfileOut( __METHOD__ );
552552 return "<li>{$link}</li>\n";
553553 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105985add missing deprecation notices and added deprecation version to existing onesjeroendedauw05:19, 13 December 2011

Status & tagging log