r87455 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87454‎ | r87455 | r87456 >
Date:21:23, 4 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Documentation

Remove unused variables
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/Html.php (modified) (history)
  • /trunk/phase3/includes/parser/LinkHolderArray.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/LinkHolderArray.php
@@ -63,7 +63,7 @@
6464 unset( $nsLinks );
6565 unset( $entry );
6666
67 - foreach ( $this->interwikis as $key => &$entry ) {
 67+ foreach ( $this->interwikis as &$entry ) {
6868 $entry['title'] = Title::newFromText( $entry['pdbk'] );
6969 }
7070 unset( $entry );
Index: trunk/phase3/includes/HTMLForm.php
@@ -1346,7 +1346,7 @@
13471347 # If one of the options' 'name' is int(0), it is automatically selected.
13481348 # because PHP sucks and thinks int(0) == 'some string'.
13491349 # Working around this by forcing all of them to strings.
1350 - foreach( $this->mParams['options'] as $key => &$opt ){
 1350+ foreach( $this->mParams['options'] as &$opt ){
13511351 if( is_int( $opt ) ){
13521352 $opt = strval( $opt );
13531353 }
Index: trunk/phase3/includes/Html.php
@@ -107,8 +107,8 @@
108108 * features might be added, like allowing arrays for the values of
109109 * attributes like class= and media=.
110110 *
111 - * @param $element string The element's name, e.g., 'a'
112 - * @param $attribs array Associative array of attributes, e.g., array(
 111+ * @param $element string The element's name, e.g., 'a'
 112+ * @param $attribs array Associative array of attributes, e.g., array(
113113 * 'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for
114114 * further documentation.
115115 * @param $contents string The raw HTML contents of the element: *not*
@@ -132,6 +132,12 @@
133133 /**
134134 * Identical to rawElement(), but HTML-escapes $contents (like
135135 * Xml::element()).
 136+ *
 137+ * @param $element string
 138+ * @param $attribs array
 139+ * @param $contents string
 140+ *
 141+ * @return string
136142 */
137143 public static function element( $element, $attribs = array(), $contents = '' ) {
138144 return self::rawElement( $element, $attribs, strtr( $contents, array(
@@ -145,6 +151,11 @@
146152 /**
147153 * Identical to rawElement(), but has no third parameter and omits the end
148154 * tag (and the self-closing '/' in XML mode for empty elements).
 155+ *
 156+ * @param $element string
 157+ * @param $attribs array
 158+ *
 159+ * @return string
149160 */
150161 public static function openElement( $element, $attribs = array() ) {
151162 global $wgHtml5, $wgWellFormedXml;

Status & tagging log