forked from extern/egroupware
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);
|
||||
}
|
||||
//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;
|
||||
}
|
||||
|
||||
@ -1393,8 +1393,7 @@ class calendar_bo
|
||||
|
||||
if (!isset($id2cat[$cat_id]))
|
||||
{
|
||||
list($id2cat[$cat_id]) = $this->categories->return_single($cat_id);
|
||||
$id2cat[$cat_id]['data'] = unserialize($id2cat[$cat_id]['data']);
|
||||
$id2cat[$cat_id] = categories::read($cat_id);
|
||||
}
|
||||
$cat = $id2cat[$cat_id];
|
||||
|
||||
|
@ -102,7 +102,7 @@ class select_widget
|
||||
*/
|
||||
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'];
|
||||
|
||||
@ -158,7 +158,7 @@ class select_widget
|
||||
$cell['no_lang'] = True;
|
||||
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
|
||||
{
|
||||
$cell['no_lang'] = True;
|
||||
@ -179,20 +179,21 @@ class select_widget
|
||||
}
|
||||
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;
|
||||
}
|
||||
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
|
||||
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']);
|
||||
|
||||
if ($cat['app_name'] == 'phpgw' || $cat['owner'] == '-1')
|
||||
if ($cat['app_name'] == categories::GLOBAL_APPNAME || $cat['owner'] == categories::GLOBAL_ACCOUNT)
|
||||
{
|
||||
$s .= ' ♦';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user