X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=7bad8b57accab4ff0a6df316e6ec14bbfe77eb65;hb=523c6c0e41159c073b6b44dd550878f42cbc847e;hp=35352d63e30e5b9fd4e6def1c07b849e3e330283;hpb=e58e025d4e0abd4a743925d81e034b41c10f4cb6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 35352d63e3..7bad8b57ac 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -384,13 +384,18 @@ class ProtectionForm { ); $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";