forked from extern/egroupware
fix PHP Fatal in 16.1 minimal install caused by usage of old categories:: constants
This commit is contained in:
parent
1e299c05c2
commit
6a55dbfc08
@ -95,7 +95,7 @@ class admin_categories
|
|||||||
public function edit(array $content=null,$msg='')
|
public function edit(array $content=null,$msg='')
|
||||||
{
|
{
|
||||||
// read the session, as the global_cats param is stored with it.
|
// read the session, as the global_cats param is stored with it.
|
||||||
$appname = $content['appname'] ? $content['appname'] : ($_GET['appname']?$_GET['appname']:categories::GLOBAL_APPNAME);
|
$appname = $content['appname'] ? $content['appname'] : ($_GET['appname']?$_GET['appname']:Api\Categories::GLOBAL_APPNAME);
|
||||||
$session = Api\Cache::getSession(__CLASS__.$appname,'nm');
|
$session = Api\Cache::getSession(__CLASS__.$appname,'nm');
|
||||||
unset($session);
|
unset($session);
|
||||||
if (!isset($content))
|
if (!isset($content))
|
||||||
@ -395,7 +395,7 @@ class admin_categories
|
|||||||
foreach($rows as $key => &$row)
|
foreach($rows as $key => &$row)
|
||||||
{
|
{
|
||||||
$row['owner'] = explode(',',$row['owner']);
|
$row['owner'] = explode(',',$row['owner']);
|
||||||
if(($owner && !in_array($owner, $row['owner'])) || ((string)$query['filter'] === (string)categories::GLOBAL_ACCOUNT && $row['owner'][0] > 0))
|
if(($owner && !in_array($owner, $row['owner'])) || ((string)$query['filter'] === (string)Api\Categories::GLOBAL_ACCOUNT && $row['owner'][0] > 0))
|
||||||
{
|
{
|
||||||
unset($rows[$key]);
|
unset($rows[$key]);
|
||||||
$count--;
|
$count--;
|
||||||
@ -499,7 +499,7 @@ class admin_categories
|
|||||||
'row_id' => 'id',
|
'row_id' => 'id',
|
||||||
'dataStorePrefix' => 'categories' // Avoid conflict with user list when in admin
|
'dataStorePrefix' => 'categories' // Avoid conflict with user list when in admin
|
||||||
);
|
);
|
||||||
$content['nm']['filter'] = $this->appname == 'admin'?categories::GLOBAL_ACCOUNT:$GLOBALS['egw_info']['user']['account_id'];
|
$content['nm']['filter'] = $this->appname == 'admin'?Api\Categories::GLOBAL_ACCOUNT:$GLOBALS['egw_info']['user']['account_id'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -620,7 +620,7 @@ class admin_categories
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function get_actions($appname=categories::GLOBAL_APPNAME) {
|
protected function get_actions($appname=Api\Categories::GLOBAL_APPNAME) {
|
||||||
|
|
||||||
$actions = array(
|
$actions = array(
|
||||||
'open' => array( // does edit if allowed, otherwise view
|
'open' => array( // does edit if allowed, otherwise view
|
||||||
|
@ -636,7 +636,7 @@ class infolog_groupdav extends Api\CalDAV\Handler
|
|||||||
// make sure category is global, as otherwise it will not be transmitted to other users
|
// make sure category is global, as otherwise it will not be transmitted to other users
|
||||||
if (!Api\Categories::is_global($task['info_cat']))
|
if (!Api\Categories::is_global($task['info_cat']))
|
||||||
{
|
{
|
||||||
$cat_obj = new Api\Categories(categories::GLOBAL_ACCOUNT, 'infolog');
|
$cat_obj = new Api\Categories(Api\Categories::GLOBAL_ACCOUNT, 'infolog');
|
||||||
$cat = Api\Categories::read($task['info_cat']);
|
$cat = Api\Categories::read($task['info_cat']);
|
||||||
$cat['owner'] = Api\Categories::GLOBAL_ACCOUNT;
|
$cat['owner'] = Api\Categories::GLOBAL_ACCOUNT;
|
||||||
$cat['access'] = 'public';
|
$cat['access'] = 'public';
|
||||||
|
Loading…
Reference in New Issue
Block a user