Tim Starling removed the line where $func is set to 'makeLink', but left it in where
authorArne Heizmann <timwi@users.mediawiki.org>
Sat, 24 Jul 2004 13:18:14 +0000 (13:18 +0000)
committerArne Heizmann <timwi@users.mediawiki.org>
Sat, 24 Jul 2004 13:18:14 +0000 (13:18 +0000)
it is used as a function name. I'm pretty sure that would give rise to a bug. :)
Replacing $func with makeLink.

includes/Skin.php

index 19f017c..86ed82e 100644 (file)
@@ -66,7 +66,7 @@ class Skin {
        function getSkinName() {
                return "standard";
        }
-       
+
        # Get/set accessor for delayed link colouring
        function postParseLinkColour( $setting = NULL ) {
                return wfSetVar( $this->postParseLinkColour, $setting );
@@ -1476,9 +1476,9 @@ class Skin {
                                                $trail = $m[2];
                                        }
                                }
-                               
+
                                # Allows wiki to bypass using linkcache, see OutputPage::parseLinkHolders()
-                               $retVal = '<!--LINK ' . implode( ' ', array( $nt->getNamespace(), $nt->getDBkey(), 
+                               $retVal = '<!--LINK ' . implode( ' ', array( $nt->getNamespace(), $nt->getDBkey(),
                                        $query, $prefix . $text . $inside ) ) . "-->{$trail}";
                        } else {
                                # Work out link colour immediately
@@ -1487,9 +1487,9 @@ class Skin {
                                        $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix );
                                } else {
                                        $threshold = $wgUser->getOption('stubthreshold') ;
-                                       if ( $threshold > 0 ) { 
+                                       if ( $threshold > 0 ) {
                                                $dbr =& wfGetDB( DB_SLAVE );
-                                               $s = $dbr->selectRow( 'cur', array( 'LENGTH(cur_text) AS x', 'cur_namespace', 
+                                               $s = $dbr->selectRow( 'cur', array( 'LENGTH(cur_text) AS x', 'cur_namespace',
                                                        'cur_is_redirect' ), array( 'cur_id' => $aid ), $fname ) ;
                                                if ( $s !== false ) {
                                                        $size = $s->x;
@@ -2499,11 +2499,11 @@ class Skin {
                        }
                        if ( preg_match( '/^' . $medians . '(.*)$/i', $match[1], $submatch ) ) {
                                # Media link
-                               $comment = preg_replace( '/\[\[(.*?)\]\]/', $this->makeMediaLink( $submatch[1], "", $text ), 
+                               $comment = preg_replace( '/\[\[(.*?)\]\]/', $this->makeMediaLink( $submatch[1], "", $text ),
                                  $comment, 1 );
                        } else {
                                # Other kind of link
-                               $comment = preg_replace('/\[\[(.*?)\]\]/', $this->$func( $match[1], $match[1] ), 
+                               $comment = preg_replace('/\[\[(.*?)\]\]/', $this->makeLink( $match[1], $match[1] ),
                                  $comment , 1);
                        }
                }