r66105 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66104‎ | r66105 | r66106 >
Date:13:50, 9 May 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Drop XmlFunctions.php. It is no longer necessary to our evil plans.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/XmlFunctions.php (deleted) (history)

Diff [purge]

Index: trunk/phase3/includes/XmlFunctions.php
@@ -1,86 +0,0 @@
2 -<?php
3 -/**
4 - * Aliases for functions in the Xml module
5 - * Look at the Xml class (Xml.php) for the implementations.
6 - */
7 -function wfElement( $element, $attribs = null, $contents = '') {
8 - wfDeprecated(__FUNCTION__);
9 - return Xml::element( $element, $attribs, $contents );
10 -}
11 -function wfElementClean( $element, $attribs = array(), $contents = '') {
12 - wfDeprecated(__FUNCTION__);
13 - return Xml::elementClean( $element, $attribs, $contents );
14 -}
15 -function wfOpenElement( $element, $attribs = null ) {
16 - wfDeprecated(__FUNCTION__);
17 - return Xml::openElement( $element, $attribs );
18 -}
19 -function wfCloseElement( $element ) {
20 - wfDeprecated(__FUNCTION__);
21 - return "</$element>";
22 -}
23 -function HTMLnamespaceselector($selected = '', $allnamespaces = null ) {
24 - wfDeprecated(__FUNCTION__);
25 - return Xml::namespaceSelector( $selected, $allnamespaces );
26 -}
27 -function wfSpan( $text, $class, $attribs=array() ) {
28 - wfDeprecated(__FUNCTION__);
29 - return Xml::span( $text, $class, $attribs );
30 -}
31 -function wfInput( $name, $size=false, $value=false, $attribs=array() ) {
32 - wfDeprecated(__FUNCTION__);
33 - return Xml::input( $name, $size, $value, $attribs );
34 -}
35 -function wfAttrib( $name, $present = true ) {
36 - wfDeprecated(__FUNCTION__);
37 - return Xml::attrib( $name, $present );
38 -}
39 -function wfCheck( $name, $checked=false, $attribs=array() ) {
40 - wfDeprecated(__FUNCTION__);
41 - return Xml::check( $name, $checked, $attribs );
42 -}
43 -function wfRadio( $name, $value, $checked=false, $attribs=array() ) {
44 - wfDeprecated(__FUNCTION__);
45 - return Xml::radio( $name, $value, $checked, $attribs );
46 -}
47 -function wfLabel( $label, $id ) {
48 - wfDeprecated(__FUNCTION__);
49 - return Xml::label( $label, $id );
50 -}
51 -function wfInputLabel( $label, $name, $id, $size=false, $value=false, $attribs=array() ) {
52 - wfDeprecated(__FUNCTION__);
53 - return Xml::inputLabel( $label, $name, $id, $size, $value, $attribs );
54 -}
55 -function wfCheckLabel( $label, $name, $id, $checked=false, $attribs=array() ) {
56 - wfDeprecated(__FUNCTION__);
57 - return Xml::checkLabel( $label, $name, $id, $checked, $attribs );
58 -}
59 -function wfRadioLabel( $label, $name, $value, $id, $checked=false, $attribs=array() ) {
60 - wfDeprecated(__FUNCTION__);
61 - return Xml::radioLabel( $label, $name, $value, $id, $checked, $attribs );
62 -}
63 -function wfSubmitButton( $value, $attribs=array() ) {
64 - wfDeprecated(__FUNCTION__);
65 - return Xml::submitButton( $value, $attribs );
66 -}
67 -function wfHidden( $name, $value, $attribs=array() ) {
68 - wfDeprecated(__FUNCTION__);
69 - return Xml::hidden( $name, $value, $attribs );
70 -}
71 -function wfEscapeJsString( $string ) {
72 - wfDeprecated(__FUNCTION__);
73 - return Xml::escapeJsString( $string );
74 -}
75 -function wfIsWellFormedXml( $text ) {
76 - wfDeprecated(__FUNCTION__);
77 - return Xml::isWellFormed( $text );
78 -}
79 -function wfIsWellFormedXmlFragment( $text ) {
80 - wfDeprecated(__FUNCTION__);
81 - return Xml::isWellFormedXmlFragment( $text );
82 -}
83 -
84 -function wfBuildForm( $fields, $submitLabel ) {
85 - wfDeprecated(__FUNCTION__);
86 - return Xml::buildForm( $fields, $submitLabel );
87 -}
Index: trunk/phase3/RELEASE-NOTES
@@ -37,6 +37,7 @@
3838 research into its user experience implications.
3939 * Added $wgJQueryVersion, $wgJQueryMinified and $wgJQueryOnEveryPage (true by
4040 default) to configure loading of jQuery by MediaWiki
 41+* XmlFunctions.php has been removed. Use Xml the or Html classes as appropriate
4142
4243 === New features in 1.17 ===
4344 * (bug 10183) Users can now add personal styles and scripts to all skins via

Comments

#Comment by Carlb (talk | contribs)   01:26, 27 June 2010

This is breaking third-party extensions, for instance http://www.mediawiki.org/wiki/Extension:EditCount#Installation_on_MediaWiki_1.17_and_later

I've received one thread worth of user complaints at http://desciclopedia.org/wiki/Forum:Problemas_no_Especial:EditCount about one of the affected extensions, but this would not appear to be the sole extension to be broken. Try a search for "wfElement" on mediawiki.org and you'll find plenty of third-party code which called these stubs for whatever reason and I'd expect most all of it to break in some way, likely fatally.

#Comment by OverlordQ (talk | contribs)   01:32, 27 June 2010

These have been deprecated for the past 18 months. Those extensions will continue to work, just not for 1.17 until they update to use the proper functions. I see no problem in this.

Status & tagging log