mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
add missing is_global function
This commit is contained in:
parent
5f99cac425
commit
312c782961
@ -668,6 +668,20 @@ class categories
|
||||
return $cache[$cat['cat_name']] = (int) $cats[0]['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if catgory is global (owner <= 0 || appname == 'phpgw')
|
||||
*
|
||||
* @param int|array $cat
|
||||
* @return boolean
|
||||
*/
|
||||
static function is_global($cat)
|
||||
{
|
||||
if (!is_array($cat) && !($cat = self::read($cat))) return null; // cat not found
|
||||
|
||||
return $cat['owner'] <= self::GLOBAL_ACCOUNT || $cat['appname'] == self::GLOBAL_APPNAME;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* return category information for a given id
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user