r44839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44838‎ | r44839 | r44840 >
Date:09:32, 20 December 2008
Author:aaron
Status:deferred
Tags:
Comment:
Search & replace war on old wf* xml functions
Modified paths:
  • /trunk/extensions/AbuseFilter/SpecialAbuseLog.php (modified) (history)
  • /trunk/extensions/ActiveAbstract/AbstractFilter.php (modified) (history)
  • /trunk/extensions/ActiveAbstract/GoogleCoopFilter.php (modified) (history)
  • /trunk/extensions/Aggregator/Aggregator.php (modified) (history)
  • /trunk/extensions/AjaxTest/AjaxTestPage.php (modified) (history)
  • /trunk/extensions/AuthorProtect/AuthorProtect.php (modified) (history)
  • /trunk/extensions/BotQuery/query.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialMergeAccount.php (modified) (history)
  • /trunk/extensions/Cite/SpecialCite_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/RequestAccount_body.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/ConfirmEdit_body.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/FancyCaptcha.class.php (modified) (history)
  • /trunk/extensions/ConfirmEdit/MathCaptcha.class.php (modified) (history)
  • /trunk/extensions/Crosswiki/Block/CrosswikiBlock.page.php (modified) (history)
  • /trunk/extensions/EditUser/1.13/EditUser_body.php (modified) (history)
  • /trunk/extensions/EditUser/1.14/EditUser_body.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (modified) (history)
  • /trunk/extensions/Eval/SpecialEval.php (modified) (history)
  • /trunk/extensions/FindSpam/FindSpam_body.php (modified) (history)
  • /trunk/extensions/FixedImage/FixedImage.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialRemoveGlobalBlock.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtBaseView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/LqtPages.php (modified) (history)
  • /trunk/extensions/Makebot/Makebot.class.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/cortado_iframe.php (modified) (history)
  • /trunk/extensions/MiniPreview/MiniPreview.php (modified) (history)
  • /trunk/extensions/NewestPages/NewestPages.page.php (modified) (history)
  • /trunk/extensions/OAI/OAIRepo_body.php (modified) (history)
  • /trunk/extensions/Player/SpecialPlayer.php (modified) (history)
  • /trunk/extensions/Poem/Poem.php (modified) (history)
  • /trunk/extensions/PurgeCache/PurgeCache_body.php (modified) (history)
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)
  • /trunk/extensions/SignDocument/SpecialCreateSignDocument.php (modified) (history)
  • /trunk/extensions/SignDocument/SpecialSignDocument.php (modified) (history)
  • /trunk/extensions/SisterSites/SisterSites.php (modified) (history)
  • /trunk/extensions/SpecialForm/SpecialForm.body.php (modified) (history)
  • /trunk/extensions/TalkHere/TalkHereArticle.php (modified) (history)
  • /trunk/extensions/Tasks/Tasks.php (modified) (history)
  • /trunk/extensions/Todo/SpecialTodo.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AjaxTest/AjaxTestPage.php
@@ -47,36 +47,36 @@
4848 function makeInputForm() {
4949 $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
5050 $form = '';
51 - $form .= wfOpenElement( 'form', array( 'name' => 'ajaxtest', 'method' => 'get', 'action' => $thisTitle->getLocalUrl() ) );
52 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'ajaxtest_text', 'id' => 'ajaxtest_text', 'value' => '', 'size' => '64' ) ) . ' ';
53 - $form .= wfElement( 'br' );
54 - $form .= wfElement( 'label', array( 'for' => 'usestring' ), 'use string value' );
55 - $form .= wfElement( 'input', array( 'type' => 'checkbox', 'name' => 'usestring', 'id' => 'usestring') );
56 - $form .= wfElement( 'br' );
57 - $form .= wfElement( 'label', array( 'for' => 'httpcache' ), 'use http cache' );
58 - $form .= wfElement( 'input', array( 'type' => 'checkbox', 'name' => 'httpcache', 'id' => 'httpcache') );
59 - $form .= wfElement( 'br' );
60 - $form .= wfElement( 'label', array( 'for' => 'lastmod' ), 'use last modified' );
61 - $form .= wfElement( 'input', array( 'type' => 'checkbox', 'name' => 'lastmod', 'id' => 'lastmod') );
62 - $form .= wfElement( 'br' );
63 - $form .= wfElement( 'label', array( 'for' => 'error' ), 'trigger error' );
64 - $form .= wfElement( 'input', array( 'type' => 'checkbox', 'name' => 'error', 'id' => 'error') );
65 - $form .= wfElement( 'br' );
66 - $form .= wfOpenElement( 'select', array( 'name' => 'ajaxtest_target', 'id' => 'ajaxtest_target' ) );
67 - $form .= wfElement( 'option', array( 'value' => 'function' ), "function" );
68 - $form .= wfElement( 'option', array( 'value' => 'element' ), "element" );
69 - $form .= wfElement( 'option', array( 'value' => 'input' ), "input" );
70 - $form .= wfCloseElement( 'select' );
71 - $form .= wfElement( 'input', array( 'type' => 'button', 'onclick' => 'doAjaxTest();', 'value' => 'TEST' ) );
72 - $form .= wfElement( 'input', array( 'type' => 'button', 'onclick' => 'clearAjaxTest();', 'value' => 'CLEAR' ) );
73 - #$form .= wfElement( 'input', array( 'type' => 'button', 'onclick' => 'getElementById("ajaxtest_out").value= getElementById("ajaxtest_text").value;', 'value' => 'DUMMY' ) );
74 - $form .= wfCloseElement( 'form' );
 51+ $form .= Xml::openElement( 'form', array( 'name' => 'ajaxtest', 'method' => 'get', 'action' => $thisTitle->getLocalUrl() ) );
 52+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'ajaxtest_text', 'id' => 'ajaxtest_text', 'value' => '', 'size' => '64' ) ) . ' ';
 53+ $form .= Xml::element( 'br' );
 54+ $form .= Xml::element( 'label', array( 'for' => 'usestring' ), 'use string value' );
 55+ $form .= Xml::element( 'input', array( 'type' => 'checkbox', 'name' => 'usestring', 'id' => 'usestring') );
 56+ $form .= Xml::element( 'br' );
 57+ $form .= Xml::element( 'label', array( 'for' => 'httpcache' ), 'use http cache' );
 58+ $form .= Xml::element( 'input', array( 'type' => 'checkbox', 'name' => 'httpcache', 'id' => 'httpcache') );
 59+ $form .= Xml::element( 'br' );
 60+ $form .= Xml::element( 'label', array( 'for' => 'lastmod' ), 'use last modified' );
 61+ $form .= Xml::element( 'input', array( 'type' => 'checkbox', 'name' => 'lastmod', 'id' => 'lastmod') );
 62+ $form .= Xml::element( 'br' );
 63+ $form .= Xml::element( 'label', array( 'for' => 'error' ), 'trigger error' );
 64+ $form .= Xml::element( 'input', array( 'type' => 'checkbox', 'name' => 'error', 'id' => 'error') );
 65+ $form .= Xml::element( 'br' );
 66+ $form .= Xml::openElement( 'select', array( 'name' => 'ajaxtest_target', 'id' => 'ajaxtest_target' ) );
 67+ $form .= Xml::element( 'option', array( 'value' => 'function' ), "function" );
 68+ $form .= Xml::element( 'option', array( 'value' => 'element' ), "element" );
 69+ $form .= Xml::element( 'option', array( 'value' => 'input' ), "input" );
 70+ $form .= Xml::closeElement( 'select' );
 71+ $form .= Xml::element( 'input', array( 'type' => 'button', 'onclick' => 'doAjaxTest();', 'value' => 'TEST' ) );
 72+ $form .= Xml::element( 'input', array( 'type' => 'button', 'onclick' => 'clearAjaxTest();', 'value' => 'CLEAR' ) );
 73+ #$form .= Xml::element( 'input', array( 'type' => 'button', 'onclick' => 'getElementById("ajaxtest_out").value= getElementById("ajaxtest_text").value;', 'value' => 'DUMMY' ) );
 74+ $form .= Xml::closeElement( 'form' );
7575
76 - $form .= wfElement( 'hr' );
77 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'ajaxtest_out', 'id' => 'ajaxtest_out', 'value' => '', 'size' => '64' ) ) . ' ';
78 - $form .= wfElement( 'p', array( 'id' => 'ajaxtest_area' ) );
79 - $form .= wfElement( 'hr' );
80 - $form .= wfElement( 'p', array( 'id' => 'sajax_debug' ) );
 76+ $form .= Xml::element( 'hr' );
 77+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'ajaxtest_out', 'id' => 'ajaxtest_out', 'value' => '', 'size' => '64' ) ) . ' ';
 78+ $form .= Xml::element( 'p', array( 'id' => 'ajaxtest_area' ) );
 79+ $form .= Xml::element( 'hr' );
 80+ $form .= Xml::element( 'p', array( 'id' => 'sajax_debug' ) );
8181 return $form;
8282 }
8383 }
Index: trunk/extensions/ActiveAbstract/GoogleCoopFilter.php
@@ -66,11 +66,11 @@
6767 $this->title = Title::makeTitle( $page->page_namespace, $page->page_title );
6868
6969 $xml = " <ResultSpec id=\"mw${n}\">\n";
70 - $xml .= ' ' . wfElement( 'Query', null, $this->title->getPrefixedText() ) . "\n";
 70+ $xml .= ' ' . Xml::element( 'Query', null, $this->title->getPrefixedText() ) . "\n";
