From 22f1d1c4c2c0cb0afccc86c41b6621be0d4bab1f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 10 Jan 2008 23:13:45 +0000 Subject: [PATCH] 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. --- includes/SkinTemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 09457ffc18..2e52142be1 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -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'), -- 2.20.1