Index: trunk/admin/install.php =================================================================== diff -u -N -r374 -r383 --- trunk/admin/install.php (.../install.php) (revision 374) +++ trunk/admin/install.php (.../install.php) (revision 383) @@ -246,7 +246,7 @@ if(strlen($state)==0) { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $installed = $ado ? TableExists($ado,"ConfigurationAdmin,Category,Permissions") : false; if(!minimum_php_version("4.1.2")) @@ -324,7 +324,7 @@ $LoggedIn = FALSE; if($_POST["UserName"]=="root") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $sql = "SELECT * FROM ".$g_TablePrefix."ConfigurationValues WHERE VariableName='RootPass'"; $rs = $ado->Execute($sql); @@ -381,7 +381,7 @@ case 1: /* clean out all tables */ $install_type = 4; - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $filename = $pathtoroot.$admin."/install/inportal_remove.sql"; RunSchemaFile($ado,$filename); /* run install again */ @@ -398,7 +398,7 @@ case 4: $install_type = 6; /* clean out all tables */ - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); //$filename = $pathtoroot.$admin."/install/inportal_remove.sql"; //RunSchemaFile($ado,$filename); /* run install again */ @@ -424,7 +424,7 @@ } if ($state == "upgrade") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $Modules = array(); $Texts = array(); @@ -484,7 +484,7 @@ } if ($state == "upgrade_process") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $mod_arr = $_POST['modules']; foreach($mod_arr as $p) @@ -581,7 +581,7 @@ if(file_exists($backupfile) && is_readable($backupfile)) { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $show_warning = false; @@ -639,7 +639,7 @@ if($state=="restore_run") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $FileOffset = (int)$_GET["Offset"]; if(!strlen($backupfile)) $backupfile = SuperStrip($_GET['File'], true); @@ -885,7 +885,7 @@ if($state=="reinstall") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $show_upgrade = false; @@ -1036,7 +1036,7 @@ if($state=="runsql") { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $installed = TableExists($ado,"ConfigurationAdmin,Category,Permissions"); if(!$installed) { @@ -1130,7 +1130,7 @@ { $pass = md5($pass); $sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$pass' WHERE VariableName='RootPass' OR VariableName='RootPassVerify'"; - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $ado->Execute($sql); $state="modselect"; } @@ -1145,7 +1145,7 @@ { include_once($pathtoroot."kernel/include/xml.php"); - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); if (TableExists($ado, "Language,Phrase")) { $MaxInserts = 200; @@ -1344,7 +1344,7 @@ if($state=="lang_default_set") { // phpinfo(INFO_VARIABLES); - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $PhraseTable = GetTablePrefix()."ImportPhrases"; $EventTable = GetTablePrefix()."ImportEvents"; $ado->Execute("DROP TABLE IF EXISTS $PhraseTable"); @@ -1376,7 +1376,7 @@ $doms = $_POST["domain"]; if(is_array($doms)) { - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); require_once $pathtoroot.'kernel/include/tag-class.php'; if( !isset($objTagList) || !is_object($objTagList) ) $objTagList = new clsTagList(); foreach($doms as $p) @@ -1468,7 +1468,7 @@ //$g_DomainName= $_SERVER["SERVER_NAME"]; save_values(); - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); if(substr($sitepath,0,1)!="/") $sitepath="/".$sitepath; if(substr($sitepath,-1)!="/") @@ -1555,7 +1555,7 @@ ## get & define Non-Blocking & Blocking versions ## $blocking_sockets = minimum_php_version("4.3.0")? 0 : 1; - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); $sql = "UPDATE ".$g_TablePrefix."ConfigurationValues SET VariableValue = '$blocking_sockets' WHERE VariableName='SocketBlockingMode'"; $ado->Execute($sql); ## get & define Non-Blocking & Blocking versions ## Index: trunk/admin/install/restore_select.php =================================================================== diff -u -N -r103 -r383 --- trunk/admin/install/restore_select.php (.../restore_select.php) (revision 103) +++ trunk/admin/install/restore_select.php (.../restore_select.php) (revision 383) @@ -1,7 +1,7 @@ Execute($sql); Index: trunk/admin/install/install_lib.php =================================================================== diff -u -N -r315 -r383 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 315) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 383) @@ -611,7 +611,7 @@ $GLOBALS['g_DBUserPassword'] = $_POST["ServerPass"]; // connect to database - $ado = inst_GetADODBConnection(); + $ado =& inst_GetADODBConnection(); if($ado->ErrorNo() != 0) { // was error while connecting Index: trunk/admin/install/inst_ado.php =================================================================== diff -u -N -r13 -r383 --- trunk/admin/install/inst_ado.php (.../inst_ado.php) (revision 13) +++ trunk/admin/install/inst_ado.php (.../inst_ado.php) (revision 383) @@ -1,25 +1,23 @@ 0) - { - $g_adodbConnection = ADONewConnection($g_DBType); - $connected = $g_adodbConnection->PConnect($g_DBHost,$g_DBUser,$g_DBUserPassword,$g_DBName); - if(!$connected) - { - //echo "Error connecting to database $g_DBHost
\n"; - // die(); - } - $ADODB_CACHE_DIR = $pathtoroot."cache"; - $ADODB_FETCH_MODE = 2; - $ADODB_COUNTRECS = FALSE; - $g_adodbConnection->debug = false; - $g_adodbConnection->cacheSecs = 3600; - } - return $g_adodbConnection; + if( !isset($DB) && strlen($g_DBType) > 0 ) + { + $DB = ADONewConnection($g_DBType); + $connected = $DB->PConnect($g_DBHost, $g_DBUser, $g_DBUserPassword, $g_DBName); + + $ADODB_CACHE_DIR = $pathtoroot.'cache'; + $ADODB_FETCH_MODE = 2; + $ADODB_COUNTRECS = false; + $DB->debug = false; + $DB->cacheSecs = 3600; + } + return $DB; } + ?> Index: trunk/index.php =================================================================== diff -u -N -r274 -r383 --- trunk/index.php (.../index.php) (revision 274) +++ trunk/index.php (.../index.php) (revision 383) @@ -5,6 +5,7 @@ if( defined('DEBUG_MODE') ) { ini_set('error_prepend_string',''); + //ini_set('error_prepend_string',''); } else