7171 $xml .= " <Response>\n";
72 - $xml .= ' ' . wfElement( 'Output', array( 'name' => 'title' ),
 72+ $xml .= ' ' . Xml::element( 'Output', array( 'name' => 'title' ),
7373 $wgSitename . ':' . $this->title->getPrefixedText() ) . "\n";
74 - $xml .= ' ' . wfElement( 'Output', array( 'name' => 'more_url' ),
 74+ $xml .= ' ' . Xml::element( 'Output', array( 'name' => 'more_url' ),
7575 $this->title->getFullUrl() ) . "\n";
7676
7777 // add abstract and links when we have revision data...
@@ -89,7 +89,7 @@
9090 $lines = $this->_threeLines( $text );
9191 for( $i=1; $i<4; $i++ ) {
9292 if ( $lines[$i] != '' ) {
93 - $xml .= ' ' . wfElement( 'Output', array( 'name' => 'text'.$i ), $lines[$i] ) . "\n";
 93+ $xml .= ' ' . Xml::element( 'Output', array( 'name' => 'text'.$i ), $lines[$i] ) . "\n";
9494 }
9595 }
9696 }
Index: trunk/extensions/ActiveAbstract/AbstractFilter.php
@@ -55,8 +55,8 @@
5656 $title = $wgSitename . ': ' . $this->title->getPrefixedText();
5757
5858 $xml = "<doc>\n";
59 - $xml .= wfElement( 'title', null, $this->_variant( $title ) ) . "\n";
60 - $xml .= wfElement( 'url', null, $this->title->getFullUrl() ) . "\n";
 59+ $xml .= Xml::element( 'title', null, $this->_variant( $title ) ) . "\n";
 60+ $xml .= Xml::element( 'url', null, $this->title->getFullUrl() ) . "\n";
6161
6262 // add abstract and links when we have revision data...
6363 $this->revision = null;
@@ -67,7 +67,7 @@
6868 function writeClosePage( $string ) {
6969 $xml = '';
7070 if( $this->revision ) {
71 - $xml .= wfElement( 'abstract', null,
 71+ $xml .= Xml::element( 'abstract', null,
7272 $this->_variant(
7373 $this->_abstract( $this->revision ) ) ) . "\n";
7474 $xml .= "<links>\n";
@@ -260,10 +260,10 @@
261261 */
262262 function _formatLink( $url, $anchor, $type ) {
263263 $maxUrlLength = 1024; // as defined in Yahoo's .xsd
264 - return wfOpenElement( 'sublink', array( 'linktype' => $type ) ) .
265 - wfElement( 'anchor', null, $this->_variant( $anchor ) ) .
266 - wfElement( 'link', null, substr( $url, 0, $maxUrlLength ) ) .
267 - wfCloseElement( 'sublink' ) . "\n";
 264+ return Xml::openElement( 'sublink', array( 'linktype' => $type ) ) .
 265+ Xml::element( 'anchor', null, $this->_variant( $anchor ) ) .
 266+ Xml::element( 'link', null, substr( $url, 0, $maxUrlLength ) ) .
 267+ Xml::closeElement( 'sublink' ) . "\n";
268268 }
269269
270270 }
Index: trunk/extensions/EditUser/1.13/EditUser_body.php
@@ -789,7 +789,7 @@
790790 } else {
791791 # Need to output a hidden option even if the relevant skin is not in use,
792792 # otherwise the preference will get reset to 0 on submit
793 - $wgOut->addHtml( wfHidden( 'wpQuickbar', $this->mQuickbar ) );
 793+ $wgOut->addHtml( Xml::hidden( 'wpQuickbar', $this->mQuickbar ) );
794794 }
795795
796796 # Skin
@@ -1107,12 +1107,12 @@
11081108
11091109 function makeSearchForm() {
11101110 $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
1111 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
1112 - $form .= wfElement( 'label', array( 'for' => 'username' ), wfMsg( 'edituser-username' ) ) . ' ';
1113 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
1114 - $form .= wfElement( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'edituser-dosearch' ) ) );
1115 - $form .= wfElement( 'input', array( 'type' => 'hidden', 'name' => 'issearch', 'value' => '1' ) );
1116 - $form .= wfCloseElement( 'form' );
 1111+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
 1112+ $form .= Xml::element( 'label', array( 'for' => 'username' ), wfMsg( 'edituser-username' ) ) . ' ';
 1113+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
 1114+ $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'edituser-dosearch' ) ) );
 1115+ $form .= Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'issearch', 'value' => '1' ) );
 1116+ $form .= Xml::closeElement( 'form' );
11171117 return $form;
11181118 }
11191119 }
Index: trunk/extensions/EditUser/1.14/EditUser_body.php
@@ -812,7 +812,7 @@
813813 } else {
814814 # Need to output a hidden option even if the relevant skin is not in use,
815815 # otherwise the preference will get reset to 0 on submit
816 - $wgOut->addHTML( wfHidden( 'wpQuickbar', $this->mQuickbar ) );
 816+ $wgOut->addHTML( Xml::hidden( 'wpQuickbar', $this->mQuickbar ) );
817817 }
818818
819819 # Skin
@@ -1128,12 +1128,12 @@
11291129
11301130 function makeSearchForm() {
11311131 $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
1132 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
1133 - $form .= wfElement( 'label', array( 'for' => 'username' ), wfMsg( 'edituser-username' ) ) . ' ';
1134 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
1135 - $form .= wfElement( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'edituser-dosearch' ) ) );
1136 - $form .= wfElement( 'input', array( 'type' => 'hidden', 'name' => 'issearch', 'value' => '1' ) );
1137 - $form .= wfCloseElement( 'form' );
 1132+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
 1133+ $form .= Xml::element( 'label', array( 'for' => 'username' ), wfMsg( 'edituser-username' ) ) . ' ';
 1134+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
 1135+ $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'edituser-dosearch' ) ) );
 1136+ $form .= Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'issearch', 'value' => '1' ) );
 1137+ $form .= Xml::closeElement( 'form' );
