diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index d8a13f0cbb..f4c7323af9 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -231,11 +231,14 @@ if ($this->appname && $cat['app_name'] == 'phpgw') { - $appendix = '<' . lang('Global') . '>'; + $appendix = ' ♦'; } elseif ($cat['owner'] != $accountId) { - $appendix = '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) + { + $appendix = ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } else { diff --git a/etemplate/inc/class.select_widget.inc.php b/etemplate/inc/class.select_widget.inc.php index b537b01ec6..e4b70d6a04 100644 --- a/etemplate/inc/class.select_widget.inc.php +++ b/etemplate/inc/class.select_widget.inc.php @@ -195,7 +195,10 @@ } elseif ($cat['owner'] != $accountId) { - $s .= '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) + { + $s .= ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } elseif ($cat['access'] == 'private') { diff --git a/etemplate/inc/class.tree_widget.inc.php b/etemplate/inc/class.tree_widget.inc.php index 9bbea7e2e4..c1ad86122d 100644 --- a/etemplate/inc/class.tree_widget.inc.php +++ b/etemplate/inc/class.tree_widget.inc.php @@ -95,7 +95,10 @@ class tree_widget } elseif ($cat['owner'] != $accountId) { - $s .= '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) + { + $s .= ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } elseif ($cat['access'] == 'private') { $s .= ' ♥'; diff --git a/infolog/inc/class.infolog_hooks.inc.php b/infolog/inc/class.infolog_hooks.inc.php index d823f26f0b..3d3f1f0eaa 100644 --- a/infolog/inc/class.infolog_hooks.inc.php +++ b/infolog/inc/class.infolog_hooks.inc.php @@ -343,7 +343,10 @@ class infolog_hooks } elseif ($cat['owner'] != $accountId) { - $s .= '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) + { + $s .= ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } elseif ($cat['access'] == 'private') { diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 985b7cb6e8..719686d1b1 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -405,7 +405,10 @@ class categories } elseif ($cat['owner'] != $this->account_id) { - $s .= '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) + { + $s .= ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } elseif ($cat['access'] == 'private') { diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index cee0d3cd46..4ed7d85362 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -216,22 +216,22 @@ $GLOBALS['egw']->template->set_var('color',$gray < 128 ? 'style="color: white;"' : ''); $accountId = $GLOBALS['egw_info']['user']['account_id']; + $appendix = ''; - if ($cat['app_name'] == 'phpgw') + if ($GLOBALS['egw_info']['user']['preferences']['common']['show_category_owner']) { - $appendix = '<' . lang('Global') . '>'; - } - elseif ($cat['owner'] == '-1') - { - $appendix = '<' . lang('Global') . ' ' . $GLOBALS['egw_info']['apps'][$cats_app]['title'] . '>'; - } - elseif ($cat['owner'] != $accountId) - { - $appendix = '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; - } - else - { - $appendix = ''; + if ($cat['app_name'] == 'phpgw') + { + $appendix = ' ♦'; + } + elseif ($cat['owner'] == '-1') + { + $appendix = ' ♦ ' . $GLOBALS['egw_info']['apps'][$cats_app]['title']; + } + elseif ($cat['owner'] != $accountId) + { + $appendix = ' <' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>'; + } } $level = $cat['level']; diff --git a/preferences/inc/hook_settings.inc.php b/preferences/inc/hook_settings.inc.php index 946fd5084c..ad2a95f198 100755 --- a/preferences/inc/hook_settings.inc.php +++ b/preferences/inc/hook_settings.inc.php @@ -316,6 +316,18 @@ 'xmlrpc' => True, 'admin' => false, ), + 'show_category_owner' => array( + 'type' => 'select', + 'label' => 'Show the category owner with the category name.', + 'name' => 'show_category_owner', + 'values' => array( + '1' => lang('Yes'), + '0' => lang('No'), + ), + 'help' => 'The owner is attached to distinguish between categories with the same name. You can turn this off and will get the names only.', + 'xmlrpc' => True, + 'admin' => False + ), ); // disable thumbnails, if no size configured by admin if (!$GLOBALS['egw_info']['server']['link_list_thumbnail']) unset($GLOBALS['settings']['link_list_thumbnail']); diff --git a/rpc.php b/rpc.php index 8701e77841..d9b32c244e 100644 --- a/rpc.php +++ b/rpc.php @@ -17,6 +17,7 @@ require_once 'Horde/RPC.php'; $GLOBALS['egw_info'] = array( 'flags' => array( 'currentapp' => 'login', + 'login' => True, 'noheader' => True, 'nonavbar' => True, 'disable_Template_class' => True