r61600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61599‎ | r61600 | r61601 >
Date:20:32, 27 January 2010
Author:jdpond
Status:deferred
Tags:
Comment:
Allow whitelisting of Namespace protected files.
Modified paths:
  • /trunk/extensions/NSFileRepo/NSFileRepo.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NSFileRepo/NSFileRepo.php
@@ -247,6 +247,8 @@
248248 // If Extension:Lockdown has been activated (recommend), check individual namespace protection
249249
250250 function NSFileRepolockdownUserCan($title, $user, $action, &$result) {
 251+ global $wgWhitelistRead;
 252+ if (in_array($title->getPrefixedText(), $wgWhitelistRead)) return true;
251253 if (function_exists('lockdownUserCan')){
252254 if($title->getNamespace() == NS_FILE) {
253255 $ntitle = Title::newFromText($title->mDbkeyform);

Status & tagging log