X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/e8151ad24cb9f4951ea1f29f5878248e584b8372..43b23197ffc3e1d08a1e08b09dbb31f06692d7ff:/src/phorkie/Renderer/Geshi.php diff --git a/src/phorkie/Renderer/Geshi.php b/src/phorkie/Renderer/Geshi.php index 21d36c2..0c545ed 100644 --- a/src/phorkie/Renderer/Geshi.php +++ b/src/phorkie/Renderer/Geshi.php @@ -15,10 +15,12 @@ class Renderer_Geshi { /** * Yes, geshi needs to be in your include path - * We use the mediawiki geshi extension package. + * We use the geshi pear package. */ - require_once $GLOBALS['phorkie']['cfg']['geshi']; - $geshi = new \GeSHi($file->getContent(), $this->getType($file)); + if (!class_exists('\\geshi', true)) { + require_once $GLOBALS['phorkie']['cfg']['geshi']; + } + $geshi = new \geshi($file->getContent(), $this->getType($file)); $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); $geshi->set_header_type(GESHI_HEADER_DIV);