);
$expiryFormOptions = '';
- if ( $this->mExistingExpiry[$action] && $this->mExistingExpiry[$action] != 'infinity' ) {
- $timestamp = $lang->timeanddate( $this->mExistingExpiry[$action], true );
- $d = $lang->date( $this->mExistingExpiry[$action], true );
- $t = $lang->time( $this->mExistingExpiry[$action], true );
+ if ( $this->mExistingExpiry[$action] ) {
+ if ( $this->mExistingExpiry[$action] == 'infinity' ) {
+ $existingExpiryMessage = wfMessage( 'protect-existing-expiry-infinity' );
+ } else {
+ $timestamp = $lang->timeanddate( $this->mExistingExpiry[$action], true );
+ $d = $lang->date( $this->mExistingExpiry[$action], true );
+ $t = $lang->time( $this->mExistingExpiry[$action], true );
+ $existingExpiryMessage = wfMessage( 'protect-existing-expiry', $timestamp, $d, $t );
+ }
$expiryFormOptions .=
Xml::option(
- wfMessage( 'protect-existing-expiry', $timestamp, $d, $t )->text(),
+ $existingExpiryMessage->text(),
'existing',
$this->mExpirySelection[$action] == 'existing'
) . "\n";
"protect-othertime": "Other time:",
"protect-othertime-op": "other time",
"protect-existing-expiry": "Existing expiry time: $3, $2",
+ "protect-existing-expiry-infinity": "Existing expiry time: infinite",
"protect-otherreason": "Other/additional reason:",
"protect-otherreason-op": "Other reason",
"protect-dropdown": "*Common protection reasons\n** Excessive vandalism\n** Excessive spamming\n** Counter-productive edit warring\n** High traffic page",
"protect-cantedit": "Used as error message when changing the protection levels of the page.",
"protect-othertime": "Used on the page protection form as label for the following input field (text)\n{{Identical|Other time}}",
"protect-othertime-op": "Used on the page protection form in the drop down menu\n{{Identical|Other time}}",
- "protect-existing-expiry": "Shows the existing expiry time in the drop down menu of the protection form ([{{canonicalurl:User:Raymond/test|action=unprotect}} example])\n\nParameters:\n* $1 - (Unused) date and time of the existing expiry time (kept for backward compatibility purposes)\n* $2 - date of the existing expiry time\n* $3 - time of the existing expiry time",
+ "protect-existing-expiry": "Shows the existing expiry time in the drop down menu of the protection form ([{{canonicalurl:User:Raymond/test|action=unprotect}} example])\n\nParameters:\n* $1 - (Unused) date and time of the existing expiry time (kept for backward compatibility purposes)\n* $2 - date of the existing expiry time\n* $3 - time of the existing expiry time\n\nSee also:\n* {{msg-mw|protect-existing-expiry-infinity}}",
+ "protect-existing-expiry-infinity": "Shows the existing expiry time in the drop down menu of the protection form, in the special case that it is infinity\n\nSee also:\n* {{msg-mw|protect-existing-expiry}}",
"protect-otherreason": "Shown on the page protection form as label for the following input field (text)\n{{Identical|Other/additional reason}}",
"protect-otherreason-op": "Shown on the page protection form in the drop down menu\n{{Identical|Other reason}}",
"protect-dropdown": "Shown on the page protection form as drop down menu for protection reasons.\n\n* <code><nowiki>* Groupname</nowiki></code> - defines a new group\n* <code><nowiki>** Reason</nowiki></code> - defines a reason in this group",