using now Egw and Egw\Applications direct

This commit is contained in:
Ralf Becker 2016-04-26 18:56:51 +00:00
parent e648d3344c
commit 1ffea39da0
4 changed files with 7 additions and 19 deletions

View File

@ -18,9 +18,6 @@
namespace EGroupware\Api; namespace EGroupware\Api;
// explicitly reference classes still in phpgwapi of old structure
use egw; // invalidate_session_cache
/** /**
* API - accounts * API - accounts
* *
@ -1134,7 +1131,7 @@ class Accounts
if (method_exists($GLOBALS['egw'],'invalidate_session_cache')) // egw object in setup is limited 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
} }
} }

View File

@ -14,9 +14,6 @@
namespace EGroupware\Api; 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, ...) // 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']]) && if (isset($GLOBALS['egw_info']['server']['auth_type_'.$GLOBALS['egw_info']['flags']['currentapp']]) &&
$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']['passwd'] = $new_passwd;
$GLOBALS['egw_info']['user']['account_lastpwd_change'] = DateTime::to('now','ts'); $GLOBALS['egw_info']['user']['account_lastpwd_change'] = DateTime::to('now','ts');
// invalidate EGroupware session, as password is stored in egw_info in session // 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); Accounts::cache_invalidate($account_id);
// run changepwasswd hook // run changepwasswd hook

View File

@ -14,9 +14,6 @@
namespace EGroupware\Api; namespace EGroupware\Api;
// explicitly import old not namespaced api classes
use applications;
/** /**
* Allow applications to set and use hooks to communicate with each other * 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 we run in setup, we need to read installed apps first
if (!$GLOBALS['egw_info']['apps']) if (!$GLOBALS['egw_info']['apps'])
{ {
$applications = new applications(); $applications = new Egw\Applications();
$applications->read_installed_apps(); $applications->read_installed_apps();
} }

View File

@ -17,9 +17,6 @@
namespace EGroupware\Api; namespace EGroupware\Api;
// explicitly reference classes still in phpgwapi
use egw; // on_shutdown
/** /**
* Generalized linking between entries of EGroupware apps * 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 // 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)); //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. * Would probably better called shutdown as well.
*/ */
@ -1507,7 +1504,7 @@ class Link extends Link\Storage
{ {
if (!self::$notifies) if (!self::$notifies)
{ {
egw::on_shutdown(array(__CLASS__, 'run_notifies')); Egw::on_shutdown(array(__CLASS__, 'run_notifies'));
} }
self::$notifies[] = array( self::$notifies[] = array(
'method' => self::$app_register[$notify_app]['notify'], '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() static public function run_notifies()
{ {