11381138 return $form;
11391139 }
11401140 }
Index: trunk/extensions/ConfirmEdit/FancyCaptcha.class.php
@@ -57,19 +57,19 @@
5858 $title = Title::makeTitle( NS_SPECIAL, 'Captcha/image' );
5959
6060 return "<p>" .
61 - wfElement( 'img', array(
 61+ Xml::element( 'img', array(
6262 'src' => $title->getLocalUrl( 'wpCaptchaId=' . urlencode( $index ) ),
6363 'width' => $info['width'],
6464 'height' => $info['height'],
6565 'alt' => '' ) ) .
6666 "</p>\n" .
67 - wfElement( 'input', array(
 67+ Xml::element( 'input', array(
6868 'type' => 'hidden',
6969 'name' => 'wpCaptchaId',
7070 'id' => 'wpCaptchaId',
7171 'value' => $index ) ) .
7272 "<p>" .
73 - wfElement( 'input', array(
 73+ Xml::element( 'input', array(
7474 'name' => 'wpCaptchaWord',
7575 'id' => 'wpCaptchaWord',
7676 'tabindex' => 1 ) ) . // tab in before the edit textarea
Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php
@@ -102,12 +102,12 @@
103103 $index = $this->storeCaptcha( $captcha );
104104
105105 return "<p><label for=\"wpCaptchaWord\">{$captcha['question']}</label> = " .
106 - wfElement( 'input', array(
 106+ Xml::element( 'input', array(
107107 'name' => 'wpCaptchaWord',
108108 'id' => 'wpCaptchaWord',
109109 'tabindex' => 1 ) ) . // tab in before the edit textarea
110110 "</p>\n" .
111 - wfElement( 'input', array(
 111+ Xml::element( 'input', array(
112112 'type' => 'hidden',
113113 'name' => 'wpCaptchaId',
114114 'id' => 'wpCaptchaId',
Index: trunk/extensions/ConfirmEdit/MathCaptcha.class.php
@@ -22,8 +22,8 @@
2323 $index = $this->storeCaptcha( array( 'answer' => $answer ) );
2424
2525 $form = '<table><tr><td>' . $this->fetchMath( $sum ) . '</td>';
26 - $form .= '<td>' . wfInput( 'wpCaptchaWord', false, false, array( 'tabindex' => '1' ) ) . '</td></tr></table>';
27 - $form .= wfHidden( 'wpCaptchaId', $index );
 26+ $form .= '<td>' . Xml::input( 'wpCaptchaWord', false, false, array( 'tabindex' => '1' ) ) . '</td></tr></table>';
 27+ $form .= Xml::hidden( 'wpCaptchaId', $index );
2828 return $form;
2929 }
3030
Index: trunk/extensions/OAI/OAIRepo_body.php
@@ -955,7 +955,7 @@
956956 function openStream() {
957957 global $wgContLanguageCode;
958958 $ver = "0.1";
959 - return wfElement( 'mediawiki', array(
 959+ return Xml::element( 'mediawiki', array(
960960 'xmlns' => "http://www.mediawiki.org/xml/lsearch-$ver/",
961961 'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
962962 'xsi:schemaLocation' => "http://www.mediawiki.org/xml/lsearch-$ver/ " .
@@ -970,7 +970,7 @@
971971 function openPage( $row ) {
972972 $out = parent::openPage( $row );
973973 if(isset($row->num_page_ref))
974 - $out .= ' ' . wfElement( 'references', array(), strval( $row->num_page_ref ) ) . "\n";
 974+ $out .= ' ' . Xml::element( 'references', array(), strval( $row->num_page_ref ) ) . "\n";
975975 return $out;
976976 }
977977
@@ -980,9 +980,9 @@
981981 foreach($this->_redirects[$row->up_page] as $row){
982982 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
983983 $out .= " <redirect>\n";
984 - $out .= ' ' . wfElementClean( 'title', array(), $title->getPrefixedText() ) . "\n";
 984+ $out .= ' ' . Xml::elementClean( 'title', array(), $title->getPrefixedText() ) . "\n";
985985 if(isset($row->num_page_ref))
986 - $out .= ' ' . wfElement( 'references', array(), strval( $row->num_page_ref ) ) . "\n";
 986+ $out .= ' ' . Xml::element( 'references', array(), strval( $row->num_page_ref ) ) . "\n";
987987 $out .= " </redirect>\n";
988988 }
989989 }
Index: trunk/extensions/ConfirmAccount/RequestAccount_body.php
@@ -99,7 +99,7 @@
100100
101101 $titleObj = Title::makeTitle( NS_SPECIAL, 'RequestAccount' );
102102
103 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'name' => 'accountrequest',
 103+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'name' => 'accountrequest',
104104 'action' => $titleObj->getLocalUrl(), 'enctype' => 'multipart/form-data' ) );
105105 $form .= '<fieldset><legend>' . wfMsgHtml('requestaccount-leg-user') . '</legend>';
106106 $form .= wfMsgExt( 'requestaccount-acc-text', array('parse') )."\n";
@@ -215,7 +215,7 @@
216216 $form .= Xml::hidden( 'attachment', $this->mPrevAttachment )."\n";
217217 $form .= Xml::hidden( 'forgotAttachment', $this->mForgotAttachment )."\n";
218218 $form .= "<p>".Xml::submitButton( wfMsgHtml( 'requestaccount-submit') )."</p>";
219 - $form .= wfCloseElement( 'form' );
 219+ $form .= Xml::closeElement( 'form' );
220220
221221 $wgOut->addHTML( $form );
222222
Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -215,7 +215,7 @@
216216 $reason . '</i></p>' );
217217 }
218218
219 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'name' => 'accountconfirm',
 219+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'name' => 'accountconfirm',
220220 'action' => $titleObj->getLocalUrl() ) );
221221 $form .= "<fieldset>";
222222 $form .= '<legend>' . wfMsgHtml('confirmaccount-leg-user') . '</legend>';
@@ -338,7 +338,7 @@
339339 $form .= Xml::hidden( 'acrid', $row->acr_id );
340340 $form .= Xml::hidden( 'wpShowRejects', $this->showRejects );
341341 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken() )."\n";
342 - $form .= wfCloseElement( 'form' );
 342+ $form .= Xml::closeElement( 'form' );
343343
344344 $wgOut->addHTML( $form );
345345
Index: trunk/extensions/EmailPage/EmailPage_body.php
@@ -56,7 +56,7 @@
5757
5858 # Render form
5959 $special = Title::makeTitle(NS_SPECIAL, 'EmailPage');
60 - $wgOut->addHTML(wfElement('form',array(
 60+ $wgOut->addHTML(Xml::element('form',array(
6161 'class' => 'EmailPage',
6262 'action' => $special->getLocalURL('action=submit'),
6363 'method' => 'POST'
@@ -104,7 +104,7 @@
105105
106106 # Subject
107107 $wgOut->addWikiText(wfMsg('ea-subject'));
108 - $wgOut->addHTML(wfElement('input',array('type' => 'text', 'name' => 'ea-subject', 'value' => $this->subject, 'style' => "width:100%")));
 108+ $wgOut->addHTML(Xml::element('input',array('type' => 'text', 'name' => 'ea-subject', 'value' => $this->subject, 'style' => "width:100%")));
109109
110110 # Header
111111 $wgOut->addWikiText(wfMsg('ea-header'));
@@ -143,9 +143,9 @@
144144 $wgOut->addHTML("</fieldset>");
145145
146146 # Submit buttons & hidden values
147 - $wgOut->addHTML(wfElement('input', array('type' => 'submit', 'name' => 'ea-send', 'value' => wfMsg('ea-send'))));
148 - $wgOut->addHTML(wfElement('input', array('type' => 'submit', 'name' => 'ea-show', 'value' => wfMsg('ea-show'))));
149 - $wgOut->addHTML(wfElement('input', array('type' => 'hidden', 'name' => 'ea-title', 'value' => $this->title)));
 147+ $wgOut->addHTML(Xml::element('input', array('type' => 'submit', 'name' => 'ea-send', 'value' => wfMsg('ea-send'))));
 148+ $wgOut->addHTML(Xml::element('input', array('type' => 'submit', 'name' => 'ea-show', 'value' => wfMsg('ea-show'))));
 149+ $wgOut->addHTML(Xml::element('input', array('type' => 'hidden', 'name' => 'ea-title', 'value' => $this->title)));
150150
151151 $wgOut->addHTML('</form>');
152152
Index: trunk/extensions/AuthorProtect/AuthorProtect.php
@@ -122,7 +122,7 @@
123123 global $wgRestrictionTypes, $wgTitle, $wgUser;
124124 $token = $wgUser->editToken();
125125 $form = '<p>' . wfMsg('authorprotect-intro') . '</p>';
126 - $form .= wfOpenElement( 'form', array( 'method' => 'post', 'action' => $wgTitle->getLocalUrl('action=authorprotect') ) );
 126+ $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $wgTitle->getLocalUrl('action=authorprotect') ) );
127127 foreach( $wgRestrictionTypes as $type ) {
128128 $rest = $wgTitle->getRestrictions($type);
129129 if( $rest !== array() ) {
@@ -133,16 +133,16 @@
134134 $array = array( 'type' => 'checkbox', 'name' => 'check-' . $type, 'value' => $type );
135135 if($checked)
136136 $array = array_merge( $array, array( 'checked' => 'checked' ) );
137 - $form .= wfElement( 'input', $array );
138 - $form .= ' ' . wfMsg('authorprotect-' . $type) . wfElement( 'br' );
 137+ $form .= Xml::element( 'input', $array );
 138+ $form .= ' ' . wfMsg('authorprotect-' . $type) . Xml::element( 'br' );
139139 }
140 - $form .= wfElement( 'br' ) . wfElement( 'label', array( 'for' => 'wpExpiryTime' ), wfMsg('authorprotect-expiry') ) . ' ';
141 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'wpExpiryTime' ) ) . wfElement( 'br' );
142 - $form .= wfElement( 'br' ) . wfElement( 'label', array( 'for' => 'wpReason' ), wfMsg('authorprotect-reason') ) . ' ';
143 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'wpReason' ) );
144 - $form .= wfElement( 'br' ) . wfElement( 'input', array( 'type' => 'hidden', 'name' => 'wpToken', 'value' => $token ) );
145 - $form .= wfElement( 'br' ) . wfElement( 'input', array( 'type' => 'submit', 'name' => 'wpConfirm', 'value' => wfMsg( 'authorprotect-confirm' ) ) );
146 - $form .= wfCloseElement( 'form' );
 140+ $form .= Xml::element( 'br' ) . Xml::element( 'label', array( 'for' => 'wpExpiryTime' ), wfMsg('authorprotect-expiry') ) . ' ';
 141+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'wpExpiryTime' ) ) . Xml::element( 'br' );
 142+ $form .= Xml::element( 'br' ) . Xml::element( 'label', array( 'for' => 'wpReason' ), wfMsg('authorprotect-reason') ) . ' ';
 143+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'wpReason' ) );
 144+ $form .= Xml::element( 'br' ) . Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'wpToken', 'value' => $token ) );
 145+ $form .= Xml::element( 'br' ) . Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpConfirm', 'value' => wfMsg( 'authorprotect-confirm' ) ) );
 146+ $form .= Xml::closeElement( 'form' );
147147 return $form;
148148 }
149149
@@ -283,4 +283,4 @@
284284 function isAuthorProtected($title, $action) {
285285 $rest = $title->getRestrictions($action);
286286 return in_array('author', $rest);
287 -}
\ No newline at end of file
 287+}
Index: trunk/extensions/Crosswiki/Block/CrosswikiBlock.page.php
@@ -188,7 +188,7 @@
189189 <tr id='wpAnonOnlyRow'>
190190 <td>&nbsp;</td>
191191 <td>
192 - " . wfCheckLabel( wfMsgHtml( 'crosswikiblock-anononly' ),
 192+ " . Xml::checkLabel( wfMsgHtml( 'crosswikiblock-anononly' ),
193193 'wpAnonOnly', 'wpAnonOnly', $wgRequest->getCheck( 'wpAnonOnly' ),
194194 array( 'tabindex' => '6' ) ) . "
195195 </td>
@@ -196,7 +196,7 @@
197197 <tr id='wpCreateAccountRow'>
198198 <td>&nbsp;</td>
199199 <td>
200 - " . wfCheckLabel( wfMsgHtml( 'crosswikiblock-nocreate' ),
 200+ " . Xml::checkLabel( wfMsgHtml( 'crosswikiblock-nocreate' ),
201201 'wpCreateAccount', 'wpCreateAccount', $wgRequest->getCheck( 'wpAnonOnly' ),
202202 array( 'tabindex' => '7' ) ) . "
203203 </td>
@@ -204,7 +204,7 @@
205205 <tr id='wpEnableAutoblockRow'>
206206 <td>&nbsp;</td>
207207 <td>
208 - " . wfCheckLabel( wfMsgHtml( 'crosswikiblock-autoblock' ),
 208+ " . Xml::checkLabel( wfMsgHtml( 'crosswikiblock-autoblock' ),
209209 'wpEnableAutoblock', 'wpEnableAutoblock', $wgRequest->getCheck( 'wpAnonOnly' ),
210210 array( 'tabindex' => '8' ) ) . "
211211 </td>
@@ -216,7 +216,7 @@
217217 <tr id='wpEnableEmailBan'>
218218 <td>&nbsp;</td>
219219 <td>
220 - " . wfCheckLabel( wfMsgHtml( 'crosswikiblock-noemail' ),
 220+ " . Xml::checkLabel( wfMsgHtml( 'crosswikiblock-noemail' ),
221221 'wpEmailBan', 'wpEmailBan', $wgRequest->getCheck( 'wpEmailBan' ),
222222 array( 'tabindex' => '10' )) . "
223223 </td>
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -65,9 +65,9 @@
6666 while ( $row = $dbr->fetchRow( $res ) ) $options .= '<option>' . Title::newFromID( $row[0] )->getText() . '</option>';
6767
6868 # Render type-selecting form
69 - $wgOut->addHTML( wfElement( 'form', array( 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null )
 69+ $wgOut->addHTML( Xml::element( 'form', array( 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null )
7070 . "<select name='wpType'>$options</select> "
71 - . wfElement( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'recordadmin-submit' ) ) )
 71+ . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'recordadmin-submit' ) ) )
7272 . '</form>'
7373 );
7474 }
@@ -111,15 +111,15 @@
112112
113113 # Render the form
114114 $wgOut->addHTML(
115 - wfElement( 'form', array( 'class' => strtolower($type).'-record', 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null )
116 - . '<b>' . wfMsg( 'recordadmin-recordid' ) . '</b> ' . wfElement( 'input', array( 'name' => 'wpTitle', 'size' => 30, 'value' => $wpTitle ) )
117 - . '&nbsp;&nbsp;&nbsp;' . wfElement( 'input', array( 'name' => 'wpInvert', 'type' => 'checkbox' ) ) . ' ' . wfMsg( 'recordadmin-invert' )
 115+ Xml::element( 'form', array( 'class' => strtolower($type).'-record', 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null )
 116+ . '<b>' . wfMsg( 'recordadmin-recordid' ) . '</b> ' . Xml::element( 'input', array( 'name' => 'wpTitle', 'size' => 30, 'value' => $wpTitle ) )
 117+ . '&nbsp;&nbsp;&nbsp;' . Xml::element( 'input', array( 'name' => 'wpInvert', 'type' => 'checkbox' ) ) . ' ' . wfMsg( 'recordadmin-invert' )
118118 . "\n<br><br><hr><br>\n{$this->form}"
119 - . wfElement( 'input', array( 'type' => 'hidden', 'name' => 'wpType', 'value' => $type ) )
 119+ . Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'wpType', 'value' => $type ) )
120120 . '<br><hr><br><table width="100%"><tr>'
121 - . '<td>' . wfElement( 'input', array( 'type' => 'submit', 'name' => 'wpFind', 'value' => wfMsg( 'recordadmin-buttonsearch' ) ) ) . '</td>'
122 - . '<td>' . wfElement( 'input', array( 'type' => 'submit', 'name' => 'wpCreate', 'value' => wfMsg( 'recordadmin-buttoncreate' ) ) ) . '</td>'
123 - . '<td width="100%" align="left">' . wfElement( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'recordadmin-buttonreset' ) ) ) . '</td>'
 121+ . '<td>' . Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpFind', 'value' => wfMsg( 'recordadmin-buttonsearch' ) ) ) . '</td>'
 122+ . '<td>' . Xml::element( 'input', array( 'type' => 'submit', 'name' => 'wpCreate', 'value' => wfMsg( 'recordadmin-buttoncreate' ) ) ) . '</td>'
 123+ . '<td width="100%" align="left">' . Xml::element( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'recordadmin-buttonreset' ) ) ) . '</td>'
