From: Rotem Liss Date: Sun, 7 Sep 2008 08:28:45 +0000 (+0000) Subject: Protection form: Show action as header of an action if the message for this action... X-Git-Tag: 1.31.0-rc.0~45424 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=d3808460a656030ebf18cf57866c00d3c50aa08e;p=lhc%2Fweb%2Fwiklou.git Protection form: Show action as header of an action if the message for this action does not exist. --- diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 738d55da99..f6910621e0 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -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 .= "$label"; } $out .= "