From aff27b4aaa2236a9d1a49d0a9f3ac7f0975ca801 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Feb 2016 11:17:09 +0000 Subject: [PATCH] removing deprecated PHP4 constructors filling logs with deprecation notices under PHP 7 --- phpgwapi/inc/class.accounts.inc.php | 13 ------------- phpgwapi/inc/class.acl.inc.php | 11 ----------- phpgwapi/inc/class.applications.inc.php | 2 +- phpgwapi/inc/class.egw_session.inc.php | 17 +++++++++-------- phpgwapi/inc/class.preferences.inc.php | 12 ------------ 5 files changed, 10 insertions(+), 45 deletions(-) diff --git a/phpgwapi/inc/class.accounts.inc.php b/phpgwapi/inc/class.accounts.inc.php index 4e5bb66184..972db72a63 100644 --- a/phpgwapi/inc/class.accounts.inc.php +++ b/phpgwapi/inc/class.accounts.inc.php @@ -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 * diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index 68a14b44f9..f5f5501002 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -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') { /* diff --git a/phpgwapi/inc/class.applications.inc.php b/phpgwapi/inc/class.applications.inc.php index 03e255e05a..ef046c0307 100755 --- a/phpgwapi/inc/class.applications.inc.php +++ b/phpgwapi/inc/class.applications.inc.php @@ -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)) { diff --git a/phpgwapi/inc/class.egw_session.inc.php b/phpgwapi/inc/class.egw_session.inc.php index ab941bcc71..c142a47d77 100644 --- a/phpgwapi/inc/class.egw_session.inc.php +++ b/phpgwapi/inc/class.egw_session.inc.php @@ -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; diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 6ff7879d34..166dec971c 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -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() *