124124 . '</tr></table></form>'
125125 );
126126
@@ -233,13 +233,13 @@
234234 $this->populateForm( substr( $text, $braces['OFFSET'], $braces['LENGTH'] ) );
235235
236236 # Render the form
237 - $wgOut->addHTML( wfElement( 'form', array( 'class' => 'recordadmin', 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null ) );
 237+ $wgOut->addHTML( Xml::element( 'form', array( 'class' => 'recordadmin', 'action' => $title->getLocalURL( 'action=submit' ), 'method' => 'post' ), null ) );
238238 $wgOut->addHTML( $this->form );
239 - $wgOut->addHTML( wfElement( 'input', array( 'type' => 'hidden', 'name' => 'wpType', 'value' => $type ) ) );
240 - $wgOut->addHTML( wfElement( 'input', array( 'type' => 'hidden', 'name' => 'wpRecord', 'value' => $record ) ) );
 239+ $wgOut->addHTML( Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'wpType', 'value' => $type ) ) );
 240+ $wgOut->addHTML( Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'wpRecord', 'value' => $record ) ) );
241241 $wgOut->addHTML( '<br><hr><br><table width="100%"><tr>'
242 - . '<td>' . wfElement( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'recordadmin-buttonsave' ) ) ) . '</td>'
243 - . '<td width="100%" align="left">' . wfElement( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'recordadmin-buttonreset' ) ) ) . '</td>'
 242+ . '<td>' . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'recordadmin-buttonsave' ) ) ) . '</td>'
 243+ . '<td width="100%" align="left">' . Xml::element( 'input', array( 'type' => 'reset', 'value' => wfMsg( 'recordadmin-buttonreset' ) ) ) . '</td>'
244244 . '</tr></table></form>'
245245 );
246246 }
Index: trunk/extensions/Tasks/Tasks.php
@@ -1560,7 +1560,7 @@
15611561 if( $checked ) {
15621562 $attribs['checked'] = 'checked';
15631563 }
1564 - return wfElement( 'input', $attribs );
 1564+ return Xml::element( 'input', $attribs );
