r63346 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63345‎ | r63346 | r63347 >
Date:22:03, 6 March 2010
Author:demon
Status:ok
Tags:
Comment:
Drop ancient wfElement-type function usage, have been deprecated for ages
Modified paths:
  • /trunk/extensions/ListChangedArticles/ListChangedArticles_body.php (modified) (history)
  • /trunk/extensions/MiniPreview/MiniPreview.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/ListChangedArticles/ListChangedArticles_body.php
@@ -48,7 +48,7 @@
4949 $attribs["title"] = $t->getDBkey() ;
5050 $attribs["namespace_id"] = $obj->page_namespace ;
5151 $attribs["namespace_name"] = $wgLang->getNsText ( $obj->page_namespace ) ;
52 - $ret .= wfElement ( "article" , $attribs ) ;
 52+ $ret .= Xml::element( "article" , $attribs ) ;
5353 }
5454
5555 $ret .= "</articlelist>" ;
Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.inc
@@ -517,8 +517,7 @@
518518 * Helper function to display a simple button
519519 */
520520 static function buttonHTML($values) {
521 - // for backwards-compatibility with pre-1.13 MW
522 - $button_html = function_exists("Xml::element") ? Xml::element('input', $values, '') : wfElement('input', $values, '');
 521+ $button_html = Xml::element('input', $values, '');
523522 return " $button_html\n";
524523 }
525524
Index: trunk/extensions/MiniPreview/MiniPreview.php
@@ -146,14 +146,14 @@
147147 'style' => "width:{$wgMiniPreviewThumbnailSize}px;height:{$wgMiniPreviewThumbnailSize}px;",
148148 'class' => 'MiniPreview_count' ));
149149 $html .= wfMsgExt( 'minipreview-files_in_'.$mode , array( 'parsemag' ), $p->image_count );
150 - $html .= wfCloseElement ( "div" ) ;
151 - $html .= wfCloseElement ( "td" ) ;
152 - $html .= wfCloseElement ( "tr" ) ;
153 - $html .= wfCloseElement ( "table" ) ;
154 - $html .= wfCloseElement ( "div" ) ;
 150+ $html .= Xml::closeElement( "div" ) ;
 151+ $html .= Xml::closeElement( "td" ) ;
 152+ $html .= Xml::closeElement( "tr" ) ;
 153+ $html .= Xml::closeElement( "table" ) ;
 154+ $html .= Xml::closeElement( "div" ) ;
155155 }
156156 }
157 - $html .= wfCloseElement ( "div" ) ;
 157+ $html .= Xml::closeElement( "div" ) ;
158158 $output->addHTML( $html );
159159
160160 return true;
@@ -200,9 +200,9 @@
201201 $image_url = $image_data[$entry->title]->getTitle()->getLocalURL();
202202 $image_name = $image_data[$entry->title]->getTitle()->getText();
203203
204 - $ret .= wfOpenElement ( 'a' , array ( 'href' => $image_url ));
205 - $ret .= wfElement ( 'img' , array ( 'border' => '0', 'style' => $style, 'src' => $thumb_url , 'alt' => $image_name ));
206 - $ret .= wfCloseElement ( 'a' );
 204+ $ret .= Xml::openElement( 'a' , array ( 'href' => $image_url ));
 205+ $ret .= Xml::element( 'img' , array ( 'border' => '0', 'style' => $style, 'src' => $thumb_url , 'alt' => $image_name ));
 206+ $ret .= Xml::closeElement ( 'a' );
207207 } else { # No such file
208208 $ret .= wfMsg ( 'minipreview-no_more_files_here' ) ;
209209 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r63347Followup r63346, forgot to press save on this onedemon22:10, 6 March 2010

Status & tagging log