Protection form: Show action as header of an action if the message for this action...
authorRotem Liss <rotem@users.mediawiki.org>
Sun, 7 Sep 2008 08:28:45 +0000 (08:28 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Sun, 7 Sep 2008 08:28:45 +0000 (08:28 +0000)
includes/ProtectionForm.php

index 738d55d..f691062 100644 (file)
@@ -263,9 +263,13 @@ class ProtectionForm {
 
                foreach( $this->mRestrictions as $action => $required ) {
                        /* Not all languages have V_x <-> N_x relation */
+                       $msg = wfMsg( 'restriction-' . $action );
+                       if( wfEmptyMsg( 'restriction-' . $action, $msg ) ) {
+                               $msg = $action;
+                       }
                        $label = Xml::element( 'label',
                                        array( 'for' => "mwProtect-level-$action" ),
-                                       wfMsg( 'restriction-' . $action ) );
+                                       $msg );
                        $out .= "<th>$label</th>";
                }
                $out .= "</tr>