using new syntax

This commit is contained in:
Ralf Becker 2012-06-19 17:43:37 +00:00
parent 3aac26d1ab
commit e23996a45b
2 changed files with 5 additions and 25 deletions

View File

@ -110,17 +110,10 @@ class setup
{ {
$GLOBALS['egw_info']['server']['db_persistent'] = False; $GLOBALS['egw_info']['server']['db_persistent'] = False;
} }
$GLOBALS['egw']->db = $this->db = new egw_db();
try { try {
$this->db->connect( $GLOBALS['egw']->db = $this->db = new egw_db($GLOBALS['egw_domain'][$this->ConfigDomain]);
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_name'], $this->db->connect();
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_host'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_port'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_user'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_pass'],
$GLOBALS['egw_domain'][$this->ConfigDomain]['db_type']
);
} }
catch (Exception $e) { catch (Exception $e) {
return; return;

View File

@ -137,14 +137,7 @@ abstract class setup_cmd extends admin_cmd
if (is_object($GLOBALS['egw']->db) && $domain) if (is_object($GLOBALS['egw']->db) && $domain)
{ {
$GLOBALS['egw']->db->disconnect(); $GLOBALS['egw']->db->disconnect();
$GLOBALS['egw']->db->connect( $GLOBALS['egw']->db = new egw_db($GLOBALS['egw_domain'][$domain]);
$GLOBALS['egw_domain'][$domain]['db_name'],
$GLOBALS['egw_domain'][$domain]['db_host'],
$GLOBALS['egw_domain'][$domain]['db_port'],
$GLOBALS['egw_domain'][$domain]['db_user'],
$GLOBALS['egw_domain'][$domain]['db_pass'],
$GLOBALS['egw_domain'][$domain]['db_type']
);
} }
} }
@ -157,14 +150,8 @@ abstract class setup_cmd extends admin_cmd
if (is_object($GLOBALS['egw']->db)) if (is_object($GLOBALS['egw']->db))
{ {
$GLOBALS['egw']->db->disconnect(); $GLOBALS['egw']->db->disconnect();
$GLOBALS['egw']->db->connect( $GLOBALS['egw']->db = new egw_db($GLOBALS['egw_info']['server']);
$GLOBALS['egw_info']['server']['db_name'],
$GLOBALS['egw_info']['server']['db_host'],
$GLOBALS['egw_info']['server']['db_port'],
$GLOBALS['egw_info']['server']['db_user'],
$GLOBALS['egw_info']['server']['db_pass'],
$GLOBALS['egw_info']['server']['db_type']
);
if (!is_null(self::$egw_accounts_backup)) if (!is_null(self::$egw_accounts_backup))
{ {
$GLOBALS['egw']->accounts = self::$egw_accounts_backup; $GLOBALS['egw']->accounts = self::$egw_accounts_backup;