Re-activated filter in calendar views with two states: all or hideprivate

This commit is contained in:
Christian Binder 2006-11-02 21:33:00 +00:00
parent c5d92cca87
commit b7dbf4cbba
3 changed files with 10 additions and 14 deletions

View File

@ -232,7 +232,7 @@ class bocal
* users mixed integer user-id or array of user-id's to use, defaults to the current user * users mixed integer user-id or array of user-id's to use, defaults to the current user
* cat_id mixed category-id or array of cat-id's, defaults to all if unset, 0 or False * cat_id mixed category-id or array of cat-id's, defaults to all if unset, 0 or False
* Please note: only a single cat-id, will include all sub-cats (if the common-pref 'cats_no_subs' is False) * Please note: only a single cat-id, will include all sub-cats (if the common-pref 'cats_no_subs' is False)
* filter string space delimited filter-names, atm. 'all' or 'private' * filter string filter-name, atm. 'all' or 'hideprivate'
* query string pattern so search for, if unset or empty all matching entries are returned (no search) * query string pattern so search for, if unset or empty all matching entries are returned (no search)
* Please Note: a search never returns repeating events more then once AND does not honor start+end date !!! * Please Note: a search never returns repeating events more then once AND does not honor start+end date !!!
* dayswise boolean on True it returns an array with YYYYMMDD strings as keys and an array with events * dayswise boolean on True it returns an array with YYYYMMDD strings as keys and an array with events
@ -350,7 +350,7 @@ class bocal
{ {
$events[$id] = $event; $events[$id] = $event;
} }
if (!$this->check_perms(EGW_ACL_READ,$event)) if (!$this->check_perms(EGW_ACL_READ,$event) || (!$event['public'] && $filter == 'hideprivate'))
{ {
$this->clear_private_infos($events[$id],$users); $this->clear_private_infos($events[$id],$users);
} }

View File

@ -265,7 +265,7 @@ class socal
* @param int/array $users user-id or array of user-id's, !$users means all entries regardless of users * @param int/array $users user-id or array of user-id's, !$users means all entries regardless of users
* @param int $cat_id=0 mixed category-id or array of cat-id's, default 0 = all * @param int $cat_id=0 mixed category-id or array of cat-id's, default 0 = all
* Please note: only a single cat-id, will include all sub-cats (if the common-pref 'cats_no_subs' is False) * Please note: only a single cat-id, will include all sub-cats (if the common-pref 'cats_no_subs' is False)
* @param string $filter='' string space delimited filter-names, NOT used atm. * @param string $filter='' string filter-name, atm. all or hideprivate
* @param string $query='' pattern so search for, if unset or empty all matching entries are returned (no search) * @param string $query='' pattern so search for, if unset or empty all matching entries are returned (no search)
* Please Note: a search never returns repeating events more then once AND does not honor start+end date !!! * Please Note: a search never returns repeating events more then once AND does not honor start+end date !!!
* @param int/bool $offset=False offset for a limited query or False (default) * @param int/bool $offset=False offset for a limited query or False (default)

View File

@ -104,7 +104,7 @@ class uical
*/ */
var $cat_id; var $cat_id;
/** /**
* @var int $filter session-state: selected filter, NOT used at the moment (was all or private) * @var int $filter session-state: selected filter, at the moment all or hideprivate
*/ */
var $filter; var $filter;
/** /**
@ -249,7 +249,7 @@ class uical
* - cat_id: the selected category * - cat_id: the selected category
* - owner: the owner of the displayed calendar * - owner: the owner of the displayed calendar
* - save_owner: the overriden owner of the planner * - save_owner: the overriden owner of the planner
* - filter: the used filter: no filter / all or only privat, NOT used atm. * - filter: the used filter: all or hideprivate
* - sortby: category or user of planner * - sortby: category or user of planner
* - view: the actual view, where dialogs should return to or which they refresh * - view: the actual view, where dialogs should return to or which they refresh
* @param set_states array to manualy set / change one of the states, default NULL = use $_REQUEST * @param set_states array to manualy set / change one of the states, default NULL = use $_REQUEST
@ -650,15 +650,11 @@ class uical
$file[$n]['text'] = $this->html->form(False,$base_hidden_vars,'/index.php',array('menuaction' => $_GET['menuaction'])) . $file[$n]['text'] = $this->html->form(False,$base_hidden_vars,'/index.php',array('menuaction' => $_GET['menuaction'])) .
$file[$n]['text']; $file[$n]['text'];
// Filter all or private // Filter all or hideprivate
/* NOT used at the moment $file[] = $this->_select_box('Filter','filter',
if(is_numeric($this->owner) && $this->bo->check_perms(EGW_ACL_PRIVATE,0,$this->owner)) '<option value="all"'.($this->filter=='all'?' selected="selected"':'').'>'.lang('No filter').'</option>'."\n".
{ '<option value="hideprivate"'.($this->filter=='hideprivate'?' selected="selected"':'').'>'.lang('Hide private infos').'</option>'."\n");
$file[] = $this->_select_box('Filter','filter',
'<option value=" all "'.($this->filter==' all '?' selected="1"':'').'>'.lang('No filter').'</option>'."\n".
'<option value=" private "'.($this->filter==' private '?' selected="1"':'').'>'.lang('Private Only').'</option>'."\n");
}
*/
// Calendarselection: User or Group // Calendarselection: User or Group
if(count($this->bo->grants) > 0 && $this->accountsel->account_selection != 'none') if(count($this->bo->grants) > 0 && $this->accountsel->account_selection != 'none')
{ {