From 86001bea686326498a91b9f2009242a11748a398 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 14 Dec 2007 01:28:33 +0000 Subject: [PATCH] changing the way the account object gets instanciated again a bit, as the new setup stuff wasnt working fully after the last fix --- setup/inc/class.setup.inc.php | 3 ++- setup/inc/class.setup_cmd.inc.php | 1 + setup/inc/class.setup_cmd_config.inc.php | 3 +++ setup/inc/class.setup_cmd_install.inc.php | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index a8809625e1..e9d825c4b0 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -900,7 +900,8 @@ $GLOBALS['egw']->db = clone($this->db); $GLOBALS['egw']->common =& CreateObject('phpgwapi.common'); - $GLOBALS['egw']->accounts = $this->accounts = new accounts($config); + $this->accounts = new accounts($config); + if (!is_object($GLOBALS['egw']->accounts)) $GLOBALS['egw']->accounts = $this->accounts; $this->accounts->cache_invalidate(); // the cache is shared for all instances of the class if(($GLOBALS['egw_info']['server']['account_repository'] == 'ldap') && diff --git a/setup/inc/class.setup_cmd.inc.php b/setup/inc/class.setup_cmd.inc.php index 34e42349c6..bfc01656cd 100644 --- a/setup/inc/class.setup_cmd.inc.php +++ b/setup/inc/class.setup_cmd.inc.php @@ -157,6 +157,7 @@ abstract class setup_cmd extends admin_cmd if (!is_null(self::$egw_accounts_backup)) { $GLOBALS['egw']->accounts = self::$egw_accounts_backup; + $GLOBALS['egw']->accounts->cache_invalidate(); unset(self::$egw_accounts_backup); } } diff --git a/setup/inc/class.setup_cmd_config.inc.php b/setup/inc/class.setup_cmd_config.inc.php index 25c8bf36e5..103da006b8 100644 --- a/setup/inc/class.setup_cmd_config.inc.php +++ b/setup/inc/class.setup_cmd_config.inc.php @@ -85,6 +85,8 @@ class setup_cmd_config extends setup_cmd return lang('Configuration changed.'); } + $this->restore_db(); + return lang('Nothing to change.'); } @@ -165,6 +167,7 @@ class setup_cmd_config extends setup_cmd '--ldap-context' => 'ldap_context', '--ldap-search-filter' => 'ldap_search_filter', '--ldap-group-context' => 'ldap_group_context', + '--allow-remote-admin' => 'allow_remote_admin', ); /** diff --git a/setup/inc/class.setup_cmd_install.inc.php b/setup/inc/class.setup_cmd_install.inc.php index 5fde590000..ac330378eb 100644 --- a/setup/inc/class.setup_cmd_install.inc.php +++ b/setup/inc/class.setup_cmd_install.inc.php @@ -94,6 +94,8 @@ class setup_cmd_install extends setup_cmd if ($this->verbose) echo lang('Installation started, this might take a few minutes ...')."\n"; $setup_info = self::$egw_setup->process->pass($setup_info,'new',false,True,$this->config); + $this->restore_db(); + return lang('Installation finished'); } }