- fixing SQL error in cal-dav-view caused by previous commit

- new InfoLog preference to not show custom types in calendar (default)
This commit is contained in:
Ralf Becker 2006-10-24 11:58:14 +00:00
parent 34fb07492b
commit 1f4450a34c
5 changed files with 26 additions and 6 deletions

View File

@ -903,6 +903,10 @@ class boinfolog
'filter'=> "user$user".($do_events ? 'date' : 'opentoday').$date_wanted, 'filter'=> "user$user".($do_events ? 'date' : 'opentoday').$date_wanted,
'start' => 0, '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)) while ($infos = $this->search($query))
{ {
foreach($infos as $info) foreach($infos as $info)

View File

@ -243,7 +243,7 @@ class soinfolog // DB-Layer
if ($filter == 'user' && $f_user > 0) 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)"; " AND $filtermethod)";
} }
//echo "<p>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)."</p>\n"; //echo "<p>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)."</p>\n";
@ -615,13 +615,14 @@ class soinfolog // DB-Layer
{ {
$data = (int) $data; $data = (int) $data;
if (!$data) continue; if (!$data) continue;
$filtermethod .= " AND (".$this->responsible_filter($data)." OR info_responsible='0' AND info_owner"; $filtermethod .= " AND (".$this->responsible_filter($data)." OR info_responsible='0' AND ".
$filtermethod .= ($data > 0 ? '='.$data : ' IN ('.implode(',',$GLOBALS['egw']->accounts->members($data,true)).')').')'; $this->db->expression($this->info_table,array(
'info_owner' => $data > 0 ? $data : $GLOBALS['egw']->accounts->members($data,true)
)).')';
} }
else else
{ {
if (!$this->table_defs) $this->table_defs = $this->db->get_table_definitions('infolog',$this->info_table); $filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data));
$filtermethod .= ' AND '.$col.'='.$this->db->quote($data,$this->table_defs['fd'][$col]['type']);
} }
} }
} }

View File

@ -20,6 +20,7 @@
{ {
$show_home[$key] = $filters[$key] = lang($label); $show_home[$key] = $filters[$key] = lang($label);
} }
$have_custom_fields = count($ui->bo->customfields) > 0;
unset($ui); unset($ui);
// migrage old filter-pref 1,2 to the filter one 'own-open-today' // migrage old filter-pref 1,2 to the filter one 'own-open-today'
@ -135,7 +136,17 @@
'admin' => False '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_home);
unset($show_details); unset($show_details);
unset($filters); unset($filters);

View File

@ -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 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 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 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 don't show infolog infolog de InfoLog NICHT anzeigen
done infolog de erledigt done infolog de erledigt
download infolog de Datei laden 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 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 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 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 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 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. 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.

View File

@ -94,6 +94,7 @@ description infolog en Description
determines the order the fields are displayed infolog en determines the order the fields are displayed 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 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 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 don't show infolog infolog en DON'T show InfoLog
done infolog en done done infolog en done
download infolog en Download 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 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 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 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 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 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. 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.