diff options
| author | Christian Weiske <christian.weiske@netresearch.de> | 2014-06-13 10:07:24 +0200 |
|---|---|---|
| committer | Christian Weiske <christian.weiske@netresearch.de> | 2014-06-13 10:07:24 +0200 |
| commit | d80854dc9a670e0ee996cc89a59af2c5f8521205 (patch) | |
| tree | 64d2647cb6b326ef3f7732014561589ac7b37594 /src | |
| parent | cb96273d9e57cf57eaab4015b46a4e0b43cc1c55 (diff) | |
| download | phorkie-d80854dc9a670e0ee996cc89a59af2c5f8521205.tar.gz phorkie-d80854dc9a670e0ee996cc89a59af2c5f8521205.zip | |
use geshi from geshi's new pear channel
Diffstat (limited to 'src')
| -rw-r--r-- | src/phorkie/Renderer/Geshi.php | 6 | ||||
| -rw-r--r-- | src/phorkie/SetupCheck.php | 8 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/phorkie/Renderer/Geshi.php b/src/phorkie/Renderer/Geshi.php index 08c6c74..9cb15a2 100644 --- a/src/phorkie/Renderer/Geshi.php +++ b/src/phorkie/Renderer/Geshi.php @@ -13,12 +13,8 @@ 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. - */ if (!class_exists('\\GeSHi', true)) { - require_once $GLOBALS['phorkie']['cfg']['geshi']; + require_once 'geshi.php'; } $geshi = new \GeSHi($file->getContent(), $this->getType($file)); $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php index 53e4fd0..fbc99c7 100644 --- a/src/phorkie/SetupCheck.php +++ b/src/phorkie/SetupCheck.php @@ -47,11 +47,9 @@ class SetupCheck } if (!class_exists('GeSHi', true)) { - $geshi = stream_resolve_include_path( - $GLOBALS['phorkie']['cfg']['geshi'] - ); - if ($geshi === false) { - $this->fail('GeSHi not available'); + @include_once 'geshi.php'; + if (!class_exists('GeSHi', false)) { + $this->fail('PEAR package not installed: pear.geshi.org/geshi'); } } |
