From: Sam Reed Date: Wed, 4 May 2011 21:23:25 +0000 (+0000) Subject: Documentation X-Git-Tag: 1.31.0-rc.0~30405 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=5db2450c55f992cbbfc00e27593a66eddb26b32e;p=lhc%2Fweb%2Fwiklou.git Documentation Remove unused variables --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index c7cf929b20..e5f7a4c4f5 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1346,7 +1346,7 @@ class HTMLSelectField extends HTMLFormField { # If one of the options' 'name' is int(0), it is automatically selected. # because PHP sucks and thinks int(0) == 'some string'. # Working around this by forcing all of them to strings. - foreach( $this->mParams['options'] as $key => &$opt ){ + foreach( $this->mParams['options'] as &$opt ){ if( is_int( $opt ) ){ $opt = strval( $opt ); } diff --git a/includes/Html.php b/includes/Html.php index daef9e0e44..ea335334c3 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -107,8 +107,8 @@ class Html { * features might be added, like allowing arrays for the values of * attributes like class= and media=. * - * @param $element string The element's name, e.g., 'a' - * @param $attribs array Associative array of attributes, e.g., array( + * @param $element string The element's name, e.g., 'a' + * @param $attribs array Associative array of attributes, e.g., array( * 'href' => 'http://www.mediawiki.org/' ). See expandAttributes() for * further documentation. * @param $contents string The raw HTML contents of the element: *not* @@ -132,6 +132,12 @@ class Html { /** * Identical to rawElement(), but HTML-escapes $contents (like * Xml::element()). + * + * @param $element string + * @param $attribs array + * @param $contents string + * + * @return string */ public static function element( $element, $attribs = array(), $contents = '' ) { return self::rawElement( $element, $attribs, strtr( $contents, array( @@ -145,6 +151,11 @@ class Html { /** * Identical to rawElement(), but has no third parameter and omits the end * tag (and the self-closing '/' in XML mode for empty elements). + * + * @param $element string + * @param $attribs array + * + * @return string */ public static function openElement( $element, $attribs = array() ) { global $wgHtml5, $wgWellFormedXml; diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index b7249901c5..9d0e1bcc1f 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -63,7 +63,7 @@ class LinkHolderArray { unset( $nsLinks ); unset( $entry ); - foreach ( $this->interwikis as $key => &$entry ) { + foreach ( $this->interwikis as &$entry ) { $entry['title'] = Title::newFromText( $entry['pdbk'] ); } unset( $entry );