dynamically autoloading sub-object of egw-object, moved __wakeup methods to concerned classes and other "modernsations" ;-)

This commit is contained in:
Ralf Becker 2008-03-21 20:50:13 +00:00
parent 30ede51997
commit ac04409df7
3 changed files with 6 additions and 14 deletions

View File

@ -134,11 +134,7 @@ class accounts_ldap
$this->ds = $this->ldap->ldapConnect($this->frontend->config['ldap_host'],
$this->frontend->config['ldap_root_dn'],$this->frontend->config['ldap_root_pw']);
if(!@is_object($GLOBALS['egw']->translation))
{
$GLOBALS['egw']->translation =& new translation();
}
$this->translation =& $GLOBALS['egw']->translation;
$this->translation = $GLOBALS['egw']->translation;
$this->user_context = $this->frontend->config['ldap_context'];
$this->account_filter = $this->frontend->config['ldap_search_filter'];

View File

@ -14,8 +14,6 @@
/* $Id$ */
include_once(EGW_INCLUDE_ROOT.'/phpgwapi/inc/class.ldapserverinfo.inc.php');
/*!
@class contacts
@abstract Contact List System
@ -89,7 +87,7 @@
if(!function_exists('ldap_connect'))
{
/* log does not exist in setup(, yet) */
if(is_object($GLOBALS['egw']->log))
if(isset($GLOBALS['egw']->log))
{
$GLOBALS['egw']->log->message('F-Abort, LDAP support unavailable');
$GLOBALS['egw']->log->commit();
@ -117,7 +115,7 @@
if(!$this->ds = ldap_connect($host))
{
/* log does not exist in setup(, yet) */
if(is_object($GLOBALS['egw']->log))
if(isset($GLOBALS['egw']->log))
{
$GLOBALS['egw']->log->message('F-Abort, Failed connecting to LDAP server');
$GLOBALS['egw']->log->commit();
@ -209,7 +207,7 @@
}
if(!@ldap_bind($this->ds, $dn, $passwd)) {
if(is_object($GLOBALS['egw']->log)) {
if(isset($GLOBALS['egw']->log)) {
$GLOBALS['egw']->log->message('F-Abort, Failed binding to LDAP server');
$GLOBALS['egw']->log->commit();
}
@ -237,7 +235,7 @@
*/
function restoreSessionData()
{
if (is_object($GLOBALS['egw']->session)) // no availible in setup
if (isset($GLOBALS['egw']->session)) // no availible in setup
{
$this->ldapServerInfo = $GLOBALS['egw']->session->appsession('ldapServerInfo');
}
@ -247,7 +245,7 @@
*/
function saveSessionData()
{
if (is_object($GLOBALS['egw']->session)) // no availible in setup
if (isset($GLOBALS['egw']->session)) // no availible in setup
{
$GLOBALS['egw']->session->appsession('ldapServerInfo','',$this->ldapServerInfo);
}

View File

@ -182,8 +182,6 @@
$this->egw_domains = $domain_names;
/* Create the crypto object */
$GLOBALS['egw']->crypto =& CreateObject('phpgwapi.crypto');
if ($GLOBALS['egw_info']['server']['usecookies'])
{
$this->egw_set_cookiedomain();