From 1ffea39da02b6ac6e9df3e7a71927aa6cd972152 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 26 Apr 2016 18:56:51 +0000 Subject: [PATCH] using now Egw and Egw\Applications direct --- api/src/Accounts.php | 5 +---- api/src/Auth.php | 5 +---- api/src/Hooks.php | 5 +---- api/src/Link.php | 11 ++++------- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/api/src/Accounts.php b/api/src/Accounts.php index 31e29ab430..55c56d48ea 100644 --- a/api/src/Accounts.php +++ b/api/src/Accounts.php @@ -18,9 +18,6 @@ namespace EGroupware\Api; -// explicitly reference classes still in phpgwapi of old structure -use egw; // invalidate_session_cache - /** * API - accounts * @@ -1134,7 +1131,7 @@ class Accounts if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited { - egw::invalidate_session_cache(); // invalidates whole egw-enviroment if stored in the session + Egw::invalidate_session_cache(); // invalidates whole egw-enviroment if stored in the session } } diff --git a/api/src/Auth.php b/api/src/Auth.php index c348b2ba89..4d7973b4d2 100644 --- a/api/src/Auth.php +++ b/api/src/Auth.php @@ -14,9 +14,6 @@ namespace EGroupware\Api; -// explicit import classes still in phpgwapi -use egw; // invalidate_session_cache - // allow to set an application depending authentication type (eg. for syncml, groupdav, ...) if (isset($GLOBALS['egw_info']['server']['auth_type_'.$GLOBALS['egw_info']['flags']['currentapp']]) && $GLOBALS['egw_info']['server']['auth_type_'.$GLOBALS['egw_info']['flags']['currentapp']]) @@ -253,7 +250,7 @@ class Auth $GLOBALS['egw_info']['user']['passwd'] = $new_passwd; $GLOBALS['egw_info']['user']['account_lastpwd_change'] = DateTime::to('now','ts'); // invalidate EGroupware session, as password is stored in egw_info in session - egw::invalidate_session_cache(); + Egw::invalidate_session_cache(); } Accounts::cache_invalidate($account_id); // run changepwasswd hook diff --git a/api/src/Hooks.php b/api/src/Hooks.php index 278e1a9b01..fd83106d06 100644 --- a/api/src/Hooks.php +++ b/api/src/Hooks.php @@ -14,9 +14,6 @@ namespace EGroupware\Api; -// explicitly import old not namespaced api classes -use applications; - /** * Allow applications to set and use hooks to communicate with each other * @@ -221,7 +218,7 @@ class Hooks // if we run in setup, we need to read installed apps first if (!$GLOBALS['egw_info']['apps']) { - $applications = new applications(); + $applications = new Egw\Applications(); $applications->read_installed_apps(); } diff --git a/api/src/Link.php b/api/src/Link.php index 32c0903077..2c204d29d5 100644 --- a/api/src/Link.php +++ b/api/src/Link.php @@ -17,9 +17,6 @@ namespace EGroupware\Api; -// explicitly reference classes still in phpgwapi -use egw; // on_shutdown - /** * Generalized linking between entries of EGroupware apps * @@ -258,7 +255,7 @@ class Link extends Link\Storage } // register self::save_session_cache to run on shutdown - egw::on_shutdown(array(__CLASS__, 'save_session_cache')); + Egw::on_shutdown(array(__CLASS__, 'save_session_cache')); //error_log(__METHOD__.'() items in title-cache: '.count(self::$title_cache).' file-access-cache: '.count(self::$file_access_cache)); } @@ -295,7 +292,7 @@ class Link extends Link\Storage } /** - * Called by egw::shutdown to store the title-cache in session and run notifications + * Called by Egw::shutdown to store the title-cache in session and run notifications * * Would probably better called shutdown as well. */ @@ -1507,7 +1504,7 @@ class Link extends Link\Storage { if (!self::$notifies) { - egw::on_shutdown(array(__CLASS__, 'run_notifies')); + Egw::on_shutdown(array(__CLASS__, 'run_notifies')); } self::$notifies[] = array( 'method' => self::$app_register[$notify_app]['notify'], @@ -1522,7 +1519,7 @@ class Link extends Link\Storage } /** - * Run notifications called by egw::on_shutdown(), after regular processing is finished + * Run notifications called by Egw::on_shutdown(), after regular processing is finished */ static public function run_notifies() {