summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialProtectedtitles.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialProtectedtitles.php')
-rw-r--r--includes/specials/SpecialProtectedtitles.php13
1 files changed, 8 insertions, 5 deletions
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 ) . "<br/>\n" .
+ $this->getLevelMenu( $level ) . "&nbsp;\n" .
"&nbsp;" . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
"</fieldset></form>";
}
@@ -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(