From 0cbcc33076d5fa823b81b83e9bcc621b3d13aa91 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Tue, 23 Aug 2005 09:30:50 +0000 Subject: [PATCH] Fix warning message when installing. Sigh. --- docs/NEWS | 3 +++ serendipity_config.inc.php | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 8d68d54..2c6ef17 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 0.8.5 () ------------------------------------------------------------------------ + * Fix cosmetic warning message about missing S9Y_PEAR_PATH when + installing. (garvinhicking) + Version 0.8.4 (August 19th, 2005) ------------------------------------------------------------------------ diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 6c38580..fdbab1c 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -167,6 +167,20 @@ if ( !defined('IN_installer') && IS_installed === false ) { serendipity_die(sprintf(SERENDIPITY_NOT_INSTALLED, 'serendipity_admin.php')); } +// Check whether local or global PEAR should be used. You can put a +// $serendipity['use_PEAR'] = true; +// in your serendipity_config_local.inc.php file to enable this. +// The required PEAR (and other) packages are mentioned in the file +// bundled-libs/.current_version +$old_include = @ini_get('include_path'); +if (@ini_set('include_path', $old_include . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR . $serendipity['serendipityPath'] . 'bundled-libs/') && $serendipity['use_PEAR']) { + @define('S9Y_PEAR', true); + @define('S9Y_PEAR_PATH', ''); +} else { + @define('S9Y_PEAR', false); + @define('S9Y_PEAR_PATH', S9Y_INCLUDE_PATH . 'bundled-libs/'); +} + if (defined('IN_installer') && IS_installed === false) { $serendipity['lang'] = $serendipity['autolang']; $css_mode = 'serendipity_admin.css'; @@ -189,20 +203,6 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/se define('IS_up2date', version_compare($serendipity['version'], $serendipity['versionInstalled'], '<=')); -// Check whether local or global PEAR should be used. You can put a -// $serendipity['use_PEAR'] = true; -// in your serendipity_config_local.inc.php file to enable this. -// The required PEAR (and other) packages are mentioned in the file -// bundled-libs/.current_version -$old_include = @ini_get('include_path'); -if (@ini_set('include_path', $old_include . PATH_SEPARATOR . $serendipity['serendipityPath'] . PATH_SEPARATOR . $serendipity['serendipityPath'] . 'bundled-libs/') && $serendipity['use_PEAR']) { - @define('S9Y_PEAR', true); - @define('S9Y_PEAR_PATH', ''); -} else { - @define('S9Y_PEAR', false); - @define('S9Y_PEAR_PATH', S9Y_INCLUDE_PATH . 'bundled-libs/'); -} - /* * Include main functions */ -- 2.39.5