forked from extern/egroupware
fixed not working referesh of ACL list
This commit is contained in:
parent
8b326fb60f
commit
2a34b88111
@ -17,11 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
class admin_acl
|
class admin_acl
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Appname we are running as
|
|
||||||
*/
|
|
||||||
const APPNAME = 'preferences';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods callable via menuaction
|
* Methods callable via menuaction
|
||||||
* @var array
|
* @var array
|
||||||
@ -184,15 +179,15 @@ class admin_acl
|
|||||||
}
|
}
|
||||||
elseif (!$old_apps)
|
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)
|
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
|
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
|
elseif (!$rights) // all rights removed --> delete it
|
||||||
{
|
{
|
||||||
$this->acl->delete_repository($content['acl_appname'], $content['acl_location'], $content['acl_account']);
|
$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
|
else
|
||||||
{
|
{
|
||||||
$this->acl->add_repository($content['acl_appname'], $content['acl_location'], $content['acl_account'], $rights);
|
$this->acl->add_repository($content['acl_appname'], $content['acl_location'], $content['acl_account'], $rights);
|
||||||
if ($content['id'])
|
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
|
else
|
||||||
{
|
{
|
||||||
egw_framework::refresh_opener(lang('ACL added.'), static::APPNAME, $id, 'add');
|
egw_framework::refresh_opener(lang('ACL added.'), 'admin', $id, 'add');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,10 +257,13 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with, _msg_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Refresh target or current app too
|
// Refresh target or current app too
|
||||||
var et2 = etemplate2.getByApplication(_targetapp || egw_appName);
|
if ((_targetapp || egw_appName) != _app)
|
||||||
for(var i = 0; i < et2.length; i++)
|
|
||||||
{
|
{
|
||||||
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
|
//In case that we have etemplate2 ready but it's empty
|
||||||
if (et2.length >= 1)
|
if (et2.length >= 1)
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
class preferences_acl extends admin_acl
|
class preferences_acl extends admin_acl
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Appname we are running as
|
|
||||||
*/
|
|
||||||
const APPNAME = 'preferences';
|
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
translation::add_app('admin');
|
translation::add_app('admin');
|
||||||
|
Loading…
Reference in New Issue
Block a user