git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 636a8fca authored by mmn's avatar mmn

Properly defined globals, $_PEAR caused install to fail. (thanks DRiKE)

parent fb4e9b23
......@@ -73,10 +73,17 @@ if (!function_exists('dl')) {
// global configuration object
require_once('PEAR.php');
require_once('PEAR/Exception.php');
require_once('DB/DataObject.php');
require_once('DB/DataObject/Cast.php'); # for dates
require_once 'PEAR.php';
require_once 'PEAR/Exception.php';
global $_PEAR;
$_PEAR = new PEAR;
$_PEAR->setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
require_once 'DB.php';
require_once 'DB/DataObject.php';
require_once 'DB/DataObject/Cast.php'; # for dates
global $_DB;
$_DB = new DB;
require_once(INSTALLDIR.'/lib/language.php');
......@@ -173,6 +180,3 @@ function PEAR_ErrorToPEAR_Exception($err)
}
throw new PEAR_Exception($err->getMessage());
}
/* global */ $_PEAR = new PEAR;
$_PEAR->setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
......@@ -340,10 +340,8 @@ abstract class Installer
*/
function connectDatabase($dsn)
{
// @fixme move this someplace more sensible
//set_include_path(INSTALLDIR . '/extlib' . PATH_SEPARATOR . get_include_path());
require_once 'DB.php';
return DB::connect($dsn);
global $_DB;
return $_DB->connect($dsn);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment