mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 16:29:22 +01:00
adapting for changed categories class
This commit is contained in:
parent
43553a0226
commit
25c29211f5
@ -572,7 +572,7 @@ class calendar_bo
|
|||||||
{
|
{
|
||||||
$is_private = (bool)ExecMethod2($app_data,$id,$event);
|
$is_private = (bool)ExecMethod2($app_data,$id,$event);
|
||||||
}
|
}
|
||||||
//echo '<p>'.__METHOD__."($app,$id,) returning ".array2string($is_private)."</p>\n";
|
//echo '<p>'.__METHOD__."($app,$id,) app_data=".array2string($app_data).' returning '.array2string($is_private)."</p>\n";
|
||||||
return $is_private;
|
return $is_private;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1393,8 +1393,7 @@ class calendar_bo
|
|||||||
|
|
||||||
if (!isset($id2cat[$cat_id]))
|
if (!isset($id2cat[$cat_id]))
|
||||||
{
|
{
|
||||||
list($id2cat[$cat_id]) = $this->categories->return_single($cat_id);
|
$id2cat[$cat_id] = categories::read($cat_id);
|
||||||
$id2cat[$cat_id]['data'] = unserialize($id2cat[$cat_id]['data']);
|
|
||||||
}
|
}
|
||||||
$cat = $id2cat[$cat_id];
|
$cat = $id2cat[$cat_id];
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ class select_widget
|
|||||||
*/
|
*/
|
||||||
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
|
function pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
|
||||||
{
|
{
|
||||||
list($rows,$type,$type2,$type3,$type4) = explode(',',$cell['size']);
|
list($rows,$type,$type2,$type3,$type4,$type5) = explode(',',$cell['size']);
|
||||||
|
|
||||||
$extension_data['type'] = $cell['type'];
|
$extension_data['type'] = $cell['type'];
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ class select_widget
|
|||||||
$cell['no_lang'] = True;
|
$cell['no_lang'] = True;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'select-cat': // !$type == globals cats too, $type2: extraStyleMultiselect, $type3: application, if not current-app, $type4: parent-id
|
case 'select-cat': // !$type == globals cats too, $type2: extraStyleMultiselect, $type3: application, if not current-app, $type4: parent-id, $type5=owner (-1=global)
|
||||||
if ($readonly) // for readonly we dont need to fetch all cat's, nor do we need to indent them by level
|
if ($readonly) // for readonly we dont need to fetch all cat's, nor do we need to indent them by level
|
||||||
{
|
{
|
||||||
$cell['no_lang'] = True;
|
$cell['no_lang'] = True;
|
||||||
@ -179,20 +179,21 @@ class select_widget
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!$type3 || $type3 === $GLOBALS['egw']->categories->app_name)
|
if ((!$type3 || $type3 === $GLOBALS['egw']->categories->app_name) &&
|
||||||
|
(!$type5 || $type5 == $GLOBALS['egw']->categories->account_id))
|
||||||
{
|
{
|
||||||
$categories = $GLOBALS['egw']->categories;
|
$categories = $GLOBALS['egw']->categories;
|
||||||
}
|
}
|
||||||
else // we need to instanciate a new cat object for the correct application
|
else // we need to instanciate a new cat object for the correct application
|
||||||
{
|
{
|
||||||
$categories = new categories('',$type3);
|
$categories = new categories($type5,$type3);
|
||||||
}
|
}
|
||||||
// we cast $type4 (parent) to int, to get default of 0 if omitted
|
// we cast $type4 (parent) to int, to get default of 0 if omitted
|
||||||
foreach((array)$categories->return_sorted_array(0,False,'','','',!$type,(int)$type4) as $cat)
|
foreach((array)$categories->return_sorted_array(0,False,'','','',!$type,(int)$type4,true) as $cat)
|
||||||
{
|
{
|
||||||
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
|
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
|
||||||
|
|
||||||
if ($cat['app_name'] == 'phpgw' || $cat['owner'] == '-1')
|
if ($cat['app_name'] == categories::GLOBAL_APPNAME || $cat['owner'] == categories::GLOBAL_ACCOUNT)
|
||||||
{
|
{
|
||||||
$s .= ' ♦';
|
$s .= ' ♦';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user