From: <nel...@us...> - 2007-03-30 12:03:50
|
Author: nelius_weiss Date: Fri Mar 30 13:54:52 2007 New Revision: 23553 URL: http://www.egroupware.org/viewvc?rev=3D3D23553&view=3D3Drev Log: add patch from lars for anonymous access handling Modified: branches/1.4/phpgwapi/inc/class.sessions.inc.php Modified: branches/1.4/phpgwapi/inc/class.sessions.inc.php URL: http://www.egroupware.org/viewvc/branches/1.4/phpgwapi/inc/class.sessi= =3D ons.inc.php?rev=3D3D23553&r1=3D3D23552&r2=3D3D23553&view=3D3Ddiff =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D= =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D =3D3D=3D3D=3D3D --- branches/1.4/phpgwapi/inc/class.sessions.inc.php (original) +++ branches/1.4/phpgwapi/inc/class.sessions.inc.php Fri Mar 30 13:54:52 20= =3D 07 @@ -561,15 +561,35 @@ { $GLOBALS['egw']->ADOdb =3D3D null; $GLOBALS['egw_info']['user']['domain'] =3D3D $this->account_domain; + =3D + // workaround to save data which is needed for anonymous access =3D + $db_save =3D3D array('db_host','db_port','db_name','db_user','db_pass'= ,'=3D db_type'); + =3D + foreach($db_save as $value) + { + $db_save_data[$value] =3D3D $GLOBALS['egw_info']['server'][$value]; + } + =3D // reset the db all other phpgwapi data $GLOBALS['egw_info']['server'] =3D3D array(); $GLOBALS['egw_info']['server']['db_host'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_host']; + + =3D $GLOBALS['egw_info']['server']['db_port'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_port']; $GLOBALS['egw_info']['server']['db_name'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_name']; $GLOBALS['egw_info']['server']['db_user'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_user']; $GLOBALS['egw_info']['server']['db_pass'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_pass']; $GLOBALS['egw_info']['server']['db_type'] =3D3D $GLOBALS['egw_domain']= [$=3D this->account_domain]['db_type']; + =3D + // workaround part 2 + foreach($db_save as $value) + { + if(!$GLOBALS['egw_info']['server'][$value]) $GLOBALS['egw_info']['ser= =3D ver'][$value] =3D3D $db_save_data[$value]; + } + + =3D $GLOBALS['egw']->setup('',False); + =3D } =3D //echo "<p>session::create(login=3D3D'$login'): lid=3D3D'$this->account= _lid=3D ', domain=3D3D'$this->account_domain'</p>\n"; |