"- removed unneeded stripslashes while reading the configuration, as it \"eats\" the backslashed of windows pathes (eg. messes up the default cache path)

- replaced depricated fetchSingle() with fetchColumn()"
This commit is contained in:
Ralf Becker 2009-04-28 19:32:29 +00:00
parent e50f35cbad
commit a1c7c87195

View File

@ -86,9 +86,9 @@ class egw extends egw_minimal
// check if eGW is already setup, if not redirect to setup/
try {
$this->db->connect();
if (!($num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle()))
if (!($num_config = $this->db->select(config::TABLE,'COUNT(config_name)',false,__LINE__,__FILE__)->fetchColumn()))
{
$phpgw_config = $this->db->select('phpgw_config','COUNT(config_name)',false,__LINE__,__FILE__)->fetchSingle();
$phpgw_config = $this->db->select('phpgw_config','COUNT(config_name)',false,__LINE__,__FILE__)->fetchColumn();
}
}
catch(Exception $e) {
@ -115,7 +115,7 @@ class egw extends egw_minimal
$system_charset = $this->db->select(config::TABLE,'config_value',array(
'config_app' => 'phpgwapi',
'config_name' => 'system_charset',
),__LINE__,__FILE__)->fetchSingle();
),__LINE__,__FILE__)->fetchColumn();
if ($system_charset)
{
$this->db->Link_ID->SetCharSet($system_charset);
@ -123,7 +123,7 @@ class egw extends egw_minimal
// load up the $GLOBALS['egw_info']['server'] array
foreach($this->db->select(config::TABLE,'*',array('config_app' => 'phpgwapi'),__LINE__,__FILE__) as $row)
{
$GLOBALS['egw_info']['server'][$row['config_name']] = stripslashes($row['config_value']);
$GLOBALS['egw_info']['server'][$row['config_name']] = $row['config_value'];
}
//$GLOBALS['egw_info']['server'] = config::read('phpgwapi'); would unserialize arrays