Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php |
— | — | @@ -536,14 +536,15 @@ |
537 | 537 | function showForm( $wgRequest ) { |
538 | 538 | global $wgOut, $wgTitle, $wgScript; |
539 | 539 | |
540 | | - $encPage = str_replace( '_', ' ', $this->target ); |
| 540 | + $pageName = str_replace( '_', ' ', $this->target ); |
541 | 541 | |
542 | | - $form = "<form name='stableversions' action='$wgScript' method='get'>"; |
| 542 | + $form = Xml::openElement( 'form', |
| 543 | + array( 'name' => 'stableversions', 'action' => $wgScript, 'method' => 'get' ) ); |
543 | 544 | $form .= "<fieldset><legend>".wfMsg('stableversions-leg1')."</legend>"; |
544 | 545 | $form .= "<table><tr>"; |
545 | 546 | $form .= "<td>".Xml::hidden( 'title', $wgTitle->getPrefixedText() )."</td>"; |
546 | 547 | $form .= "<td>".wfMsgHtml("stableversions-page")."</td>"; |
547 | | - $form .= "<td>".Xml::input('page', 40, $encPage, array( 'id' => 'page' ) )."</td>"; |
| 548 | + $form .= "<td>".Xml::input('page', 40, $pageName, array( 'id' => 'page' ) )."</td>"; |
548 | 549 | $form .= "<td>".wfSubmitButton( wfMsgHtml( 'go' ) )."</td>"; |
549 | 550 | $form .= "</tr></table>"; |
550 | 551 | $form .= "</fieldset></form>\n"; |
— | — | @@ -900,13 +901,13 @@ |
901 | 902 | function showForm( $wgRequest ) { |
902 | 903 | global $wgOut, $wgTitle, $wgScript; |
903 | 904 | |
904 | | - $encPage = str_replace( '_', ' ', $this->target ); |
905 | | - $form = "<form name='stabilization' action='$wgScript' method='get'>"; |
| 905 | + $pageName = str_replace( '_', ' ', $this->target ); |
| 906 | + $form = Xml::openElement( 'form', array( 'name' => 'stablization', 'action' => $wgScript, 'method' => 'get' ) ); |
906 | 907 | $form .= "<fieldset><legend>".wfMsg('stabilization-leg')."</legend>"; |
907 | 908 | $form .= "<table><tr>"; |
908 | 909 | $form .= "<td>".Xml::hidden( 'title', $wgTitle->getPrefixedText() )."</td>"; |
909 | 910 | $form .= "<td>".wfMsgHtml("stabilization-page")."</td>"; |
910 | | - $form .= "<td>".Xml::input('page', 40, $encPage, array( 'id' => 'page' ) )."</td>"; |
| 911 | + $form .= "<td>".Xml::input('page', 40, $pageName, array( 'id' => 'page' ) )."</td>"; |
911 | 912 | $form .= "<td>".wfSubmitButton( wfMsgHtml( 'go' ) )."</td>"; |
912 | 913 | $form .= "</tr></table>"; |
913 | 914 | $form .= "</fieldset></form>\n"; |
— | — | @@ -924,8 +925,8 @@ |
925 | 926 | } |
926 | 927 | // Get visiblity settings... |
927 | 928 | $config = $wgFlaggedRevs->getVisibilitySettings( $this->page, true ); |
928 | | - $encselect = $this->select ? $this->select : $config['select']; |
929 | | - $encoverride = $this->override ? $this->override : $config['override']; |
| 929 | + $selectSetting = $this->select ? $this->select : $config['select']; |
| 930 | + $overrideSetting = $this->override ? $this->override : $config['override']; |
930 | 931 | |
931 | 932 | if( !$this->isAllowed ) { |
932 | 933 | $form = '<p>'.wfMsgExt( 'stabilization-perm', array('parse'), $this->page->getPrefixedText() ).'</p>'; |
— | — | @@ -935,23 +936,24 @@ |
936 | 937 | $off = array(); |
937 | 938 | } |
938 | 939 | |
939 | | - $form .= "<form name='stabilization' action='$wgScript' method='post'>"; |
| 940 | + $form .= Xml::openElement( 'form', |
| 941 | + array( 'name' => 'stabilization', 'action' => $wgScript, 'method' => 'post' ) ); |
940 | 942 | $form .= "<fieldset><legend>".wfMsg('stabilization-select')."</legend>"; |
941 | 943 | $form .= "<table><tr>"; |
942 | 944 | |
943 | | - $form .= "<td>".Xml::radio( 'select', 0, (0==$encselect), array('id' => 'select1') + $off )."</td>"; |
| 945 | + $form .= "<td>".Xml::radio( 'select', 0, (0==$selectSetting), array('id' => 'select1') + $off )."</td>"; |
944 | 946 | $form .= "<td>".Xml::label( wfMsg('stabilization-select1'), 'select1' )."</td>"; |
945 | 947 | $form .= "</tr><tr>"; |
946 | | - $form .= "<td>".Xml::radio( 'select', 1, (1==$encselect), array('id' => 'select2') + $off )."</td>"; |
| 948 | + $form .= "<td>".Xml::radio( 'select', 1, (1==$selectSetting), array('id' => 'select2') + $off )."</td>"; |
947 | 949 | $form .= "<td>".Xml::label( wfMsg('stabilization-select2'), 'select2' )."</td>"; |
948 | 950 | $form .= "</tr></table></fieldset>"; |
949 | 951 | |
950 | 952 | $form .= "<fieldset><legend>".wfMsg('stabilization-def')."</legend>"; |
951 | 953 | $form .= "<table><tr>"; |
952 | | - $form .= "<td>".Xml::radio( 'override', 1, (1==$encoverride), array('id' => 'default1') + $off)."</td>"; |
| 954 | + $form .= "<td>".Xml::radio( 'override', 1, (1==$overrideSetting), array('id' => 'default1') + $off)."</td>"; |
953 | 955 | $form .= "<td>".Xml::label( wfMsg('stabilization-def1'), 'default1' )."</td>"; |
954 | 956 | $form .= "</tr><tr>"; |
955 | | - $form .= "<td>".Xml::radio( 'override', 0, (0==$encoverride), array('id' => 'default2') + $off)."</td>"; |
| 957 | + $form .= "<td>".Xml::radio( 'override', 0, (0==$overrideSetting), array('id' => 'default2') + $off)."</td>"; |
956 | 958 | $form .= "<td>".Xml::label( wfMsg('stabilization-def2'), 'default2' )."</td>"; |
957 | 959 | $form .= "</tr></table></fieldset>"; |
958 | 960 | if( $this->isAllowed ) { |