mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
Make sure we use the right app when cleaning select-cat value
This commit is contained in:
parent
bbd41b4255
commit
04bedf30be
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
namespace EGroupware\Api\Etemplate\Widget;
|
namespace EGroupware\Api\Etemplate\Widget;
|
||||||
|
|
||||||
|
use EGroupware\Api\Acl;
|
||||||
use EGroupware\Api\Etemplate;
|
use EGroupware\Api\Etemplate;
|
||||||
use EGroupware\Api;
|
use EGroupware\Api;
|
||||||
|
|
||||||
@ -432,6 +433,18 @@ class Select extends Etemplate\Widget
|
|||||||
'',
|
'',
|
||||||
$no_lang, $this->attrs['readonly'] ?? false, self::get_array(self::$request->content, $form_name), $form_name
|
$no_lang, $this->attrs['readonly'] ?? false, self::get_array(self::$request->content, $form_name), $form_name
|
||||||
);
|
);
|
||||||
|
// Remove unavailable from value
|
||||||
|
$application = self::expand_name($this->attrs['application'], 0, 0, '', '', self::$cont);
|
||||||
|
if(!$application || $application === $GLOBALS['egw']->categories->app_name)
|
||||||
|
{
|
||||||
|
$categories = $GLOBALS['egw']->categories;
|
||||||
|
}
|
||||||
|
else // we need to instanciate a new cat object for the correct application
|
||||||
|
{
|
||||||
|
$categories = new Api\Categories('', $application);
|
||||||
|
}
|
||||||
|
$value =& self::get_array(self::$request->content, $form_name, true);
|
||||||
|
$value = $categories->check_list(Acl::READ, $value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user