diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-08-06 22:42:58 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-08-06 22:42:58 +0200 |
commit | d978e24c81cc608e308869a2099970bb53e115a2 (patch) | |
tree | 82a2c6733ba33af3924ebafb4fad4c7ff44ca44b /inc | |
parent | ddaef2073cbf6588a8d1b32f24c3ce4eeef1465e (diff) | |
download | rpg-d978e24c81cc608e308869a2099970bb53e115a2.tar.gz rpg-d978e24c81cc608e308869a2099970bb53e115a2.tar.bz2 |
GeSHi fixes
This fixes a bug in GeSHi which adds an addtional newline (patch sent to
upstream) and makes sure the code highlighting cache honors the purge
request variable.
darcs-hash:20060806204258-7ad00-56ad794b90b8ad38f62e8e4d9e430a8622636bc5.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/geshi.php | 2 | ||||
-rw-r--r-- | inc/parserutils.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/inc/geshi.php b/inc/geshi.php index 4e709fe22..c6755ea4a 100644 --- a/inc/geshi.php +++ b/inc/geshi.php @@ -1808,7 +1808,7 @@ class GeSHi $result .= $this->parse_non_string_part($stuff_to_parse); // Lop off the very first and last spaces - $result = substr($result, 1, strlen($result) - 1); + $result = substr($result, 1, -1); // Are we still in a string? if ($STRING_OPEN) { diff --git a/inc/parserutils.php b/inc/parserutils.php index 70d73a417..f48580b0f 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -501,7 +501,7 @@ function p_get_first_heading($id){ function p_xhtml_cached_geshi($code, $language) { $cache = getCacheName($language.$code,".code"); - if (@file_exists($cache)) { + if (@file_exists($cache) && !$_REQUEST['purge']) { $highlighted_code = io_readFile($cache, false); @touch($cache); |