From 2a34b88111deff63b421d5300b9f7d014a5e1332 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 12 Mar 2014 13:14:23 +0000 Subject: [PATCH] fixed not working referesh of ACL list --- admin/inc/class.admin_acl.inc.php | 17 ++++++----------- phpgwapi/js/jsapi/jsapi.js | 9 ++++++--- preferences/inc/class.preferences_acl.inc.php | 5 ----- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/admin/inc/class.admin_acl.inc.php b/admin/inc/class.admin_acl.inc.php index be68a27ae9..000c8f1b0f 100644 --- a/admin/inc/class.admin_acl.inc.php +++ b/admin/inc/class.admin_acl.inc.php @@ -17,11 +17,6 @@ */ class admin_acl { - /** - * Appname we are running as - */ - const APPNAME = 'preferences'; - /** * Methods callable via menuaction * @var array @@ -184,15 +179,15 @@ class admin_acl } elseif (!$old_apps) { - egw_framework::refresh_opener(lang('ACL added.'), static::APPNAME, null, 'add'); + egw_framework::refresh_opener(lang('ACL added.'), 'admin', null, 'add'); } elseif (!$added_apps) { - egw_framework::refresh_opener(lang('ACL deleted.'), static::APPNAME, $deleted_ids, 'delete'); + egw_framework::refresh_opener(lang('ACL deleted.'), 'admin', $deleted_ids, 'delete'); } else { - egw_framework::refresh_opener(lang('ACL updated.'), static::APPNAME, null, 'edit'); + egw_framework::refresh_opener(lang('ACL updated.'), 'admin', null, 'edit'); } } @@ -220,18 +215,18 @@ class admin_acl elseif (!$rights) // all rights removed --> delete it { $this->acl->delete_repository($content['acl_appname'], $content['acl_location'], $content['acl_account']); - egw_framework::refresh_opener(lang('ACL deleted.'), static::APPNAME, $id, 'delete'); + egw_framework::refresh_opener(lang('ACL deleted.'), 'admin', $id, 'delete'); } else { $this->acl->add_repository($content['acl_appname'], $content['acl_location'], $content['acl_account'], $rights); if ($content['id']) { - egw_framework::refresh_opener(lang('ACL updated.'), static::APPNAME, $id, 'edit'); + egw_framework::refresh_opener(lang('ACL updated.'), 'admin', $id, 'edit'); } else { - egw_framework::refresh_opener(lang('ACL added.'), static::APPNAME, $id, 'add'); + egw_framework::refresh_opener(lang('ACL added.'), 'admin', $id, 'add'); } } } diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 8e25d5af04..addd24101c 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -257,10 +257,13 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with, _msg_t } // Refresh target or current app too - var et2 = etemplate2.getByApplication(_targetapp || egw_appName); - for(var i = 0; i < et2.length; i++) + if ((_targetapp || egw_appName) != _app) { - et2[i].refresh(_msg,_app,_id,_type); + var et2t = etemplate2.getByApplication(_targetapp || egw_appName); + for(var i = 0; i < et2t.length; i++) + { + et2t[i].refresh(_msg,_app,_id,_type); + } } //In case that we have etemplate2 ready but it's empty if (et2.length >= 1) diff --git a/preferences/inc/class.preferences_acl.inc.php b/preferences/inc/class.preferences_acl.inc.php index 6fd6693795..8364545f72 100644 --- a/preferences/inc/class.preferences_acl.inc.php +++ b/preferences/inc/class.preferences_acl.inc.php @@ -17,11 +17,6 @@ */ class preferences_acl extends admin_acl { - /** - * Appname we are running as - */ - const APPNAME = 'preferences'; - function __construct() { translation::add_app('admin');