diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php
index e5a0ea77a0..f1e825e5c3 100644
--- a/addressbook/inc/class.addressbook_ui.inc.php
+++ b/addressbook/inc/class.addressbook_ui.inc.php
@@ -166,7 +166,7 @@ class addressbook_ui extends addressbook_bo
'msg' => $msg ? $msg : $_GET['msg'],
);
- $content['nm'] = $GLOBALS['egw']->session->appsession($do_email ? 'email' : 'index','addressbook');
+ $content['nm'] = egw_session::appsession($do_email ? 'email' : 'index','addressbook');
if (!is_array($content['nm']))
{
$content['nm'] = array(
@@ -389,7 +389,7 @@ class addressbook_ui extends addressbook_bo
*/
function infolog_org_view($org)
{
- $query = $GLOBALS['egw']->session->appsession('index','addressbook');
+ $query = egw_session::appsession('index','addressbook');
$query['num_rows'] = -1; // all
$query['org_view'] = $org;
$query['searchletter'] = '';
@@ -410,7 +410,7 @@ class addressbook_ui extends addressbook_bo
{
$org = ''; // use infolog default of link-title
}
- $GLOBALS['egw']->redirect_link('/index.php',array(
+ egw::redirect_link('/index.php',array(
'menuaction' => 'infolog.infolog_ui.index',
'action' => 'addressbook',
'action_id' => implode(',',$checked),
@@ -420,7 +420,7 @@ class addressbook_ui extends addressbook_bo
function ajax_add_whole_list($list, $email_type = 'email')
{
- $query = $GLOBALS['egw']->session->appsession('email','addressbook');
+ $query = egw_session::appsession('email','addressbook');
$query['filter2'] = (int)$list;
$this->action($email_type,array(),true,$success,$failed,$action_msg,$query,$msg);
@@ -466,7 +466,7 @@ class addressbook_ui extends addressbook_bo
if ($use_all || in_array($action,array('remove_from_list','delete_list')))
{
// get the whole selection
- $query = is_array($session_name) ? $session_name : $GLOBALS['egw']->session->appsession($session_name,'addressbook');
+ $query = is_array($session_name) ? $session_name : egw_session::appsession($session_name,'addressbook');
if ($use_all)
{
@@ -486,7 +486,7 @@ class addressbook_ui extends addressbook_bo
return $this->infolog_org_view($id); // uses the org-name, instead of 'selected contacts'
}
unset($checked[$n]);
- $query = $GLOBALS['egw']->session->appsession($session_name,'addressbook');
+ $query = egw_session::appsession($session_name,'addressbook');
$query['num_rows'] = -1; // all
$query['org_view'] = $id;
unset($query['filter2']);
@@ -538,7 +538,7 @@ class addressbook_ui extends addressbook_bo
break;
case 'infolog':
- $GLOBALS['egw']->redirect_link('/index.php',array(
+ egw::redirect_link('/index.php',array(
'menuaction' => 'infolog.infolog_ui.index',
'action' => 'addressbook',
'action_id' => implode(',',$checked),
@@ -566,7 +566,7 @@ class addressbook_ui extends addressbook_bo
{
$msg = lang('Distribution list deleted');
unset($query['filter2']);
- $GLOBALS['egw']->session->appsession($session_name,'addressbook',$query);
+ egw_session::appsession($session_name,'addressbook',$query);
}
return false;
@@ -592,11 +592,11 @@ class addressbook_ui extends addressbook_bo
$cat_ids = explode(",",$contact['cat_id']); //existing categiries
if (!is_array($cat_ids_new) && $cat_ids_new) $cat_ids_new = explode(",",$cat_ids_new);
//categarie add
- if ((!($cat_ids_new = $GLOBALS['egw']->session->appsession('cat_add','addressbook')) && !($cat_ids_new = $GLOBALS['egw']->session->appsession('cat_delete','addressbook'))))
+ if ((!($cat_ids_new = egw_session::appsession('cat_add','addressbook')) && !($cat_ids_new = egw_session::appsession('cat_delete','addressbook'))))
{
$action_msg = lang('no categories selected');
}
- if ($GLOBALS['egw']->session->appsession('cat_add','addressbook'))
+ if (egw_session::appsession('cat_add','addressbook'))
{
if (is_array($cat_ids_new) && ($ids_to_add = array_diff($cat_ids_new,$cat_ids)))
{
@@ -612,7 +612,7 @@ class addressbook_ui extends addressbook_bo
}
}
//categories delete
- if ($GLOBALS['egw']->session->appsession('cat_delete','addressbook'))
+ if (egw_session::appsession('cat_delete','addressbook'))
{
if (is_array($cat_ids_new) && ($ids_to_delete = array_diff($cat_ids,$cat_ids_new)) or ($cat_ids = $cat_ids_new))
{
@@ -629,8 +629,8 @@ class addressbook_ui extends addressbook_bo
}
}
$checked = array(); // to not start the single actions
- $GLOBALS['egw']->session->appsession('cat_add','addressbook',''); //delete stored categories to add
- $GLOBALS['egw']->session->appsession('cat_delete','addressbook',''); //delete stored categories to delete
+ egw_session::appsession('cat_add','addressbook',''); //delete stored categories to add
+ egw_session::appsession('cat_delete','addressbook',''); //delete stored categories to delete
break;
}
foreach($checked as $id)
@@ -648,7 +648,7 @@ class addressbook_ui extends addressbook_bo
// delete single account --> redirect to admin
elseif (count($checked) == 1 && $contact['account_id'])
{
- $GLOBALS['egw']->redirect_link('/index.php',array(
+ egw::redirect_link('/index.php',array(
'menuaction' => 'admin.uiaccounts.delete_user',
'account_id' => $contact['account_id'],
));
@@ -763,11 +763,11 @@ class addressbook_ui extends addressbook_bo
if (!$id_only && !$query['csv_export']) // do NOT store state for csv_export or querying id's (no regular view)
{
- $old_state = $GLOBALS['egw']->session->appsession($what,'addressbook',$query);
+ $old_state = egw_session::appsession($what,'addressbook',$query);
}
else
{
- $old_state = $GLOBALS['egw']->session->appsession($what,'addressbook');
+ $old_state = egw_session::appsession($what,'addressbook');
}
if (!isset($this->org_views[(string) $query['org_view']])) // we dont have an org view, unset the according col_filters
{
@@ -1236,7 +1236,7 @@ class addressbook_ui extends addressbook_bo
{
$content['msg'] = lang('Error: the entry has been updated since you opened it for editing!').'
'.
lang('Copy your changes to the clipboard, %1reload the entry%2 and merge them.','','');
@@ -1258,14 +1258,14 @@ class addressbook_ui extends addressbook_bo
echo "