15651565 }
15661566 } # end of class
15671567
Index: trunk/extensions/LiquidThreads/LqtBaseView.php
@@ -1034,11 +1034,11 @@
10351035 }
10361036
10371037 function openDiv( $class='', $id='' ) {
1038 - $this->output->addHTML( wfOpenElement( 'div', array('class'=>$class, 'id'=>$id) ) );
 1038+ $this->output->addHTML( Xml::openElement( 'div', array('class'=>$class, 'id'=>$id) ) );
10391039 }
10401040
10411041 function closeDiv() {
1042 - $this->output->addHTML( wfCloseElement( 'div' ) );
 1042+ $this->output->addHTML( Xml::closeElement( 'div' ) );
10431043 }
10441044
10451045 function showSummary($t) {
Index: trunk/extensions/LiquidThreads/LqtPages.php
@@ -71,13 +71,13 @@
7272 }
7373
7474 function outputList( $kind, $class, $id, $contents ) {
75 - $this->output->addHTML(wfOpenElement($kind, array('class'=>$class,'id'=>$id)));
 75+ $this->output->addHTML(Xml::openElement($kind, array('class'=>$class,'id'=>$id)));
7676 foreach ($contents as $li) {
77 - $this->output->addHTML( wfOpenElement('li') );
 77+ $this->output->addHTML( Xml::openElement('li') );
7878 $this->output->addHTML( $li );
79 - $this->output->addHTML( wfCloseElement('li') );
 79+ $this->output->addHTML( Xml::closeElement('li') );
8080 }
81 - $this->output->addHTML(wfCloseElement($kind));
 81+ $this->output->addHTML(Xml::closeElement($kind));
8282 }
8383
8484 function showTOC($threads) {
Index: trunk/extensions/FixedImage/FixedImage.php
@@ -71,5 +71,5 @@
7272 */
7373 function fixedImageHandler( $key, $text, $params=null ) {
7474 global $wgFixedImageHooks;
75 - return wfElement( 'img', $wgFixedImageHooks[$key] );
 75+ return Xml::element( 'img', $wgFixedImageHooks[$key] );
7676 }
Index: trunk/extensions/Eval/SpecialEval.php
@@ -158,9 +158,9 @@
159159 $wgOut->addHTML( Xml::element( 'h2', null, wfMsg( 'eval_out' ) ) );
160160 if ( $this->mEscape )
161161 $this->mErr =
162 - wfOpenElement( 'pre' ) .
 162+ Xml::openElement( 'pre' ) .
163163 htmlspecialchars( $this->mErr ) .
164 - wfCloseElement( 'pre ' );
 164+ Xml::closeElement( 'pre ' );
165165 $wgOut->addHTML( $this->mErr );
166166 }
167167 }
Index: trunk/extensions/SignDocument/SpecialCreateSignDocument.php
@@ -92,7 +92,7 @@
9393 $ret = '';
9494 $selectedAttr = array( 'selected' => 'selected' );
9595 foreach ( $arr as $a ) {
96 - $ret .= wfElement( 'option', array(
 96+ $ret .= Xml::element( 'option', array(
9797 'value' => $a) + $selectedAttr, $a );
9898 $selectedAttr = array();
9999 }
Index: trunk/extensions/SignDocument/SpecialSignDocument.php
@@ -60,7 +60,7 @@
6161 $wgOut->addWikiText( wfMsg( 'sign-nodocselected' ) );
6262
6363 $out = '';
64 - $out .= wfOpenElement( 'form', array(
 64+ $out .= Xml::openElement( 'form', array(
6565 'id' => 'mw-SignDocument-SelectDoc-form',
6666 'action' => $wgTitle->escapeLocalUrl(),
6767 'method' => 'get') );
@@ -69,7 +69,7 @@
7070
7171 $out .= $this->buildDocSelector();
7272
73 - $out .= wfElement( 'input', array(
 73+ $out .= Xml::element( 'input', array(
7474 'id' => 'mw-SelectDoc-submit',
7575 'type' => 'submit',
7676 'value' => wfMsg( 'go' ) ) );
@@ -88,7 +88,7 @@
8989 'size' => '1',
9090 );
9191
92 - $out = wfOpenElement( 'select', $attribs );
 92+ $out = Xml::openElement( 'select', $attribs );
9393
9494 $itms = SignDocumentForm::getNamesFromDB();
9595 $firstItem = null;
@@ -107,7 +107,7 @@
108108 ? array( 'selected' => 'selected' )
109109 : array();
110110
111 - return wfElement( 'option',
 111+ return Xml::element( 'option',
112112 array( 'value' => $value ) + $selectedAttrib,
113113 $text );
114114 }
@@ -166,7 +166,7 @@
167167
168168 $out = '';
169169
170 - $out .= wfOpenElement( 'form', array(
 170+ $out .= Xml::openElement( 'form', array(
171171 'id' => 'mw-SignDocument-sign-form',
172172 'action' => $wgTitle->escapeLocalUrl(),
173173 'method' => 'post') );
@@ -211,13 +211,13 @@
212212 $out .= '<tr><td></td><td>' . wfMsg( 'sign-indicates-req' ) . '</td></tr>';
213213 $out .= '<tr><td></td><td>' . wfMsg( 'sign-hide-note' ) . '</td></tr>';
214214
215 - $out .= wfElement( 'input', array(
 215+ $out .= Xml::element( 'input', array(
216216
217217 'type' => 'hidden',
218218 'name' => 'doc',
219219 'value' => $wgRequest->getVal('doc') ) );
220220
221 - $out .= '<tr><td>' . wfElement( 'input', array(
 221+ $out .= '<tr><td>' . Xml::element( 'input', array(
222222 'id' => 'mwSignDocument-submit',
223223 'type' => 'submit',
224224 'value' => wfMsg( 'sign-submit') ) );
@@ -235,7 +235,7 @@
236236 if (!$optional) $caption .= '<font color="red">*</font>';
237237 $out .= "<strong>$caption&nbsp;";
238238 $out .= '</td><td>';
239 - $out .= wfElement( 'input', array(
 239+ $out .= Xml::element( 'input', array(
240240 'id' => "wmSignDocument-$name",
241241 'name' => $name,
242242 'value' => $value,
@@ -376,27 +376,27 @@
377377 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $this->mForm->getId()
378378 . '&viewsigs';
379379
380 - $out = wfOpenElement( 'form', array(
 380+ $out = Xml::openElement( 'form', array(
381381 'id' => 'wm-sign-viewsigs-closeopen-form',
382382 'action' => $url,
383383 'method' => 'post' ) );
384384
385385 if ( $this->mForm->mOpen ) {
386386 $out .= wfMsg('sign-sigadmin-currentlyopen') . '&nbsp;';
387 - $out .= wfElement( 'input', array(
 387+ $out .= Xml::element( 'input', array(
388388 'type' => 'submit',
389389 'name' => 'closesigning-submit',
390390 'value' => wfMsg( 'sign-sigadmin-close' ) ) );
391 - $out .= wfElement( 'input', array(
 391+ $out .= Xml::element( 'input', array(
392392 'type' => 'hidden',
393393 'name' => 'closesigning') );
394394 } else {
395395 $out .= wfMsg('sign-sigadmin-currentlyclosed') . '&nbsp;';
396 - $out .= wfElement( 'input', array(
 396+ $out .= Xml::element( 'input', array(
397397 'type' => 'submit',
398398 'name' => 'opensigning-submit',
399399 'value' => wfMsg( 'sign-sigadmin-open' ) ) );
400 - $out .= wfElement( 'input', array(
 400+ $out .= Xml::element( 'input', array(
401401 'type' => 'hidden',
402402 'name' => 'opensigning') );
403403 }
@@ -408,24 +408,24 @@
409409 private function getFieldSelector() {
410410 global $wgTitle;
411411 $out = '';
412 - $out .= wfOpenElement( 'form', array(
 412+ $out .= Xml::openElement( 'form', array(
413413 'id' => 'mw-sdoc-viewsigs-fieldselector-form',
414414 'action' => $wgTitle->escapeLocalUrl(),
415415 'method' => 'get') );
416416
417417 $out .= wfMsg( 'sign-view-selectfields' );
418418
419 - $out .= wfElement( 'input', array(
 419+ $out .= Xml::element( 'input', array(
420420 'type' => 'hidden', 'name' => 'doc',
421421 'value' => $this->mForm->getId()));
422422
423 - $out .= wfElement( 'input', array(
 423+ $out .= Xml::element( 'input', array(
424424 'type' => 'hidden', 'name' => 'viewsigs'));
425425
426426 foreach (array_keys($this->mFields) as $field)
427427 $out .= $this->fieldCheck($field);
428428
429 - $out .= '&nbsp;' . wfElement( 'input', array(
 429+ $out .= '&nbsp;' . Xml::element( 'input', array(
430430 'type' => 'submit', 'value' => wfMsg('go') ) );
431431
432432 $out .= '</form>';
@@ -536,7 +536,7 @@
537537 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $wgRequest->getVal('doc')
538538 . '&viewsigs&detail=' . $wgRequest->getVal('detail');
539539
540 - $out .= wfOpenElement( 'form', array(
 540+ $out .= Xml::openElement( 'form', array(
541541 'id' => 'doreview-form',
542542 'action' => $url,
543543 'method' => 'post' ) );
@@ -550,13 +550,13 @@
551551 $sig->mStricken);
552552
553553 $out .= '&nbsp;&nbsp;' . wfMsg( 'sign-review-comment' ) . ':&nbsp;';
554 - $out .= wfElement( 'input', array(
 554+ $out .= Xml::element( 'input', array(
555555 'type' => 'text',
556556 'name' => 'reviewcomment',
557557 'value' => $sig->mStrickenComment,
558558 'style' => 'width: 450px;' ) );
559559
560 - $out .= '&nbsp;&nbsp;' . wfElement( 'input', array(
 560+ $out .= '&nbsp;&nbsp;' . Xml::element( 'input', array(
561561 'type' => 'submit',
562562 'name' => 'doreview',
563563 'value' => wfMsg( 'sign-submitreview' ) ) );
@@ -632,12 +632,12 @@
633633 if ( !$wgRequest->wasPosted() || !$wgRequest->getVal( 'rununiquequery' ) ) {
634634 $url = $wgTitle->escapeLocalUrl() . '?doc=' . $wgRequest->getVal('doc')
635635 . '&viewsigs&detail=' . $wgRequest->getVal('detail');
636 - $out .= wfOpenElement( 'form', array(
 636+ $out .= Xml::openElement( 'form', array(
637637 'id' => 'rununiquequery-form',
638638 'action' => $url,
639639 'method' => 'post' ) );
640640
641 - $out .= wfElement( 'input', array(
 641+ $out .= Xml::element( 'input', array(
642642 'type' => 'submit',
643643 'name' => 'rununiquequery',
644644 'value'=> wfMsg( 'sign-detail-uniquequery-run' ) ) );
Index: trunk/extensions/SpecialForm/SpecialForm.body.php
@@ -94,25 +94,25 @@
9595
9696 if (!is_null($form->instructions)) {
9797
98 - $wgOut->addHTML(wfOpenElement('div', array('class' => 'instructions')) .
 98+ $wgOut->addHTML(Xml::openElement('div', array('class' => 'instructions')) .
9999 $wgOut->parse($form->instructions) .
100 - wfCloseElement('div') .
101 - wfElement('br'));
 100+ Xml::closeElement('div') .
 101+ Xml::element('br'));
102102 }
103103
104104 if (!is_null($errmsg)) {
105 - $wgOut->addHTML(wfOpenElement('div', array('class' => 'error')) .
 105+ $wgOut->addHTML(Xml::openElement('div', array('class' => 'error')) .
106106 $wgOut->parse($errmsg) .
107 - wfCloseElement('div') .
108 - wfElement('br'));
 107+ Xml::closeElement('div') .
 108+ Xml::element('br'));
109109 }
110110
111 - $wgOut->addHTML(wfOpenElement('form',
 111+ $wgOut->addHTML(Xml::openElement('form',
112112 array('method' => 'POST',
113113 'action' => $self->getLocalURL())));
114114
115115 foreach ($form->fields as $field) {
116 - $wgOut->addHTML($field->render($wgRequest->getText($field->name)) . wfElement('br') . "\n");
 116+ $wgOut->addHTML($field->render($wgRequest->getText($field->name)) . Xml::element('br') . "\n");
117117 }
118118
119119 if ($wgUser->getId() == 0 && $wgSpecialFormRecaptcha) { # Anonymous user, use recaptcha
@@ -121,10 +121,10 @@
122122 $wgOut->addHTML(recaptcha_get_html($recaptcha_public_key));
123123 }
124124
125 - $wgOut->addHTML(wfElement('input', array('type' => 'submit',
 125+ $wgOut->addHTML(Xml::element('input', array('type' => 'submit',
126126 'value' => wfMsg('formsave'))));
127127
128 - $wgOut->addHTML(wfCloseElement('form'));
 128+ $wgOut->addHTML(Xml::closeElement('form'));
129129 }
130130
131131 function createArticle($form) {
@@ -436,21 +436,21 @@
437437
438438 switch ($this->type) {
439439 case 'textarea':
440 - return wfOpenElement('h2') .
441 - wfElement('label', array('for' => $this->name), $this->label) .
442 - wfCloseElement('h2') .
 440+ return Xml::openElement('h2') .
 441+ Xml::element('label', array('for' => $this->name), $this->label) .
 442+ Xml::closeElement('h2') .
443443 (($this->description) ?
444 - (wfOpenElement('div') . $wgOut->parse($this->description) . wfCloseElement('div')) : '') .
445 - wfOpenElement('textarea', array('name' => $this->name,
 444+ (Xml::openElement('div') . $wgOut->parse($this->description) . Xml::closeElement('div')) : '') .
 445+ Xml::openElement('textarea', array('name' => $this->name,
446446 'id' => $this->name,
447447 'rows' => $this->getOption('rows', 6),
448448 'cols' => $this->getOption('cols', 80))) .
449449 ((is_null($def)) ? '' : $def) .
450 - wfCloseElement('textarea');
 450+ Xml::closeElement('textarea');
451451 break;
452452 case 'text':
453 - return wfElement('label', array('for' => $this->name), $this->label) . ": " .
454 - wfElement('input', array('type' => 'text',
 453+ return Xml::element('label', array('for' => $this->name), $this->label) . ": " .
 454+ Xml::element('input', array('type' => 'text',
455455 'name' => $this->name,
456456 'id' => $this->name,
457457 'value' => ((is_null($def)) ? '' : $def),
@@ -463,8 +463,8 @@
464464 if ($def == 'checked') {
465465 $attrs['checked'] = 'checked';
466466 }
467 - return wfElement('label', array('for' => $this->name), $this->label) . ": " .
468 - wfElement('input', $attrs);
 467+ return Xml::element('label', array('for' => $this->name), $this->label) . ": " .
 468+ Xml::element('input', $attrs);
469469 break;
470470 case 'radio':
471471 $items = array();
@@ -476,25 +476,25 @@
477477 if ($item == $def) {
478478 $attrs['checked'] = 'checked';
479479 }
480 - $items[] = wfOpenElement('input', $attrs) .
481 - wfElement('label', null, $item) .
482 - wfCloseElement('input');
 480+ $items[] = Xml::openElement('input', $attrs) .
 481+ Xml::element('label', null, $item) .
 482+ Xml::closeElement('input');
483483 }
484 - return wfElement('span', null, $this->label) . wfElement('br') . implode("", $items);
 484+ return Xml::element('span', null, $this->label) . Xml::element('br') . implode("", $items);
485485 break;
486486 case 'select':
487487 $items = array();
488488 $rawitems = explode(';', $this->getOption('items'));
489489 foreach ($rawitems as $item) {
490 - $items[] = wfElement('option',
 490+ $items[] = Xml::element('option',
491491 ($item == $def) ? array('selected' => 'selected') : null,
492492 $item);
493493 }
494494
495 - return wfElement('label', array('for' => $this->name), $this->label) . ": " .
496 - wfOpenElement('select', array('name' => $this->name, 'id' => $this->name)) .
 495+ return Xml::element('label', array('for' => $this->name), $this->label) . ": " .
 496+ Xml::openElement('select', array('name' => $this->name, 'id' => $this->name)) .
497497 implode("", $items) .
498 - wfCloseElement('select');
 498+ Xml::closeElement('select');
499499
500500 break;
501501 default:
Index: trunk/extensions/Aggregator/Aggregator.php
@@ -61,7 +61,7 @@
6262 class AggregatorStyleHandler {
6363 function apply( $outputPage ) {
6464 global $wgScriptPath;
65 - $outputPage->addScript( wfElement( 'link', array(
 65+ $outputPage->addScript( Xml::element( 'link', array(
6666 'rel' => 'stylesheet',
6767 'type' => 'text/css',
6868 'href' => "$wgScriptPath/extensions/Aggregator/inline-feed.css" ) ) );
@@ -86,7 +86,7 @@
8787
8888 function _feedLink( $type, $mime ) {
8989 $special = wfAggregatorFeedPage( $this->mName, $type );
90 - $link = wfElement( 'link', array(
 90+ $link = Xml::element( 'link', array(
9191 'rel' => 'alternate',
9292 'type' => $mime,
9393 'href' => $special->getLocalUrl() ) );
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php
@@ -102,9 +102,9 @@
103103 $html .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $wgScript, 'name' => 'centralauth-globalgroups-newgroup' ) );
104104 $html .= Xml::hidden( 'title', SpecialPage::getTitleFor('GlobalGroupPermissions')->getPrefixedText() );
105105
106 - $fields = array( 'centralauth-globalgroupperms-newgroupname' => wfInput( 'wpGroup' ) );
 106+ $fields = array( 'centralauth-globalgroupperms-newgroupname' => Xml::input( 'wpGroup' ) );
107107
108 - $html .= wfBuildForm( $fields, 'centralauth-globalgroupperms-creategroup-submit' );
 108+ $html .= Xml::buildForm( $fields, 'centralauth-globalgroupperms-creategroup-submit' );
109109 $html .= Xml::closeElement( 'form' );
110110 $html .= Xml::closeElement( 'fieldset' );
111111
@@ -129,9 +129,9 @@
130130 $fields['centralauth-editgroup-members'] = wfMsgExt( 'centralauth-editgroup-members-link', array( 'parseinline' ), $group, User::getGroupMember( $group ) );
131131 $fields['centralauth-editgroup-restrictions'] = $this->buildWikiSetSelector($group);
132132 $fields['centralauth-editgroup-perms'] = $this->buildCheckboxes($group);
133 - $fields['centralauth-editgroup-reason'] = wfInput( 'wpReason' );
 133+ $fields['centralauth-editgroup-reason'] = Xml::input( 'wpReason' );
134134
135 - $html .= wfBuildForm( $fields, 'centralauth-editgroup-submit' );
 135+ $html .= Xml::buildForm( $fields, 'centralauth-editgroup-submit' );
136136
137137 $html .= Xml::closeElement( 'form' );
138138 $html .= Xml::closeElement( 'fieldset' );
Index: trunk/extensions/CentralAuth/SpecialCentralAuth.php
@@ -339,7 +339,7 @@
340340 $hostname = $wiki->getDisplayName();
341341 $userPageName = 'User:' . $this->mUserName;
342342 $url = $wiki->getUrl( $userPageName );
343 - return wfElement( 'a',
 343+ return Xml::element( 'a',
344344 array(
345345 'href' => $url,
346346 'title' => wfMsg( 'centralauth-foreign-link',
Index: trunk/extensions/CentralAuth/SpecialMergeAccount.php
@@ -409,7 +409,7 @@
410410 $hostname = $wiki->getDisplayName();
411411 $userPageName = 'User:' . $this->mUserName;
412412 $url = $wiki->getUrl( $userPageName );
413 - return wfElement( 'a',
 413+ return Xml::element( 'a',
414414 array(
415415 'href' => $url,
416416 'title' => wfMsg( 'centralauth-foreign-link',
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -777,7 +777,7 @@
778778 # For a bit more sophisticated detection of blank summaries, hash the
779779 # automatic one and pass that in a hidden field.
780780 $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );
781 - $wgOut->addHTML( wfHidden( 'wpAutoSummary', $autosumm ) );
 781+ $wgOut->addHTML( Xml::hidden( 'wpAutoSummary', $autosumm ) );
782782
783783 if ( $this->isConflict ) {
784784 $wgOut->addWikiText( '==' . wfMsg( "yourdiff" ) . '==' );
@@ -839,7 +839,7 @@
840840 if ( $button_action != '' )
841841 $temp['onMouseUp'] = sprintf( $button_action, 'save' );
842842
843 - $buttons['save'] = wfElement( 'input', $temp, '' );
 843+ $buttons['save'] = Xml::element( 'input', $temp, '' );
844844
845845 ++$tabindex; // use the same for preview and live preview
846846 if ( $wgLivePreview && $wgUser->getOption( 'uselivepreview' ) ) {
@@ -855,7 +855,7 @@
856856 );
857857 if ( $button_action != '' )
858858 $temp['onMouseUp'] = sprintf( $button_action, 'preview' );
859 - $buttons['preview'] = wfElement( 'input', $temp, '' );
 859+ $buttons['preview'] = Xml::element( 'input', $temp, '' );
860860
861861 $temp = array(
862862 'id' => 'wpLivePreview',
@@ -869,7 +869,7 @@
870870 );
871871 if ( $button_action != '' )
872872 $temp['onMouseUp'] = sprintf( $button_action, 'live' );
873 - $buttons['live'] = wfElement( 'input', $temp, '' );
 873+ $buttons['live'] = Xml::element( 'input', $temp, '' );
874874 } else {
875875 $temp = array(
876876 'id' => 'wpPreview_' . $this->mvd_id,
@@ -883,7 +883,7 @@
884884 if ( $button_action != '' )
885885 $temp['onMouseUp'] = sprintf( $button_action, 'preview' );
886886
887 - $buttons['preview'] = wfElement( 'input', $temp, '' );
 887+ $buttons['preview'] = Xml::element( 'input', $temp, '' );
888888 $buttons['live'] = '';
889889 }
890890
@@ -898,7 +898,7 @@
899899 );
900900 if ( $button_action != '' )
901901 $temp['onMouseUp'] = sprintf( $button_action, 'diff' );
902 - $buttons['diff'] = wfElement( 'input', $temp, '' );
 902+ $buttons['diff'] = Xml::element( 'input', $temp, '' );
903903
904904 return $buttons;
905905 }
@@ -916,4 +916,4 @@
917917 // $wgOut->addHTML( '</div>' );
918918 }
919919 }
920 -?>
\ No newline at end of file
 920+?>
Index: trunk/extensions/MetavidWiki/skins/mv_embed/cortado_iframe.php
@@ -68,7 +68,7 @@
6969 /**
7070 * JS escape function copied from MediaWiki's Xml::escapeJsString()
7171 */
72 -function wfEscapeJsString( $string ) {
 72+function Xml::escapeJsString( $string ) {
7373 // See ECMA 262 section 7.8.4 for string literal format
7474 $pairs = array(
7575 "\\" => "\\\\",
@@ -108,7 +108,7 @@
109109 <title>cortado_embed</title>
110110 <?if( !empty( $parent_domain ) ){?>
111111 <script type="text/javascript">
112 - window.DOMAIN = '<?= wfEscapeJsString( $parent_domain ); ?>';
 112+ window.DOMAIN = '<?= Xml::escapeJsString( $parent_domain ); ?>';
113113 </script>
114114 <?}?>
115115 <style type="text/css">
Index: trunk/extensions/MiniPreview/MiniPreview.php
@@ -119,7 +119,7 @@
120120
121121 # Output
122122 $mainwidth = ( $wgMiniPreviewThumbnailSize + 2 ) * 3 ;
123 - $html = wfOpenElement( 'div', array (
 123+ $html = Xml::openElement( 'div', array (
124124 'id' => 'MiniPreview',
125125 'class' => 'MiniPreview_main',
126126 'style' => "float:right;clear:right",
@@ -137,15 +137,15 @@
138138 $t = Title::newFromDBkey( $ns . $p->source_title );
139139 $mode = ( $p->from_category ? "category" : "gallery" ) ;
140140
141 - $html .= wfOpenElement( 'div', array( 'class' => 'MiniPreview_'.$mode , 'width' => '100%' ) );
142 - $html .= wfElement( 'a' , array ( 'href' => $t->getLocalURL() ) , $t->getText() );
143 - $html .= wfOpenElement( 'table' , array( 'border' => '0' , 'cellpadding' => '0' , 'cellspacing' => '0' )); # CSS is just not up to this yet...
144 - $html .= wfOpenElement( 'tr' );
 141+ $html .= Xml::openElement( 'div', array( 'class' => 'MiniPreview_'.$mode , 'width' => '100%' ) );
 142+ $html .= Xml::element( 'a' , array ( 'href' => $t->getLocalURL() ) , $t->getText() );
 143+ $html .= Xml::openElement( 'table' , array( 'border' => '0' , 'cellpadding' => '0' , 'cellspacing' => '0' )); # CSS is just not up to this yet...
 144+ $html .= Xml::openElement( 'tr' );
145145 $html .= wfMiniPreviewGetThumbnail ( $p->entry[0] , $image_data ) ;
146146 $html .= wfMiniPreviewGetThumbnail ( $p->entry[1] , $image_data ) ;
147147
148 - $html .= wfOpenElement( 'td' );
149 - $html .= wfOpenElement( 'div', array(
 148+ $html .= Xml::openElement( 'td' );
 149+ $html .= Xml::openElement( 'div', array(
150150 'style' => "width:{$wgMiniPreviewThumbnailSize}px;height:{$wgMiniPreviewThumbnailSize}px;",
151151 'class' => 'MiniPreview_count' ));
152152 $html .= wfMsgExt( 'minipreview-files_in_'.$mode , array( 'parsemag' ), $p->image_count );
@@ -168,8 +168,8 @@
169169 $divclass = ( $entry->id == 0 ) ? 'MiniPreview_no_thumb' : 'MiniPreview_thumb' ;
170170
171171 $ret = '';
172 - $ret .= wfOpenElement( 'td' );
173 - $ret .= wfOpenElement( 'div', array(
 172+ $ret .= Xml::openElement( 'td' );
 173+ $ret .= Xml::openElement( 'div', array(
174174 'style' => "width:{$wgMiniPreviewThumbnailSize}px;height:{$wgMiniPreviewThumbnailSize}px;overflow:hidden",
175175 'class' => $divclass )
176176 );
Index: trunk/extensions/Todo/SpecialTodo.php
@@ -209,7 +209,7 @@
210210
211211 $wgOut->addHTML( "<table>\n<tr>" );
212212 foreach( $queues as $queue ) {
213 - $wgOut->addHTML( wfElement( 'th', null, $queue ) );
 213+ $wgOut->addHTML( Xml::element( 'th', null, $queue ) );
214214 }
215215 $wgOut->addHTML( "</tr>\n<tr>\n" );
216216
@@ -308,7 +308,7 @@
309309 global $wgOut, $wgUser, $wgLang;
310310 $id = $this->id;
311311
312 - $wgOut->addHTML( wfElement( 'div', array(
 312+ $wgOut->addHTML( Xml::element( 'div', array(
313313 'class' => 'mwTodoTitle',
314314 'id' => "mwTodoTitle$id",
315315 'ondblclick' => "todoEditTitle($id,true)" ) ) .
@@ -319,7 +319,7 @@
320320
321321 $wgOut->addHTML( "<div class='mwTodoTimestamp'>" . $wgLang->timeanddate( $this->timestamp ) . "</div>\n" );
322322
323 - $wgOut->addHTML( wfOpenElement( 'div', array(
 323+ $wgOut->addHTML( Xml::openElement( 'div', array(
324324 'class' => 'mwTodoComment',
325325 'id' => "mwTodoComment$id",
326326 'ondblclick' => "todoEditComment($id,true)" ) ) );
@@ -337,30 +337,30 @@
338338 $id = $this->id;
339339 $todo = Title::makeTitle( NS_SPECIAL, 'Todo' );
340340
341 - return wfOpenElement( 'div', array(
 341+ return Xml::openElement( 'div', array(
342342 'id' => "mwTodo{$capField}Update$id",
343343 'style' => 'display:none' ) ) .
344 - wfOpenElement( 'form', array(
 344+ Xml::openElement( 'form', array(
345345 'action' => $todo->getLocalUrl(),
346346 'method' => 'post' ) ) .
347 - wfElement( 'input', array(
 347+ Xml::element( 'input', array(
348348 'name' => 'wpItem', 'type' => 'hidden', 'value' => $this->id ) ) .
349 - wfElement( 'input', array(
 349+ Xml::element( 'input', array(
350350 'name' => 'wpEditToken', 'type' => 'hidden', 'value' => $wgUser->editToken() ) ) .
351 - wfElement( 'input', array(
 351+ Xml::element( 'input', array(
352352 'name' => 'wpUpdateField', 'type' => 'hidden', 'value' => $field ) ) .
353353 ( ( $rows == 1 )
354 - ? wfElement( 'input', array(
 354+ ? Xml::element( 'input', array(
355355 'name' => "wp{$capField}", 'size' => '20', 'value' => $val ) )
356 - : wfElement( 'textarea', array(
 356+ : Xml::element( 'textarea', array(
357357 'name' => "wp{$capField}", 'cols' => '20', 'rows' => '10' ),
358358 $val . "\n" ) ) .
359359 "<br />\n" .
360 - wfElement( 'input', array(
 360+ Xml::element( 'input', array(
361361 'type' => 'submit',
362362 'value' => wfMsg('todo-list-change') ) ) .
363363 " " .
364 - wfElement( 'input', array(
 364+ Xml::element( 'input', array(
365365 'type' => 'button',
366366 'value' => wfMsg('todo-list-cancel'),
367367 'onclick' => "todoEdit{$capField}($id,false)" ) ) .
@@ -371,15 +371,15 @@
372372 global $wgUser;
373373 $id = $this->id;
374374 $todo = Title::makeTitle( NS_SPECIAL, 'Todo' );
375 - return wfOpenElement( 'form', array(
 375+ return Xml::openElement( 'form', array(
376376 'action' => $todo->getLocalUrl(),
377377 'method' => 'post',
378378 'id' => 'mwTodoQueueUpdate' . $this->id ) ) .
379 - wfElement( 'input', array(
 379+ Xml::element( 'input', array(
380380 'name' => 'wpItem', 'type' => 'hidden', 'value' => $this->id ) ) .
381 - wfElement( 'input', array(
 381+ Xml::element( 'input', array(
382382 'name' => 'wpEditToken', 'type' => 'hidden', 'value' => $wgUser->editToken() ) ) .
383 - wfElement( 'input', array(
 383+ Xml::element( 'input', array(
384384 'name' => 'wpUpdateField', 'type' => 'hidden', 'value' => 'queue' ) ) .
385385 $this->buildMoveSelector( $queues ) .
386386 "</form>\n";
@@ -389,11 +389,11 @@
390390 $out = "<select name='wpQueue' id='mwTodoQueue" . $this->id . "' onchange='todoMoveQueue(" . $this->id . ")'>";
391391 foreach( $queues as $queue ) {
392392 if( $queue == $this->queue ) {
393 - $out .= wfElement( 'option',
 393+ $out .= Xml::element( 'option',
394394 array( 'value' => '', 'selected' => 'selected' ),
395395 wfMsgHtml('todo-move-queue') );
396396 } else {
397 - $out .= wfElement( 'option',
 397+ $out .= Xml::element( 'option',
398398 array( 'value' => $queue ),
399399 $queue );
400400 }
Index: trunk/extensions/AbuseFilter/SpecialAbuseLog.php
@@ -56,10 +56,10 @@
5757 $fields = array();
5858
5959 // Search conditions
60 - $fields['abusefilter-log-search-user'] = wfInput( 'wpSearchUser', 45, $this->mSearchUser );
 60+ $fields['abusefilter-log-search-user'] = Xml::input( 'wpSearchUser', 45, $this->mSearchUser );
6161 if ($this->canSeeDetails())
62 - $fields['abusefilter-log-search-filter'] = wfInput( 'wpSearchFilter', 45, $this->mSearchFilter );
63 - $fields['abusefilter-log-search-title'] = wfInput( 'wpSearchTitle', 45, $this->mSearchTitle );
 62+ $fields['abusefilter-log-search-filter'] = Xml::input( 'wpSearchFilter', 45, $this->mSearchFilter );
 63+ $fields['abusefilter-log-search-title'] = Xml::input( 'wpSearchTitle', 45, $this->mSearchTitle );
6464
6565 $form = Xml::hidden( 'title', $this->getTitle()->getPrefixedText() );
6666
@@ -221,4 +221,4 @@
222222 function getIndexField() {
223223 return 'afl_timestamp';
224224 }
225 -}
\ No newline at end of file
 225+}
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php
@@ -144,11 +144,11 @@
145145
146146 $fields = array();
147147
148 - $fields['ipaddress'] = wfInput( 'address', 45, $this->mAddress );
149 - $fields['globalblocking-whitelist-reason'] = wfInput( 'wpReason', 45, $this->mReason );
 148+ $fields['ipaddress'] = Xml::input( 'address', 45, $this->mAddress );
 149+ $fields['globalblocking-whitelist-reason'] = Xml::input( 'wpReason', 45, $this->mReason );
150150 $fields['globalblocking-whitelist-status'] = Xml::checkLabel( wfMsgExt( 'globalblocking-whitelist-statuslabel', 'parsemag' ), 'wpWhitelistStatus', 'wpWhitelistStatus', $this->mCurrentStatus );
151151
152 - $form .= wfBuildForm( $fields, 'globalblocking-whitelist-submit' );
 152+ $form .= Xml::buildForm( $fields, 'globalblocking-whitelist-submit' );
153153
154154 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
155155
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php
@@ -74,8 +74,8 @@
7575 }
7676
7777 $fields = array();
78 - $fields['globalblocking-search-ip'] = wfInput( 'ip', 45, $ip );
79 - $searchForm .= wfBuildForm( $fields, 'globalblocking-search-submit' );
 78+ $fields['globalblocking-search-ip'] = Xml::input( 'ip', 45, $ip );
 79+ $searchForm .= Xml::buildForm( $fields, 'globalblocking-search-submit' );
8080
8181 $searchForm .= Xml::closeElement( 'form' ) . Xml::closeElement( 'fieldset' );
8282 $wgOut->addHTML( $searchForm );
Index: trunk/extensions/GlobalBlocking/SpecialRemoveGlobalBlock.php
@@ -114,10 +114,10 @@
115115
116116 $fields = array();
117117
118 - $fields['ipaddress'] = wfInput( 'address', 45, $this->mUnblockIP );
119 - $fields['globalblocking-unblock-reason'] = wfInput( 'wpReason', 45, $this->mReason );
 118+ $fields['ipaddress'] = Xml::input( 'address', 45, $this->mUnblockIP );
 119+ $fields['globalblocking-unblock-reason'] = Xml::input( 'wpReason', 45, $this->mReason );
120120
121 - $form .= wfBuildForm( $fields, 'globalblocking-unblock-submit' );
 121+ $form .= Xml::buildForm( $fields, 'globalblocking-unblock-submit' );
122122
123123 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
124124
Index: trunk/extensions/Cite/SpecialCite_body.php
@@ -56,7 +56,7 @@
5757 global $wgOut, $wgTitle;
5858
5959 $wgOut->addHTML(
60 - wfElement( 'form',
 60+ Xml::element( 'form',
6161 array(
6262 'id' => 'specialcite',
6363 'method' => 'get',
@@ -64,9 +64,9 @@
6565 ),
6666 null
6767 ) .
68 - wfOpenElement( 'label' ) .
 68+ Xml::openElement( 'label' ) .
6969 wfMsgHtml( 'cite_page' ) . ' ' .
70 - wfElement( 'input',
 70+ Xml::element( 'input',
7171 array(
7272 'type' => 'text',
7373 'size' => 30,
@@ -76,15 +76,15 @@
7777 ''
7878 ) .
7979 ' ' .
80 - wfElement( 'input',
 80+ Xml::element( 'input',
8181 array(
8282 'type' => 'submit',
8383 'value' => wfMsgHtml( 'cite_submit' )
8484 ),
8585 ''
8686 ) .
87 - wfCloseElement( 'label' ) .
88 - wfCloseElement( 'form' )
 87+ Xml::closeElement( 'label' ) .
 88+ Xml::closeElement( 'form' )
8989 );
9090 }
9191
Index: trunk/extensions/BotQuery/query.php
@@ -2682,7 +2682,7 @@
26832683 case 'array':
26842684 echo '<struct>';
26852685 foreach( $elemValue as $subElemName => &$subElemValue ) {
2686 - echo wfOpenElement( 'var', array('name' => $subElemName) );
 2686+ echo Xml::openElement( 'var', array('name' => $subElemName) );
26872687 slowWddxPrinter( $subElemValue );
26882688 echo '</var>';
26892689 }
@@ -2690,10 +2690,10 @@
26912691 break;
26922692 case 'integer':
26932693 case 'double':
2694 - echo wfElement( 'number', null, $elemValue );
 2694+ echo Xml::element( 'number', null, $elemValue );
26952695 break;
26962696 case 'string':
2697 - echo wfElement( 'string', null, $elemValue );
 2697+ echo Xml::element( 'string', null, $elemValue );
26982698 break;
26992699 default:
27002700 wfDebugDieBacktrace( 'Unknown type ' . gettype($elemValue) );
@@ -2745,14 +2745,14 @@
27462746 $subElemContent = $elemValue['*'];
27472747 unset( $elemValue['*'] );
27482748 if( gettype( $subElemContent ) === 'array' ) {
2749 - $printer( $indstr . wfOpenElement( $elemName, $elemValue ));
 2749+ $printer( $indstr . Xml::openElement( $elemName, $elemValue ));
27502750 recXmlPrint( $printer, $elemName, $subElemContent, $indent );
27512751 $printer( $indstr . "</$elemName>" );
27522752 } else {
2753 - $printer( $indstr . wfElement( $elemName, $elemValue, $subElemContent ));
 2753+ $printer( $indstr . Xml::element( $elemName, $elemValue, $subElemContent ));
27542754 }
27552755 } else {
2756 - $printer( $indstr . wfOpenElement( $elemName, null ));
 2756+ $printer( $indstr . Xml::openElement( $elemName, null ));
27572757 if( array_key_exists('_element', $elemValue) ) {
27582758 $subElemName = $elemValue['_element'];
27592759 foreach( $elemValue as $subElemId => &$subElemValue ) {
@@ -2772,7 +2772,7 @@
27732773 // ignore
27742774 break;
27752775 default:
2776 - $printer( $indstr . wfElement( $elemName, null, $elemValue ));
 2776+ $printer( $indstr . Xml::element( $elemName, null, $elemValue ));
27772777 break;
27782778 }
27792779 }
Index: trunk/extensions/Makebot/Makebot.class.php
@@ -34,7 +34,7 @@
3535 $wgOut->addHTML( $this->makeSearchForm() );
3636
3737 if( $this->target != '' ) {
38 - //$wgOut->addHTML( wfElement( 'p', NULL, NULL ) );
 38+ //$wgOut->addHTML( Xml::element( 'p', NULL, NULL ) );
3939 $user = User::newFromName( $this->target );
4040 if( is_object( $user ) && !is_null( $user ) ) {
4141 global $wgVersion;
@@ -92,11 +92,11 @@
9393 */
9494 function makeSearchForm() {
9595 $thisTitle = Title::makeTitle( NS_SPECIAL, $this->getName() );
96 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
97 - $form .= wfElement( 'label', array( 'for' => 'username' ), wfMsg( 'makebot-username' ) ) . ' ';
98 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
99 - $form .= wfElement( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'makebot-search' ) ) );
100 - $form .= wfCloseElement( 'form' );
 96+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
 97+ $form .= Xml::element( 'label', array( 'for' => 'username' ), wfMsg( 'makebot-username' ) ) . ' ';
 98+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'username', 'id' => 'username', 'value' => $this->target ) ) . ' ';
 99+ $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'dosearch', 'value' => wfMsg( 'makebot-search' ) ) );
 100+ $form .= Xml::closeElement( 'form' );
101101 return $form;
102102 }
103103
@@ -118,33 +118,33 @@
119119 }
120120
121121 # Start the table
122 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
123 - $form .= wfOpenElement( 'table' ) . wfOpenElement( 'tr' );
 122+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
 123+ $form .= Xml::openElement( 'table' ) . Xml::openElement( 'tr' );
124124 # Grant/revoke buttons
125 - $form .= wfElement( 'td', array( 'align' => 'right' ), wfMsg( 'makebot-change' ) );
126 - $form .= wfOpenElement( 'td' );
 125+ $form .= Xml::element( 'td', array( 'align' => 'right' ), wfMsg( 'makebot-change' ) );
 126+ $form .= Xml::openElement( 'td' );
127127 foreach( array( 'grant', 'revoke' ) as $button ) {
128128 $attribs = array( 'type' => 'submit', 'name' => $button, 'value' => wfMsg( 'makebot-' . $button ) );
129129 if( !$$button )
130130 $attribs['disabled'] = 'disabled';
131 - $form .= wfElement( 'input', $attribs );
 131+ $form .= Xml::element( 'input', $attribs );
132132 }
133 - $form .= wfCloseElement( 'td' ) . wfCloseElement( 'tr' );
 133+ $form .= Xml::closeElement( 'td' ) . Xml::closeElement( 'tr' );
134134 # Comment field
135 - $form .= wfOpenElement( 'tr' );
136 - $form .= wfOpenElement( 'td', array( 'align' => 'right' ) );
137 - $form .= wfElement( 'label', array( 'for' => 'comment' ), wfMsg( 'makebot-comment' ) );
138 - $form .= wfCloseElement( 'td' );
139 - $form .= wfOpenElement( 'td' );
140 - $form .= wfElement( 'input', array( 'type' => 'text', 'name' => 'comment', 'id' => 'comment', 'size' => 45, 'maxlength' => 255 ) );
141 - $form .= wfCloseElement( 'td' ) . wfCloseElement( 'tr' );
 135+ $form .= Xml::openElement( 'tr' );
 136+ $form .= Xml::openElement( 'td', array( 'align' => 'right' ) );
 137+ $form .= Xml::element( 'label', array( 'for' => 'comment' ), wfMsg( 'makebot-comment' ) );
 138+ $form .= Xml::closeElement( 'td' );
 139+ $form .= Xml::openElement( 'td' );
 140+ $form .= Xml::element( 'input', array( 'type' => 'text', 'name' => 'comment', 'id' => 'comment', 'size' => 45, 'maxlength' => 255 ) );
 141+ $form .= Xml::closeElement( 'td' ) . Xml::closeElement( 'tr' );
142142 # End table
143 - $form .= wfCloseElement( 'table' );
 143+ $form .= Xml::closeElement( 'table' );
144144 # Username
145 - $form .= wfElement( 'input', array( 'type' => 'hidden', 'name' => 'username', 'value' => $this->target ) );
 145+ $form .= Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'username', 'value' => $this->target ) );
146146 # Edit token
147 - $form .= wfElement( 'input', array( 'type' => 'hidden', 'name' => 'token', 'value' => $wgUser->editToken( 'makebot' ) ) );
148 - $form .= wfCloseElement( 'form' );
 147+ $form .= Xml::element( 'input', array( 'type' => 'hidden', 'name' => 'token', 'value' => $wgUser->editToken( 'makebot' ) ) );
 148+ $form .= Xml::closeElement( 'form' );
149149 return $form;
150150 }
151151
@@ -167,7 +167,7 @@
168168 function showLogEntries( &$user, $logtype = 'makebot' ) {
169169 global $wgOut;
170170 $title = $user->getUserPage();
171 - $wgOut->addHTML( wfElement( 'h2', NULL, htmlspecialchars( LogPage::logName( $logtype ) ) ) );
 171+ $wgOut->addHTML( Xml::element( 'h2', NULL, htmlspecialchars( LogPage::logName( $logtype ) ) ) );
172172 $logViewer = new LogViewer( new LogReader( new FauxRequest( array( 'page' => $title->getPrefixedText(), 'type' => $logtype ) ) ) );
173173 $logViewer->showList( $wgOut );
174174 }
Index: trunk/extensions/TalkHere/TalkHereArticle.php
@@ -241,7 +241,7 @@
242242 'accesskey' => wfMsg('accesskey-save'),
243243 'title' => wfMsg( 'tooltip-save' ).' ['.wfMsg( 'accesskey-save' ).']',
244244 );
245 - $wgOut->addHTML( wfElement('input', $temp, '') );
 245+ $wgOut->addHTML( Xml::element('input', $temp, '') );
246246
247247 $temp = array(
248248 'id' => 'wpPreview',
@@ -252,7 +252,7 @@
253253 'accesskey' => wfMsg('accesskey-preview'),
254254 'title' => wfMsg( 'tooltip-preview' ).' ['.wfMsg( 'accesskey-preview' ).']',
255255 );
256 - $wgOut->addHTML( wfElement('input', $temp, '') );
 256+ $wgOut->addHTML( Xml::element('input', $temp, '') );
257257
258258 $edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ));
259259 $edithelp = '<a target="helpwindow" href="'.$edithelpurl.'">'.
Index: trunk/extensions/Poem/Poem.php
@@ -92,7 +92,7 @@
9393 $attribs['class'] = 'poem';
9494 }
9595
96 - return wfOpenElement( 'div', $attribs ) .
 96+ return Xml::openElement( 'div', $attribs ) .
9797 $nl .
9898 trim( $text ) .
9999 "$nl</div>";
Index: trunk/extensions/FindSpam/FindSpam_body.php
@@ -28,10 +28,10 @@
2929
3030 # Show form
3131 $self = Title::makeTitle( NS_SPECIAL, 'FindSpam' );
32 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
 32+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
3333 $form .= '<table><tr><td align="right">' . wfMsgHtml( 'findspam-ip' ) . '</td>';
34 - $form .= '<td>' . wfInput( 'ip', 50, $ip ) . '</td></tr>';
35 - $form .= '<tr><td></td><td>' . wfSubmitButton( wfMsg( 'findspam-ok' ) ) . '</td></tr></table></form>';
 34+ $form .= '<td>' . Xml::input( 'ip', 50, $ip ) . '</td></tr>';
 35+ $form .= '<tr><td></td><td>' . Xml::submitButton( wfMsg( 'findspam-ok' ) ) . '</td></tr></table></form>';
3636 $wgOut->addHTML( $form );
3737
3838 if ( $ip ) {
Index: trunk/extensions/PurgeCache/PurgeCache_body.php
@@ -32,9 +32,9 @@
3333
3434 function makeForm() {
3535 $self = $this->getTitle();
36 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
37 - $form .= wfElement( 'input', array( 'type' => 'submit', 'name' => 'purge', 'value' => wfMsg('purgecache-button') ) );
38 - $form .= wfCloseElement( 'form' );
 36+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
 37+ $form .= Xml::element( 'input', array( 'type' => 'submit', 'name' => 'purge', 'value' => wfMsg('purgecache-button') ) );
 38+ $form .= Xml::closeElement( 'form' );
3939 return $form;
4040 }
4141 }
Index: trunk/extensions/SisterSites/SisterSites.php
@@ -32,7 +32,7 @@
3333
3434 function wfSisterList( $sites ) {
3535 foreach( $sites as $site ) {
36 - $bits[] = wfElement( 'a',
 36+ $bits[] = Xml::element( 'a',
3737 array(
3838 'href' => $site->getUrl(),
3939 'class' => 'extiw',
Index: trunk/extensions/NewestPages/NewestPages.page.php
@@ -156,12 +156,12 @@
157157
158158 function makeNamespaceForm() {
159159 $self = Title::makeTitle( NS_SPECIAL, $this->getName() );
160 - $form = wfOpenElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
161 - $form .= wfLabel( wfMsg( 'newestpages-namespace' ), 'namespace' ) . '&nbsp;';
162 - $form .= htmlNamespaceSelector( $this->namespace, 'all' );
163 - $form .= wfHidden( 'limit', $this->limit );
164 - $form .= wfHidden( 'redirects', $this->redirects );
165 - $form .= wfSubmitButton( wfMsg( 'newestpages-submit' ) ) . '</form>';
 160+ $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl() ) );
 161+ $form .= Xml::label( wfMsg( 'newestpages-namespace' ), 'namespace' ) . '&nbsp;';
 162+ $form .= Xml::namespaceSelector( $this->namespace, 'all' );
 163+ $form .= Xml::hidden( 'limit', $this->limit );
 164+ $form .= Xml::hidden( 'redirects', $this->redirects );
 165+ $form .= Xml::submitButton( wfMsg( 'newestpages-submit' ) ) . '</form>';
166166 return $form;
167167 }
168168 }
Index: trunk/extensions/Player/SpecialPlayer.php
@@ -147,8 +147,8 @@
148148
149149 if ( $exif ) {
150150 global $wgStylePath, $wgStyleVersion;
151 - $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
152 - $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
 151+ $expand = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-expand' ) ) );
 152+ $collapse = htmlspecialchars( Xml::escapeJsString( wfMsg( 'metadata-collapse' ) ) );
153153 $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
154154 $wgOut->addWikiText( $this->makeMetadataTable( $exif ) );
155155 $wgOut->addHTML(

Follow-up revisions

RevisionCommit summaryAuthorDate
r44978At least disable old xml function loading per r44839. An easy ~9-10ms.aaron21:42, 23 December 2008

Status & tagging log