r102886 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102885‎ | r102886 | r102887 >
Date:09:16, 13 November 2011
Author:ialex
Status:ok
Tags:
Comment:
Follow-up r102187: fixed two remaining hooks that were expecting 'read' to not be checked with getUserPermissionsErrors(Expensive)? hooks
Modified paths:
  • /trunk/extensions/Translate/tag/PageTranslationHooks.php (modified) (history)
  • /trunk/extensions/WikimediaIncubator/IncubatorTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/PageTranslationHooks.php
@@ -545,6 +545,10 @@
546546
547547 /// Hook: getUserPermissionsErrorsExpensive
548548 public static function lockedPagesCheck( Title $title, User $user, $action, &$result ) {
 549+ if ( $action == 'read' ) {
 550+ return true;
 551+ }
 552+
549553 $cache = wfGetCache( CACHE_ANYTHING );
550554 $key = wfMemcKey( 'pt-lock', $title->getPrefixedText() );
551555 // At least memcached mangles true to "1"
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php
@@ -309,6 +309,10 @@
310310 * @return Boolean
311311 */
312312 static function onGetUserPermissionsErrors( $title, $user, $action, &$result ) {
 313+ if ( $action == 'read' ) {
 314+ return true;
 315+ }
 316+
313317 $titletext = $title->getText();
314318 $prefixdata = self::analyzePrefix( $titletext );
315319

Follow-up revisions

RevisionCommit summaryAuthorDate
r105776MFT for WikimediaIncubator: r95582, r96122, r96138, r96141, r97175, r98670, r...siebrand00:32, 11 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102187* Merged Title::userCanRead() check in Title::getUserPermissionsErrors()...ialex19:59, 6 November 2011

Status & tagging log