}
if ( $encodedExpiry != 'infinity' ) {
- $expiry_description = ' ' . wfMsgForContent( 'protect-expiring', $wgContLang->timeanddate( $expiry ) );
+ $expiry_description = ' (' . wfMsgForContent( 'protect-expiring', $wgContLang->timeanddate( $expiry ) ).')';
}
if( $protect ) {
$dbr =& wfGetDB( DB_SLAVE );
list( $page, $page_restrictions ) = $dbr->tableNamesN( 'page', 'page_restrictions' );
return "SELECT DISTINCT page_id, 'Protectedpages' as type, page_namespace AS namespace, page_title as title, " .
- "page_title AS value, pr_level " .
- "FROM $page LEFT JOIN $page_restrictions ON page_id = pr_page WHERE pr_level IS NOT NULL ";
+ "page_title AS value, pr_level, pr_expiry " .
+ "FROM $page LEFT JOIN $page_restrictions ON page_id = pr_page WHERE pr_level IS NOT NULL AND pr_user IS NULL ";
}
/**
$title = Title::makeTitleSafe( $result->namespace, $result->title );
$link = $skin->makeLinkObj( $title );
+ $description_items = array ();
+
$protType = wfMsg( 'restriction-level-' . $result->pr_level );
- return wfSpecialList( $link, $protType );
+ $description_items[] = $protType;
+
+ $expiry_description = '';
+
+ if ( $result->pr_expiry != 'infinity' && strlen($result->pr_expiry) ) {
+ $expiry = Block::decodeExpiry( $result->pr_expiry );
+
+ $expiry_description = wfMsgForContent( 'protect-expiring', $wgLang->timeanddate( $expiry ) );
+
+ $description_items[] = $expiry_description;
+ }
+
+ return wfSpecialList( $link, implode( $description_items, ', ' ) );
}
}
'protect-level-autoconfirmed' => 'Block unregistered users',
'protect-level-sysop' => 'Sysops only',
'protect-summary-cascade' => 'cascading',
-'protect-expiring' => '(expires $1)',
+'protect-expiring' => 'expires $1',
'protect-cascade' => 'Cascading protection - protect any pages included in this page.',
# restrictions (nouns)
'protect-level-autoconfirmed' => 'משתמשים רשומים בלבד',
'protect-level-sysop' => 'מפעילי מערכת בלבד',
'protect-summary-cascade' => 'מדורג',
-'protect-expiring' => '(פוקע $1)',
+'protect-expiring' => 'פוקע $1',
'protect-cascade' => 'הגנה מדורגת – הגן על כל הדפים המוכללים בדף זה.',
# Restrictions (nouns)