diff --git a/infolog/inc/class.boinfolog.inc.php b/infolog/inc/class.boinfolog.inc.php index 2bc1804cf4..2952ca9685 100644 --- a/infolog/inc/class.boinfolog.inc.php +++ b/infolog/inc/class.boinfolog.inc.php @@ -903,6 +903,10 @@ class boinfolog 'filter'=> "user$user".($do_events ? 'date' : 'opentoday').$date_wanted, 'start' => 0, ); + if ($this->customfields && !$GLOBALS['egw_info']['user']['preferences']['infolog']['cal_show_custom']) + { + $query['col_filter']['info_type'] = array('task','phone','note','email'); + } while ($infos = $this->search($query)) { foreach($infos as $info) diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index d665e1acc7..2c890adc77 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -243,7 +243,7 @@ class soinfolog // DB-Layer if ($filter == 'user' && $f_user > 0) { - $filtermethod = " ((info_owner=$f_user AND info_responsible=0 OR $filtermethod AND ".$this->responsible_filter($f_user). + $filtermethod = " (info_owner=$f_user AND info_responsible=0 OR $filtermethod AND ".$this->responsible_filter($f_user). " AND $filtermethod)"; } //echo "
aclFilter(filter='$filter_was',user='$user') = '$filtermethod', privat_user_list=".print_r($privat_user_list,True).", public_user_list=".print_r($public_user_list,True)."
\n"; @@ -615,13 +615,14 @@ class soinfolog // DB-Layer { $data = (int) $data; if (!$data) continue; - $filtermethod .= " AND (".$this->responsible_filter($data)." OR info_responsible='0' AND info_owner"; - $filtermethod .= ($data > 0 ? '='.$data : ' IN ('.implode(',',$GLOBALS['egw']->accounts->members($data,true)).')').')'; + $filtermethod .= " AND (".$this->responsible_filter($data)." OR info_responsible='0' AND ". + $this->db->expression($this->info_table,array( + 'info_owner' => $data > 0 ? $data : $GLOBALS['egw']->accounts->members($data,true) + )).')'; } else { - if (!$this->table_defs) $this->table_defs = $this->db->get_table_definitions('infolog',$this->info_table); - $filtermethod .= ' AND '.$col.'='.$this->db->quote($data,$this->table_defs['fd'][$col]['type']); + $filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data)); } } } diff --git a/infolog/inc/hook_settings.inc.php b/infolog/inc/hook_settings.inc.php index 9df4140f5b..82180b8eb2 100644 --- a/infolog/inc/hook_settings.inc.php +++ b/infolog/inc/hook_settings.inc.php @@ -20,6 +20,7 @@ { $show_home[$key] = $filters[$key] = lang($label); } + $have_custom_fields = count($ui->bo->customfields) > 0; unset($ui); // migrage old filter-pref 1,2 to the filter one 'own-open-today' @@ -135,7 +136,17 @@ 'admin' => False ), ); - + if ($have_custom_fields) + { + $GLOBALS['settings']['cal_show_custom'] = array( + 'type' => 'check', + 'label' => 'Should the calendar show custom types too', + 'name' => 'cal_show_custom', + 'help' => 'Do you want to see custome InfoLog types in the calendar?', + 'xmlrpc' => True, + 'admin' => False + ); + } unset($show_home); unset($show_details); unset($filters); diff --git a/infolog/setup/phpgw_de.lang b/infolog/setup/phpgw_de.lang index 8bdbe3ba33..9c84d5781d 100644 --- a/infolog/setup/phpgw_de.lang +++ b/infolog/setup/phpgw_de.lang @@ -94,6 +94,7 @@ description infolog de Beschreibung determines the order the fields are displayed infolog de legt die Reihenfolge fest in der die Felder angezeigt werden disables a status without deleting it infolog de deaktiviert einen Status ohne ihn zu löschen do you want a confirmation of the responsible on: accepting, finishing the task or both infolog de wollen Sie eine Bestätigung des Verantwortlichen bei: Annahme, Beendigung der Aufgabe oder bei beidem +do you want to see custome infolog types in the calendar? infolog de Wollen Sie benutzerdefinierte Typen auch im Kalender sehen? don't show infolog infolog de InfoLog NICHT anzeigen done infolog de erledigt download infolog de Datei laden @@ -241,6 +242,7 @@ should infolog show subtasks, -calls or -notes in the normal view or not. you ca should infolog show the links to other applications and/or the file-attachments in the infolog list (normal view when you enter infolog). infolog de Soll InfoLog die Verknüpfungen zu anderen Anwendungen und/oder die Datei-Anhänge in der InfoLog Liste (normale Ansicht wenn InfoLog aufgerufen wird) anzeigen. should infolog show up on the main screen and with which filter. works only if you dont selected an application for the main screen (in your preferences). infolog de Soll InfoLog auf der Startseite angezeigt werden und mit welchem Filter. Funktioniert nur, wenn Sie keine (einzelne) Anwendung für die Startseite ausgewählt haben (in Ihren Einstellungen). should infolog use full names (surname and familyname) or just the loginnames. infolog de Soll InfoLog den vollen Namen (Vor- und Familienname) oder nur die Benutzerkennung verwenden. +should the calendar show custom types too infolog de Soll der Kalender auch benutzerdefinierte Typen anzeiten should the infolog list show a unique numerical id, which can be used eg. as ticket id. infolog de Soll die InfoLog Liste eine eindeutige Nummer anzeigen, die zB. als Ticketnummer verwendet werden kann. should the infolog list show the column "last modified". infolog de Soll die InfoLog Liste die Spalte "Zuletzt geändert" anzeigen. should the infolog list show the percent done only for status ongoing or two separate icons. infolog de Soll die InfoLog Liste Prozent erledigt nur für den Status "in Arbeit" anzeigen oder zwei separate Icons. diff --git a/infolog/setup/phpgw_en.lang b/infolog/setup/phpgw_en.lang index 59c02478f0..31e4533b8d 100644 --- a/infolog/setup/phpgw_en.lang +++ b/infolog/setup/phpgw_en.lang @@ -94,6 +94,7 @@ description infolog en Description determines the order the fields are displayed infolog en determines the order the fields are displayed disables a status without deleting it infolog en disables a status without deleting it do you want a confirmation of the responsible on: accepting, finishing the task or both infolog en do you want a confirmation of the responsible on: accepting, finishing the task or both +do you want to see custome infolog types in the calendar? infolog en Do you want to see custome InfoLog types in the calendar? don't show infolog infolog en DON'T show InfoLog done infolog en done download infolog en Download @@ -240,6 +241,7 @@ should infolog show subtasks, -calls or -notes in the normal view or not. you ca should infolog show the links to other applications and/or the file-attachments in the infolog list (normal view when you enter infolog). infolog en Should InfoLog show the links to other applications and/or the file-attachments in the InfoLog list (normal view when you enter InfoLog). should infolog show up on the main screen and with which filter. works only if you dont selected an application for the main screen (in your preferences). infolog en Should InfoLog show up on the main screen and with which filter. Works only if you dont selected an application for the main screen (in your preferences). should infolog use full names (surname and familyname) or just the loginnames. infolog en Should InfoLog use full names (surname and familyname) or just the loginnames. +should the calendar show custom types too infolog en Should the calendar show custom types too should the infolog list show a unique numerical id, which can be used eg. as ticket id. infolog en Should the Infolog list show a unique numerical Id, which can be used eg. as ticket Id. should the infolog list show the column "last modified". infolog en Should the Infolog list show the column "last modified". should the infolog list show the percent done only for status ongoing or two separate icons. infolog en Should the Infolog list show the percent done only for status ongoing or two separate icons.