]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-90 fixed quickforms pear include regression; merged from MOODLE_19_STABLE
authorskodak <skodak>
Wed, 27 Feb 2008 11:09:27 +0000 (11:09 +0000)
committerskodak <skodak>
Wed, 27 Feb 2008 11:09:27 +0000 (11:09 +0000)
lib/excellib.class.php
lib/formslib.php
lib/setup.php

index c76de10460575074f0c4a174e5955fbf4fb9ed8c..061669651e61a9cb2d85537759e7669b435deeb3 100644 (file)
 //                                                                       //
 ///////////////////////////////////////////////////////////////////////////
 
-/// 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';
 
 /**
index b2c38093683289c90743c1f6a5dfe95e9676476d..57ebb4173f3827d11672c667573f66ffde4b3a4e 100644 (file)
  * @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';
index 2a091f62df9ef1890b3427ef9969466343185793..77c77b367789017de50a195fb7d4355ff3119481 100644 (file)
@@ -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)) {