From 7fc1a27d056a83e7b495422694a5856c5bbccc6e Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 27 Feb 2008 11:09:27 +0000 Subject: [PATCH] MDL-90 fixed quickforms pear include regression; merged from MOODLE_19_STABLE --- lib/excellib.class.php | 6 +----- lib/formslib.php | 5 +---- lib/setup.php | 5 +++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/excellib.class.php b/lib/excellib.class.php index c76de10460..061669651e 100644 --- a/lib/excellib.class.php +++ b/lib/excellib.class.php @@ -24,11 +24,7 @@ // // /////////////////////////////////////////////////////////////////////////// -/// We need to add this to allow "our" PEAR package to work smoothly -/// without modifying one bit, putting it in the 1st place of the -/// include_path to be localised by Moodle without problems -ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path')); - +//setup.php icludes our hacked pear libs first require_once 'Spreadsheet/Excel/Writer.php'; /** diff --git a/lib/formslib.php b/lib/formslib.php index b2c3809368..57ebb4173f 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -21,10 +21,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License */ -//point pear include path to moodles lib/pear so that includes and requires will search there for files before anywhere else. -if (FALSE===strstr(ini_get('include_path'), $CFG->libdir.'/pear' )){ - ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path')); -} +//setup.php icludes our hacked pear libs first require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/DHTMLRulesTableless.php'; require_once 'HTML/QuickForm/Renderer/Tableless.php'; diff --git a/lib/setup.php b/lib/setup.php index 2a091f62df..77c77b3677 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -198,8 +198,9 @@ global $HTTPSPAGEREQUIRED; require_once($CFG->libdir .'/eventslib.php'); // Events functions require_once($CFG->libdir .'/grouplib.php'); // Groups functions -/// We use include some PEAR libs - ini_set("include_path", ini_get("include_path"). PATH_SEPARATOR . $CFG->libdir.'/pear'); + //point pear include path to moodles lib/pear so that includes and requires will search there for files before anywhere else + //the problem is that we need specific version of quickforms and hacked excel files :-( + ini_set('include_path', $CFG->libdir.'/pear' . PATH_SEPARATOR . ini_get('include_path')); /// Disable errors for now - needed for installation when debug enabled in config.php if (isset($CFG->debug)) { -- 2.39.5