handle undefined local clone urls
[phorkie.git] / src / phorkie / Renderer / Geshi.php
index 21d36c2d2214f04a198817b6269d73e9d05703a2..9cb15a20d106da7ae27f3302ac1164ae3502fa39 100644 (file)
@@ -13,11 +13,9 @@ class Renderer_Geshi
      */
     public function toHtml(File $file, Tool_Result $res = null)
     {
-        /**
-         * Yes, geshi needs to be in your include path
-         * We use the mediawiki geshi extension package.
-         */
-        require_once $GLOBALS['phorkie']['cfg']['geshi'];
+        if (!class_exists('\\GeSHi', true)) {
+            require_once 'geshi.php';
+        }
         $geshi = new \GeSHi($file->getContent(), $this->getType($file));
         $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
         $geshi->set_header_type(GESHI_HEADER_DIV);