From 40e15facf1eca178d4d330a720597528a193d55c Mon Sep 17 00:00:00 2001 From: Arne Heizmann Date: Sat, 24 Jul 2004 13:18:14 +0000 Subject: [PATCH] Tim Starling removed the line where $func is set to 'makeLink', but left it in where 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 19f017c9b4..86ed82ee2a 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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 = '{$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); } } -- 2.20.1