Followup r87340: Post-hook swap bodytext into a new bodycontent key and append printf...
[lhc/web/wiklou.git] / includes / ProtectionForm.php
index 2adedb7..cac3025 100644 (file)
@@ -357,7 +357,7 @@ class ProtectionForm {
                        $msg = wfMessage( 'restriction-' . $action );
                        $out .= "<tr><td>".
                        Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', null, $msg->exists() ? $action : $msg->text() ) .
+                       Xml::element( 'legend', null, $msg->exists() ? $msg->text() : $action ) .
                        Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) .
                                "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>";
 
@@ -375,9 +375,9 @@ class ProtectionForm {
 
                        $expiryFormOptions = '';
                        if ( $this->mExistingExpiry[$action] && $this->mExistingExpiry[$action] != 'infinity' ) {
-                               $timestamp = $wgLang->timeanddate( $this->mExistingExpiry[$action] );
-                               $d = $wgLang->date( $this->mExistingExpiry[$action] );
-                               $t = $wgLang->time( $this->mExistingExpiry[$action] );
+                               $timestamp = $wgLang->timeanddate( $this->mExistingExpiry[$action], true );
+                               $d = $wgLang->date( $this->mExistingExpiry[$action], true );
+                               $t = $wgLang->time( $this->mExistingExpiry[$action], true );
                                $expiryFormOptions .=
                                        Xml::option(
                                                wfMsg( 'protect-existing-expiry', $timestamp, $d, $t ),
@@ -569,7 +569,7 @@ class ProtectionForm {
                        return wfMsg( 'protect-default' );
                } else {
                        $msg = wfMessage( "protect-level-{$permission}" );
-                       if( !$msg->exists() ) {
+                       if( $msg->exists() ) {
                                return $msg->text();
                        }
                        return wfMsg( 'protect-fallback', $permission );