removing deprecated PHP4 constructors filling logs with deprecation notices under PHP 7

This commit is contained in:
Ralf Becker 2016-02-15 11:17:09 +00:00
parent bc7fa3bc8b
commit aff27b4aaa
5 changed files with 10 additions and 45 deletions

View File

@ -206,19 +206,6 @@ class accounts
$this->backend = new $backend_class($this);
}
/**
* Old constructor name
*
* @param int $account_id =0 depricated param to instanciate for the given account_id
* @deprecated use __construct
*/
function accounts($account_id=0)
{
$this->account_id = (int) $account_id;
$this->__construct();
}
/**
* set the accountId
*

View File

@ -84,17 +84,6 @@ class acl
}
}
/**
* PHP4 constructor
*
* @deprecated use __construct
* @param int $account_id = null
*/
function acl($account_id = null)
{
$this->__construct($account_id);
}
function DONTlist_methods($_type='xmlrpc')
{
/*

View File

@ -41,7 +41,7 @@ class applications
*
* @param $account_id account id
*/
function applications($account_id = '')
function __construct($account_id = '')
{
if (is_object($GLOBALS['egw_setup']) && is_object($GLOBALS['egw_setup']->db))
{

View File

@ -530,7 +530,8 @@ class egw_session
}
$GLOBALS['egw_info']['user']['account_id'] = $this->account_id;
$GLOBALS['egw']->accounts->accounts($this->account_id);
$GLOBALS['egw']->accounts->__construct();
$GLOBALS['egw']->accounts->setAccountId($this->account_id);
// for *DAV and eSync we use a pseudo sessionid created from md5(user:passwd)
// --> allows this stateless protocolls which use basic auth to use sessions!
@ -989,9 +990,9 @@ class egw_session
if ($fill_egw_info_and_repositories)
{
$GLOBALS['egw']->acl->acl($this->account_id);
$GLOBALS['egw']->preferences->preferences($this->account_id);
$GLOBALS['egw']->applications->applications($this->account_id);
$GLOBALS['egw']->acl->__construct($this->account_id);
$GLOBALS['egw']->preferences->__construct($this->account_id);
$GLOBALS['egw']->applications->__construct($this->account_id);
}
if (!$this->account_lid)
{
@ -1489,9 +1490,9 @@ class egw_session
*/
public function read_repositories()
{
$GLOBALS['egw']->acl->acl($this->account_id);
$GLOBALS['egw']->preferences->preferences($this->account_id);
$GLOBALS['egw']->applications->applications($this->account_id);
$GLOBALS['egw']->acl->__construct($this->account_id);
$GLOBALS['egw']->preferences->__construct($this->account_id);
$GLOBALS['egw']->applications->__construct($this->account_id);
$user = $GLOBALS['egw']->accounts->read($this->account_id);
// set homedirectory from auth_ldap or auth_ads, to be able to use it in vfs
@ -1512,7 +1513,7 @@ class egw_session
$user['preferences'] = $GLOBALS['egw']->preferences->read_repository();
if (is_object($GLOBALS['egw']->datetime))
{
$GLOBALS['egw']->datetime->datetime(); // to set tz_offset from the now read prefs
$GLOBALS['egw']->datetime->__construct(); // to set tz_offset from the now read prefs
}
$user['apps'] = $GLOBALS['egw']->applications->read_repository();
$user['domain'] = $this->account_domain;

View File

@ -164,18 +164,6 @@ class preferences
return $this->account_id < self::DEFAULT_ID ? $this->account_id-self::DEFAULT_ID : $this->account_id;
}
/**
* Old PHP4 contstructor
*
* @param int|string $account_id =''
* @return preferences
* @deprecated
*/
function preferences($account_id = '')
{
self::__construct($account_id);
}
/**
* Magic function to avoid storing perferences in session, as they get re-read on each request by egw_session::verify()
*