From d3808460a656030ebf18cf57866c00d3c50aa08e Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sun, 7 Sep 2008 08:28:45 +0000 Subject: [PATCH] Protection form: Show action as header of an action if the message for this action does not exist. --- includes/ProtectionForm.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 .= " -- 2.20.1