Don't call getTitleProtection(). That is really just an internal function for a DB...
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 10 Jan 2008 23:13:45 +0000 (23:13 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 10 Jan 2008 23:13:45 +0000 (23:13 +0000)
includes/SkinTemplate.php

index 09457ff..2e52142 100644 (file)
@@ -765,7 +765,7 @@ class SkinTemplate extends Skin {
                                }
 
                                if ( $this->mTitle->getNamespace() !== NS_MEDIAWIKI && $wgUser->isAllowed( 'protect' ) ) {
-                                       if(!is_array($this->mTitle->getTitleProtection())){
+                                       if( !is_array( $this->mTitle->getRestrictions('create') ) ) {
                                                $content_actions['protect'] = array(
                                                        'class' => ($action == 'protect') ? 'selected' : false,
                                                        'text' => wfMsg('protect'),