Change $text to $html. This has been bothering me for awhile. It's stupid, counterint...
authorDaniel Friesen <dantman@users.mediawiki.org>
Sun, 8 May 2011 00:10:31 +0000 (00:10 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Sun, 8 May 2011 00:10:31 +0000 (00:10 +0000)
includes/Linker.php

index 85164c6..fd0b48a 100644 (file)
@@ -155,19 +155,19 @@ class Linker {
         * @return string HTML <a> attribute
         */
        public static function link(
-               $target, $text = null, $customAttribs = array(), $query = array(), $options = array()
+               $target, $html = null, $customAttribs = array(), $query = array(), $options = array()
        ) {
                wfProfileIn( __METHOD__ );
                if ( !$target instanceof Title ) {
                        wfProfileOut( __METHOD__ );
-                       return "<!-- ERROR -->$text";
+                       return "<!-- ERROR -->$html";
                }
                $options = (array)$options;
 
                $dummy = new DummyLinker; // dummy linker instance for bc on the hooks
 
                $ret = null;
-               if ( !wfRunHooks( 'LinkBegin', array( $dummy, $target, &$text,
+               if ( !wfRunHooks( 'LinkBegin', array( $dummy, $target, &$html,
                &$customAttribs, &$query, &$options, &$ret ) ) ) {
                        wfProfileOut( __METHOD__ );
                        return $ret;
@@ -203,13 +203,13 @@ class Linker {
                        $attribs,
                        self::linkAttribs( $target, $customAttribs, $options )
                );
-               if ( is_null( $text ) ) {
-                       $text = self::linkText( $target );
+               if ( is_null( $html ) ) {
+                       $html = self::linkText( $target );
                }
 
                $ret = null;
-               if ( wfRunHooks( 'LinkEnd', array( $dummy, $target, $options, &$text, &$attribs, &$ret ) ) ) {
-                       $ret = Html::rawElement( 'a', $attribs, $text );
+               if ( wfRunHooks( 'LinkEnd', array( $dummy, $target, $options, &$html, &$attribs, &$ret ) ) ) {
+                       $ret = Html::rawElement( 'a', $attribs, $html );
                }
 
                wfProfileOut( __METHOD__ );