r29565 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29564‎ | r29565 | r29566 >
Date:23:13, 10 January 2008
Author:aaron
Status:old
Tags:
Comment:
Don't call getTitleProtection(). That is really just an internal function for a DB query. It shouldn't even by public as it is. Just check 'create' restrictions. This is where they are saved too.
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -765,7 +765,7 @@
766766 }
767767
768768 if ( $this->mTitle->getNamespace() !== NS_MEDIAWIKI && $wgUser->isAllowed( 'protect' ) ) {
769 - if(!is_array($this->mTitle->getTitleProtection())){
 769+ if( !is_array( $this->mTitle->getRestrictions('create') ) ) {
770770 $content_actions['protect'] = array(
771771 'class' => ($action == 'protect') ? 'selected' : false,
772772 'text' => wfMsg('protect'),

Follow-up revisions

RevisionCommit summaryAuthorDate
r29572Redo r29565, but as far as I see working now. :)...brion04:55, 11 January 2008

Status & tagging log