Permalink
Browse files

I don't know why, but on some wiki installs this works but the other …

…way doesnt
  • Loading branch information...
1 parent 2be8876 commit a1324a3b78e240a169ef7523c18a527350d67b75 @Whiteknight committed Jul 2, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 EmbedVideo.hooks.php
View
@@ -15,15 +15,16 @@ public static function setup()
# legacy purposes
global $wgVersion;
$prefix = version_compare($wgVersion, '1.7', '<') ? '#' : '';
- EmbedVideo::addMagicWord($prefix, "ev", "EmbedVideo::parserFunction_ev");
- EmbedVideo::addMagicWord($prefix, "evp", "EmbedVideo::parserFunction_evp");
+ EmbedVideo::addMagicWord($prefix, "ev", "parserFunction_ev");
+ EmbedVideo::addMagicWord($prefix, "evp", "parserFunction_evp");
return true;
}
private static function addMagicWord($prefix, $word, $function)
{
global $wgParser;
- $wgParser->setFunctionHook($prefix . $word, $function);
+ $hook = array("EmbedVideo", $function);
+ $wgParser->setFunctionHook($prefix . $word, $hook);
}
/**

0 comments on commit a1324a3

Please sign in to comment.