From 853619787b261a16c3a2dbcb71a4f8a1ac51617d Mon Sep 17 00:00:00 2001 From: Heikki Hokkanen Date: Fri, 10 Oct 2008 22:50:04 +0300 Subject: [PATCH] Disable GeSHi line numbers if geshi_line_numbers is false. --- inc/config.php | 2 +- index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/config.php b/inc/config.php index 12d2400..41a1e61 100644 --- a/inc/config.php +++ b/inc/config.php @@ -39,7 +39,7 @@ $conf['geshi'] = false; //$conf['geshi_path'] = '/usr/share/php-geshi/geshi.php'; // Path on Debian // Use line numbers in geshi? -// commenting out this option will disable line numbers completely +// Setting this to "false" disables line numbers // Using a value of 0 will enable "NORMAL" geshi line numbers // Using values of 1 or more will enable "FANCY" geshi line numbers $conf['geshi_line_numbers'] = 5; diff --git a/index.php b/index.php index 75649c6..2b87baa 100644 --- a/index.php +++ b/index.php @@ -383,7 +383,7 @@ elseif ($action === 'viewblob') { $ext = array_pop(explode('.', $page['path'])); $lang = Geshi::get_language_name_from_extension($ext); $geshi =& new Geshi($page['data'], $lang); - if (isset($conf['geshi_line_numbers'])) { + if (is_int($conf['geshi_line_numbers'])) { if ($conf['geshi_line_numbers'] == 0) { $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS); } -- 2.11.4.GIT