function autoConvert($text, $toVariant = false) { global $wgTitle; if (is_object($wgTitle) && $wgTitle->getNameSpace() == NS_FILE) { $imagename = $wgTitle->getNsText(); if (preg_match("/^{$imagename}:/", $text)) { return $text; } } return parent::autoConvert($text, $toVariant); }