From bdfcc823512aa3119b7207d3d1abb066489d7b0c Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Tue, 13 Mar 2007 03:20:53 +0000 Subject: [PATCH] Applied patches from OMGS #61. Also added nulling of membership key to try to avoid ldap issues on group creation. --- setup/inc/class.setup.inc.php | 11 ++++++----- setup/inc/functions.inc.php | 9 ++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index 4f8cbd7255..3929e08a6e 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -175,6 +175,7 @@ { #phpinfo(); $FormLogout = get_var('FormLogout', array('GET','POST')); + $ConfigLang = get_var('ConfigLang', array('POST','COOKIE')); if(!$FormLogout) { $ConfigLogin = get_var('ConfigLogin', array('POST')); @@ -188,7 +189,6 @@ $ConfigPW = get_var('ConfigPW', array('POST','COOKIE')); $HeaderUser = get_var('HeaderUser', array('POST','COOKIE')); $HeaderPW = get_var('HeaderPW', array('POST','COOKIE')); - $ConfigLang = get_var('ConfigLang', array('POST','COOKIE')); /* Setup defaults to aid in header upgrade to version 1.26. * This was the first version to include the following values. @@ -215,7 +215,7 @@ $this->set_cookie('ConfigUser','',$expire,'/'); $this->set_cookie('ConfigPW','',$expire,'/'); $this->set_cookie('ConfigDomain','',$expire,'/'); - $this->set_cookie('ConfigLang','',$expire,'/'); +// $this->set_cookie('ConfigLang','',$expire,'/'); $GLOBALS['egw_info']['setup']['LastDomain'] = $_COOKIE['ConfigDomain']; $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = lang('You have successfully logged out'); $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = ''; @@ -225,7 +225,7 @@ $expire = time() - 86400; $this->set_cookie('HeaderUser','',$expire,'/'); $this->set_cookie('HeaderPW','',$expire,'/'); - $this->set_cookie('ConfigLang','',$expire,'/'); +// $this->set_cookie('ConfigLang','',$expire,'/'); $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('You have successfully logged out'); $GLOBALS['egw_info']['setup']['ConfigLoginMSG'] = ''; return False; @@ -920,6 +920,7 @@ 'account_primary_group' => $primary_group_id, 'account_expires' => -1, 'account_email' => $email, + 'account_members' => '' ); if (!($accountid = $GLOBALS['egw']->accounts->save($account))) { @@ -970,7 +971,7 @@ $accounts = $GLOBALS['egw']->accounts->search(array( 'type' => 'accounts', 'start' => 0, - 'offset' => 2, // we only need to check 2 accounts, if we just check for not anonymous + 'offset' => 2 // we only need to check 2 accounts, if we just check for not anonymous )); if (!$accounts || !is_array($accounts) || !count($accounts)) @@ -1020,7 +1021,7 @@ $this->db->delete($this->acl_table,array( 'acl_appname' => $app, 'acl_location' => $location, - 'acl_account' => $account, + 'acl_account' => $account ),__LINE__,__FILE__); if ((int) $rights) diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index c70c032732..538d89a22a 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -154,11 +154,14 @@ { if($data['available'] && !empty($data['lang'])) { - $selected = ''; $short = substr($data['lang'],0,2); - if ($short == $ConfigLang || empty($ConfigLang) && $short == substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2)) + if ($short == $ConfigLang || $data['lang'] == $ConfigLang || empty($ConfigLang) && $short == substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2)) { - $selected = ' selected="selected"'; + $selected = ' selected'; + } + else + { + $selected = ''; } $select .= '' . "\n"; }