r23824 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23823‎ | r23824 | r23825 >
Date:04:53, 7 July 2007
Author:robchurch
Status:old
Tags:
Comment:
* Coding conventions
* Fix profiling breakage
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1001,22 +1001,14 @@
10021002 *
10031003 * @return boolean
10041004 */
1005 - public function isNamespaceProtected( ) {
 1005+ public function isNamespaceProtected() {
10061006 global $wgNamespaceProtection, $wgUser;
1007 -
1008 - $fname = 'Title::isNamespaceProtected';
1009 -
1010 - if ( array_key_exists( $this->mNamespace, $wgNamespaceProtection ) ) {
1011 - $nsProt = $wgNamespaceProtection[ $this->mNamespace ];
1012 - if ( !is_array($nsProt) ) $nsProt = array($nsProt);
1013 - foreach( $nsProt as $right ) {
1014 - if( '' != $right && !$wgUser->isAllowed( $right ) ) {
1015 - wfProfileOut( $fname );
 1007+ if( isset( $wgNamespaceProtection[ $this->mNamespace ] ) ) {
 1008+ foreach( (array)$wgNamespaceProtection[ $this->mNamespace ] as $right ) {
 1009+ if( $right != '' && !$wgUser->isAllowed( $right ) )
10161010 return true;
1017 - }
10181011 }
10191012 }
1020 -
10211013 return false;
10221014 }
10231015

Follow-up revisions

RevisionCommit summaryAuthorDate
r23912Merged revisions 23662-23909 via svnmerge from...david18:11, 9 July 2007

Status & tagging log