From b9b85843572bf283f48285001e276ba7e61b63f6 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 22 Feb 2009 13:37:51 +0100 Subject: updated to MediaWiki 1.14.0 --- includes/specials/SpecialProtectedtitles.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'includes/specials/SpecialProtectedtitles.php') diff --git a/includes/specials/SpecialProtectedtitles.php b/includes/specials/SpecialProtectedtitles.php index 2ec68a66..7e8126d9 100644 --- a/includes/specials/SpecialProtectedtitles.php +++ b/includes/specials/SpecialProtectedtitles.php @@ -16,7 +16,6 @@ class ProtectedTitlesForm { function showList( $msg = '' ) { global $wgOut, $wgRequest; - $wgOut->setPagetitle( wfMsg( "protectedtitles" ) ); if ( "" != $msg ) { $wgOut->setSubtitle( $msg ); } @@ -75,7 +74,7 @@ class ProtectedTitlesForm { if ( $row->pt_expiry != 'infinity' && strlen($row->pt_expiry) ) { $expiry = Block::decodeExpiry( $row->pt_expiry ); - $expiry_description = wfMsgForContent( 'protect-expiring', $wgLang->timeanddate( $expiry ) ); + $expiry_description = wfMsg( 'protect-expiring', $wgLang->timeanddate( $expiry ) , $wgLang->date( $expiry ) , $wgLang->time( $expiry ) ); $description_items[] = $expiry_description; } @@ -102,7 +101,7 @@ class ProtectedTitlesForm { Xml::element( 'legend', array(), wfMsg( 'protectedtitles' ) ) . Xml::hidden( 'title', $special ) . " \n" . $this->getNamespaceMenu( $namespace ) . " \n" . - // $this->getLevelMenu( $level ) . "
\n" . + $this->getLevelMenu( $level ) . " \n" . " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . ""; } @@ -137,7 +136,10 @@ class ProtectedTitlesForm { $m[$text] = $type; } } - + // Is there only one level (aside from "all")? + if( count($m) <= 2 ) { + return ''; + } // Third pass generates sorted XHTML content foreach( $m as $text => $type ) { $selected = ($type == $pr_level ); @@ -190,7 +192,8 @@ class ProtectedtitlesPager extends AlphabeticPager { function getQueryInfo() { $conds = $this->mConds; $conds[] = 'pt_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ); - + if( $this->level ) + $conds['pt_create_perm'] = $this->level; if( !is_null($this->namespace) ) $conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace ); return array( -- cgit v1.2.3-54-g00ecf