mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-17 13:33:15 +01:00
* Calendar: fixed planner by category view was showing all categories under "None"
This commit is contained in:
parent
c1cea7ce73
commit
5bb2ac645e
@ -2296,9 +2296,11 @@ class calendar_uiviews extends calendar_ui
|
|||||||
if (!is_array($cat2sort))
|
if (!is_array($cat2sort))
|
||||||
{
|
{
|
||||||
$cat2sort = array();
|
$cat2sort = array();
|
||||||
|
$cat_filter = $this->cat_id ? (array)$this->cat_id : array();
|
||||||
foreach((array)$this->categories->return_sorted_array(0,false,'','','',true) as $data)
|
foreach((array)$this->categories->return_sorted_array(0,false,'','','',true) as $data)
|
||||||
{
|
{
|
||||||
if (in_array($data['parent'], (array)$this->cat_id) || in_array($data['id'], (array)$this->cat_id)) // cat is a direct sub of $this->cat_id
|
if (in_array($data['parent'], $cat_filter) || in_array($data['id'], $cat_filter) ||
|
||||||
|
!$data['parent'] && !$cat_filter) // cat is a direct sub of $this->cat_id
|
||||||
{
|
{
|
||||||
$cat2sort[$data['id']] = $data['id'];
|
$cat2sort[$data['id']] = $data['id'];
|
||||||
$sort2label[$data['id']] = stripslashes($data['name']);
|
$sort2label[$data['id']] = stripslashes($data['name']);
|
||||||
|
Loading…
Reference in New Issue
Block a user