mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
syncml categories fixes
This commit is contained in:
parent
da41b918c9
commit
2a37b9a147
@ -128,14 +128,13 @@
|
|||||||
|
|
||||||
case 'category':
|
case 'category':
|
||||||
if(!empty($value)) {
|
if(!empty($value)) {
|
||||||
$isAdmin = $GLOBALS['egw']->acl->check('run',1,'admin');
|
$egwCategories =& CreateObject('phpgwapi.categories', $GLOBALS['egw_info']['user']['account_id'], 'calendar');
|
||||||
$egwCategories =& CreateObject('phpgwapi.categories',$GLOBALS['egw_info']['user']['account_id'],'calendar');
|
$categories = explode(';',$value);
|
||||||
$categories = explode('; ',$value);
|
|
||||||
$cat_id = '';
|
|
||||||
foreach($categories as $categorieName) {
|
foreach($categories as $categorieName) {
|
||||||
|
$cat_id = false;
|
||||||
$categorieName = trim($categorieName);
|
$categorieName = trim($categorieName);
|
||||||
if(!($cat_id = $egwCategories->name2id($categorieName)) && $isAdmin) {
|
if(!($cat_id = $egwCategories->name2id($categorieName))) {
|
||||||
$cat_id = $egwCategories->add(array('name' => $categorieName, 'descr' => $categorieName));
|
$cat_id = $egwCategories->add(array('name' => $categorieName, 'descr' => lang('added by synchronisation')));
|
||||||
}
|
}
|
||||||
if($cat_id) {
|
if($cat_id) {
|
||||||
if(!empty($finalEvent[$key])) $finalEvent[$key] .= ',';
|
if(!empty($finalEvent[$key])) $finalEvent[$key] .= ',';
|
||||||
|
Loading…
Reference in New Issue
Block a user