Fix PHP Notice: Use of Title::userCanRead was deprecated in MediaWiki 1.19. [Called...
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 13 Dec 2011 10:47:31 +0000 (10:47 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 13 Dec 2011 10:47:31 +0000 (10:47 +0000)
in consequence of r105985

includes/specials/SpecialSearch.php

index 022744f..c2fac94 100644 (file)
@@ -546,7 +546,7 @@ class SpecialSearch extends SpecialPage {
                //If page content is not readable, just return the title.
                //This is not quite safe, but better than showing excerpts from non-readable pages
                //Note that hiding the entry entirely would screw up paging.
                //If page content is not readable, just return the title.
                //This is not quite safe, but better than showing excerpts from non-readable pages
                //Note that hiding the entry entirely would screw up paging.
-               if( !$t->userCanRead() ) {
+               if( !$t->userCan( 'read' ) ) {
                        wfProfileOut( __METHOD__ );
                        return "<li>{$link}</li>\n";
                }
                        wfProfileOut( __METHOD__ );
                        return "<li>{$link}</li>\n";
                }