From 32dc4fdb8bbe14c435f9678a4da8384685cc802d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 17 May 2006 05:53:12 +0000 Subject: [PATCH 001/176] bugfix: url's containg var[]=val got corrupted --- phpgwapi/inc/class.sessions.inc.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 335a809762..2d18f715ff 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -1176,7 +1176,14 @@ foreach(explode('&',$extravars) as $expr) { list($var,$val) = explode('=', $expr,2); - $vars[$var] = $val; + if (substr($var,-2) == '[]') + { + $vars[substr($var,0,-2)][] = $val; + } + else + { + $vars[$var] = $val; + } } } @@ -1194,7 +1201,17 @@ $query = array(); foreach($vars as $key => $value) { - $query[] = $key.'='.urlencode($value); + if (is_array($value)) + { + foreach($value as $val) + { + $query[] = $key.'[]='.urlencode($val); + } + } + else + { + $query[] = $key.'='.urlencode($value); + } } $url .= '?' . implode('&',$query); } From 3d362fc3e54cc0a7a21d000d9dc2798c9db6b598 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 17 May 2006 05:57:03 +0000 Subject: [PATCH 002/176] bugfix: not all links were forwarded to the timesheet --- infolog/inc/class.uiinfolog.inc.php | 5 +++++ infolog/setup/etemplates.inc.php | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index cc15bd5edb..c16a618bd8 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -169,6 +169,11 @@ $info['pm_id'] = $link['id']; } if ($link['app'] == 'timesheet') $timesheets[] = $link['id']; + + if ($link['app'] != 'timesheet' && $link['app'] != $this->link->vfs_appname) + { + $info['extra_links'] .= '&link_app[]='.$link['app'].'&link_id[]='.$link['id']; + } } if ($this->prefs['show_times'] && isset($GLOBALS['egw_info']['user']['apps']['timesheet']) && $timesheets) { diff --git a/infolog/setup/etemplates.inc.php b/infolog/setup/etemplates.inc.php index 51354f03df..b46014f405 100644 --- a/infolog/setup/etemplates.inc.php +++ b/infolog/setup/etemplates.inc.php @@ -1,5 +1,5 @@ 'infolog.index.rows','template' => '','lang' => $templ_data[] = array('name' => 'infolog.index.rows','template' => '','lang' => '','group' => '0','version' => '1.2.003','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:1:"A";s:2:"2%";s:1:"C";s:3:"120";s:1:"E";s:2:"8%";s:1:"F";s:16:"12%,@no_modified";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"H";s:14:"3%,@no_actions";s:1:"D";s:10:",@no_times";}i:1;a:8:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:3:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:4:"Type";s:4:"name";s:9:"info_type";}i:2;a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:6:"Status";s:4:"name";s:11:"info_status";s:5:"align";s:6:"center";}i:3;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Completed";s:4:"name";s:12:"info_percent";s:5:"align";s:5:"right";}}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:6:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Priority";s:5:"align";s:5:"right";s:4:"name";s:13:"info_priority";s:4:"size";s:4:"DESC";s:4:"span";s:8:",noPrint";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Subject";s:4:"name";s:12:"info_subject";}s:1:"B";a:6:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Creation";s:5:"align";s:5:"right";s:4:"name";s:7:"info_id";s:4:"size";s:4:"DESC";s:4:"span";s:8:",noPrint";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:8:"info_des";}s:1:"B";a:6:{s:5:"label";s:12:"last changed";s:4:"name";s:17:"info_datemodified";s:4:"size";s:4:"DESC";s:4:"type";s:20:"nextmatch-sortheader";s:4:"span";s:8:",noPrint";s:5:"align";s:5:"right";}}}s:4:"rows";i:3;s:4:"cols";i:2;s:7:"options";a:3:{i:0;s:4:"100%";i:4;s:1:"0";i:5;s:1:"0";}s:4:"size";s:11:"100%,,,,0,0";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Startdate";s:4:"name";s:14:"info_startdate";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Enddate";s:4:"name";s:12:"info_enddate";}i:3;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:18:"info_datecompleted";s:5:"label";s:14:"Date completed";}}s:1:"D";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Times";s:4:"name";s:14:"info_used_time";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:17:"info_planned_time";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Times";s:4:"name";s:14:"info_used_time";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:17:"info_planned_time";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"name";s:10:"info_owner";s:4:"size";s:5:"Owner";s:4:"help";s:25:"Select to filter by owner";}i:2;a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"name";s:16:"info_responsible";s:4:"size";s:11:"Responsible";s:4:"help";s:31:"Select to filter by responsible";}}s:1:"F";a:4:{s:5:"label";s:12:"last changed";s:4:"name";s:17:"info_datemodified";s:4:"size";s:4:"DESC";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";s:4:"span";s:8:",noPrint";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:4:"4,,5";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:57:"$row_cont[info_status_label],$row_cont[info_status_label]";s:5:"label";s:28:"$row_cont[info_status_label]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:23:"$row_cont[info_percent]";s:5:"label";s:23:"$row_cont[info_percent]";s:4:"name";s:32:"edit_percent[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:4;a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[info_percent2]";s:4:"name";s:21:"{$row}[info_percent2]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}}s:1:"B";a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:4:{s:4:"type";s:4:"link";s:5:"label";s:23:"%s $row_cont[info_addr]";s:4:"name";s:17:"${row}[info_link]";s:4:"size";s:1:"b";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:2;a:5:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:19:"{$row}[info_number]";s:4:"span";s:7:",infoId";}}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}s:4:"span";s:10:",fullWidth";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:4:{s:4:"type";s:9:"date-time";s:4:"size";s:2:",8";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:26:"${row}[info_datecompleted]";s:8:"readonly";s:1:"1";}}s:1:"D";a:9:{s:4:"type";s:4:"vbox";s:4:"data";a:4:{i:0;a:1:{s:2:"h2";s:14:",@no_timesheet";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";s:4:"span";s:3:"all";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}i:2;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";s:4:"span";s:10:",timesheet";}i:3;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}s:7:"options";a:1:{i:0;s:1:"3";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"G";a:8:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";s:5:"align";s:6:"center";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";s:7:"onclick";s:198:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}i:4;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:268:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&link_app[0]=infolog&link_id[0]=$row_cont[info_id]&link_app[1]=projectmanager&link_id[1]=$row_cont[pm_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}s:4:"span";s:8:",noPrint";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:64:"return $row_cont[info_anz_subs] || confirm(\'Delete this entry\');";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"done";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:50:"Sets the status of this entry and its subs to done";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1093714137',); +$templ_data[] = array('name' => 'infolog.index.rows','template' => '','lang' => '','group' => '0','version' => '1.2.004','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:1:"A";s:2:"2%";s:1:"C";s:3:"120";s:1:"E";s:2:"8%";s:1:"F";s:16:"12%,@no_modified";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"H";s:14:"3%,@no_actions";s:1:"D";s:10:",@no_times";}i:1;a:8:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:3:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:4:"Type";s:4:"name";s:9:"info_type";}i:2;a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:6:"Status";s:4:"name";s:11:"info_status";s:5:"align";s:6:"center";}i:3;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Completed";s:4:"name";s:12:"info_percent";s:5:"align";s:5:"right";}}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:6:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Priority";s:5:"align";s:5:"right";s:4:"name";s:13:"info_priority";s:4:"size";s:4:"DESC";s:4:"span";s:8:",noPrint";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Subject";s:4:"name";s:12:"info_subject";}s:1:"B";a:6:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Creation";s:5:"align";s:5:"right";s:4:"name";s:7:"info_id";s:4:"size";s:4:"DESC";s:4:"span";s:8:",noPrint";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:8:"info_des";}s:1:"B";a:6:{s:5:"label";s:12:"last changed";s:4:"name";s:17:"info_datemodified";s:4:"size";s:4:"DESC";s:4:"type";s:20:"nextmatch-sortheader";s:4:"span";s:8:",noPrint";s:5:"align";s:5:"right";}}}s:4:"rows";i:3;s:4:"cols";i:2;s:7:"options";a:3:{i:0;s:4:"100%";i:4;s:1:"0";i:5;s:1:"0";}s:4:"size";s:11:"100%,,,,0,0";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Startdate";s:4:"name";s:14:"info_startdate";}i:2;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Enddate";s:4:"name";s:12:"info_enddate";}i:3;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:18:"info_datecompleted";s:5:"label";s:14:"Date completed";}}s:1:"D";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Times";s:4:"name";s:14:"info_used_time";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:17:"info_planned_time";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Times";s:4:"name";s:14:"info_used_time";}i:2;a:4:{s:4:"type";s:20:"nextmatch-sortheader";s:4:"name";s:17:"info_planned_time";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"name";s:10:"info_owner";s:4:"size";s:5:"Owner";s:4:"help";s:25:"Select to filter by owner";}i:2;a:4:{s:4:"type";s:23:"nextmatch-accountfilter";s:4:"name";s:16:"info_responsible";s:4:"size";s:11:"Responsible";s:4:"help";s:31:"Select to filter by responsible";}}s:1:"F";a:4:{s:5:"label";s:12:"last changed";s:4:"name";s:17:"info_datemodified";s:4:"size";s:4:"DESC";s:4:"type";s:20:"nextmatch-sortheader";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";s:4:"span";s:8:",noPrint";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:4:"4,,5";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:57:"$row_cont[info_status_label],$row_cont[info_status_label]";s:5:"label";s:28:"$row_cont[info_status_label]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:23:"$row_cont[info_percent]";s:5:"label";s:23:"$row_cont[info_percent]";s:4:"name";s:32:"edit_percent[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:4;a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[info_percent2]";s:4:"name";s:21:"{$row}[info_percent2]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}}s:1:"B";a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:4:{s:4:"type";s:4:"link";s:5:"label";s:23:"%s $row_cont[info_addr]";s:4:"name";s:17:"${row}[info_link]";s:4:"size";s:1:"b";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:2;a:5:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:19:"{$row}[info_number]";s:4:"span";s:7:",infoId";}}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}s:4:"span";s:10:",fullWidth";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:4:{s:4:"type";s:9:"date-time";s:4:"size";s:2:",8";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:26:"${row}[info_datecompleted]";s:8:"readonly";s:1:"1";}}s:1:"D";a:9:{s:4:"type";s:4:"vbox";s:4:"data";a:4:{i:0;a:1:{s:2:"h2";s:14:",@no_timesheet";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";s:4:"span";s:3:"all";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}i:2;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";s:4:"span";s:10:",timesheet";}i:3;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}s:7:"options";a:1:{i:0;s:1:"3";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"G";a:8:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";s:5:"align";s:6:"center";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";s:7:"onclick";s:198:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}i:4;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:233:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&link_app[]=infolog&link_id[]=$row_cont[info_id]$row_cont[extra_links]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}s:4:"span";s:8:",noPrint";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:64:"return $row_cont[info_anz_subs] || confirm(\'Delete this entry\');";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"done";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:50:"Sets the status of this entry and its subs to done";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1093714137',); + $templ_data[] = array('name' => 'infolog.index.rows-noheader','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:8:{s:1:"A";s:2:"5%";s:1:"C";s:2:"8%";s:1:"D";s:2:"8%";s:1:"E";s:2:"8%";s:1:"F";s:14:"3%,@no_actions";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:7:{s:1:"A";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subject";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Startdate";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Responsible";}}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"last changed";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}}i:2;a:7:{s:1:"A";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:5:"2,2,2";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:5:{s:4:"type";s:6:"button";s:4:"size";s:45:"$row_cont[info_status],$row_cont[info_status]";s:5:"label";s:22:"$row_cont[info_status]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";}}s:1:"B";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:6:{s:4:"type";s:5:"label";s:4:"size";s:25:"b,@${row}[info_link_view]";s:5:"label";s:23:"%s $row_cont[info_addr]";s:7:"no_lang";s:1:"1";s:4:"name";s:23:"${row}[info_link_title]";s:4:"help";s:41:"view this linked entry in its application";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}}s:1:"C";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:4:"date";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"F";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";s:5:"align";s:6:"center";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:7:"new.gif";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}}s:1:"G";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";}i:2;a:5:{s:4:"type";s:6:"button";s:4:"size";s:10:"delete.gif";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:8:"done.gif";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:37:"Sets the status of this entry to done";}}}}s:4:"rows";i:2;s:4:"cols";i:7;}}','size' => '','style' => '.low,.low_done,.normal,.normal_done,.high,.high_done,.urgent,.urgent_done { font-weight: bold; } .low,.low_done { color:#606060; } .normal,.normal_done { color:black } @@ -104,5 +106,5 @@ $templ_data[] = array('name' => 'infolog.index.rows-noheader','template' => '',' $templ_data[] = array('name' => 'infolog.index.rows-noheader','template' => '','lang' => '','group' => '0','version' => '1.2.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:1:"A";s:2:"2%";s:1:"C";s:3:"120";s:1:"E";s:2:"8%";s:1:"F";s:3:"12%";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"H";s:14:"3%,@no_actions";s:1:"D";s:10:",@no_times";}i:1;a:8:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";s:5:"align";s:6:"center";}i:3;a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Completed";s:5:"align";s:5:"right";}}s:1:"B";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Subject";s:4:"name";s:12:"info_subject";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:8:"info_des";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subject";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Startdate";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Date completed";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Times";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Responsible";}}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"last changed";}s:1:"G";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";}s:1:"H";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}}i:2;a:8:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:4:"3,,5";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:57:"$row_cont[info_status_label],$row_cont[info_status_label]";s:5:"label";s:28:"$row_cont[info_status_label]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:47:"$row_cont[info_percent],$row_cont[info_percent]";s:5:"label";s:23:"$row_cont[info_percent]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}}s:1:"B";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:4:{s:4:"type";s:4:"link";s:5:"label";s:23:"%s $row_cont[info_addr]";s:4:"name";s:17:"${row}[info_link]";s:4:"size";s:1:"b";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:4:{s:4:"type";s:9:"date-time";s:4:"size";s:2:",8";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:26:"${row}[info_datecompleted]";s:8:"readonly";s:1:"1";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}i:2;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:8:",planned";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"G";a:6:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";s:5:"align";s:6:"center";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";s:7:"onclick";s:198:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}}s:1:"H";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:64:"return $row_cont[info_anz_subs] || confirm(\'Delete this entry\');";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"done";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:50:"Sets the status of this entry and its subs to done";}}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1142615238',); -$templ_data[] = array('name' => 'infolog.index.rows-noheader','template' => '','lang' => '','group' => '0','version' => '1.2.003','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:1:"A";s:2:"2%";s:1:"C";s:3:"120";s:1:"E";s:2:"8%";s:1:"F";s:16:"12%,@no_modified";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"H";s:14:"3%,@no_actions";s:1:"D";s:10:",@no_times";}i:1;a:8:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";s:5:"align";s:6:"center";}i:3;a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Completed";s:5:"align";s:5:"right";}}s:1:"B";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Subject";s:4:"name";s:12:"info_subject";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:8:"info_des";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subject";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Startdate";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Date completed";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Times";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Responsible";}}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"last changed";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";s:4:"span";s:8:",noPrint";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:4:"4,,5";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:57:"$row_cont[info_status_label],$row_cont[info_status_label]";s:5:"label";s:28:"$row_cont[info_status_label]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:23:"$row_cont[info_percent]";s:5:"label";s:23:"$row_cont[info_percent]";s:4:"name";s:32:"edit_percent[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:4;a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[info_percent2]";s:4:"name";s:21:"{$row}[info_percent2]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}}s:1:"B";a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:4:{s:4:"type";s:4:"link";s:5:"label";s:23:"%s $row_cont[info_addr]";s:4:"name";s:17:"${row}[info_link]";s:4:"size";s:1:"b";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:2;a:5:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:19:"{$row}[info_number]";s:4:"span";s:7:",infoId";}}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}s:4:"span";s:10:",fullWidth";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:4:{s:4:"type";s:9:"date-time";s:4:"size";s:2:",8";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:26:"${row}[info_datecompleted]";s:8:"readonly";s:1:"1";}}s:1:"D";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:4:{i:0;a:1:{s:2:"h2";s:14:",@no_timesheet";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";s:4:"span";s:3:"all";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}i:2;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";s:4:"span";s:10:",timesheet";}i:3;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"G";a:8:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";s:5:"align";s:6:"center";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";s:7:"onclick";s:198:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}i:4;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:268:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&link_app[0]=infolog&link_id[0]=$row_cont[info_id]&link_app[1]=projectmanager&link_id[1]=$row_cont[pm_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}s:4:"span";s:8:",noPrint";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:64:"return $row_cont[info_anz_subs] || confirm(\'Delete this entry\');";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"done";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:50:"Sets the status of this entry and its subs to done";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1142615238',); +$templ_data[] = array('name' => 'infolog.index.rows-noheader','template' => '','lang' => '','group' => '0','version' => '1.2.003','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:1:"A";s:2:"2%";s:1:"C";s:3:"120";s:1:"E";s:2:"8%";s:1:"F";s:16:"12%,@no_modified";s:1:"G";s:14:"3%,@no_actions";s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";s:1:"H";s:14:"3%,@no_actions";s:1:"D";s:10:",@no_times";}i:1;a:8:{s:1:"A";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}i:2;a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";s:5:"align";s:6:"center";}i:3;a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Completed";s:5:"align";s:5:"right";}}s:1:"B";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"Subject";s:4:"name";s:12:"info_subject";}}i:2;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:11:"Description";s:4:"name";s:8:"info_des";}}}s:4:"rows";i:2;s:4:"cols";i:1;s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Subject";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Description";}s:7:"options";a:1:{i:0;s:1:"2";}}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Startdate";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Date completed";}}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Times";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"span";s:8:",planned";s:5:"label";s:7:"planned";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:11:"Responsible";}}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"last changed";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"Sub";s:4:"span";s:8:",noPrint";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:4:"span";s:8:",noPrint";}}i:2;a:8:{s:1:"A";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:4:"4,,5";s:5:"align";s:6:"center";i:1;a:3:{s:4:"type";s:5:"image";s:5:"label";s:20:"$row_cont[info_type]";s:4:"name";s:17:"${row}[info_type]";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:57:"$row_cont[info_status_label],$row_cont[info_status_label]";s:5:"label";s:28:"$row_cont[info_status_label]";s:4:"name";s:31:"edit_status[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:23:"$row_cont[info_percent]";s:5:"label";s:23:"$row_cont[info_percent]";s:4:"name";s:32:"edit_percent[$row_cont[info_id]]";s:4:"help";s:43:"Change the status of an entry, eg. close it";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:4;a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[info_percent2]";s:4:"name";s:21:"{$row}[info_percent2]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}}s:1:"B";a:7:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";i:1;a:4:{s:4:"type";s:4:"link";s:5:"label";s:23:"%s $row_cont[info_addr]";s:4:"name";s:17:"${row}[info_link]";s:4:"size";s:1:"b";}i:2;a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:4:{s:4:"type";s:5:"label";s:4:"span";s:21:",$row_cont[sub_class]";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[info_subject]";}i:2;a:5:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:5:"align";s:5:"right";s:4:"name";s:19:"{$row}[info_number]";s:4:"span";s:7:",infoId";}}i:3;a:4:{s:4:"type";s:5:"label";s:4:"size";s:3:",,1";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[info_des]";}i:4;a:2:{s:4:"type";s:11:"link-string";s:4:"name";s:17:"${row}[filelinks]";}s:4:"span";s:10:",fullWidth";}s:1:"C";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"3,0,0";i:1;a:4:{s:4:"type";s:9:"date-time";s:4:"size";s:2:",8";s:4:"name";s:22:"${row}[info_startdate]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:4:"date";s:4:"span";s:21:",$row_cont[end_class]";s:4:"name";s:20:"${row}[info_enddate]";s:8:"readonly";s:1:"1";}i:3;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:26:"${row}[info_datecompleted]";s:8:"readonly";s:1:"1";}}s:1:"D";a:8:{s:4:"type";s:4:"vbox";s:4:"data";a:4:{i:0;a:1:{s:2:"h2";s:14:",@no_timesheet";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";s:4:"span";s:3:"all";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}i:3;a:1:{s:1:"A";a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:5:",,,,1";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:22:"${row}[info_used_time]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}i:2;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:27:"${row}[info_sum_timesheets]";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";s:4:"span";s:10:",timesheet";}i:3;a:5:{s:4:"type";s:13:"date-duration";s:4:"name";s:25:"${row}[info_planned_time]";s:4:"span";s:11:"all,planned";s:8:"readonly";s:1:"1";s:4:"size";s:16:"@duration_format";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:18:"${row}[info_owner]";s:8:"readonly";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:24:"${row}[info_responsible]";s:8:"readonly";s:1:"1";s:4:"size";s:1:"5";}}s:1:"F";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"2,0,0";i:1;a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:25:"${row}[info_datemodified]";s:8:"readonly";s:1:"1";}i:2;a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:21:"${row}[info_modifier]";s:8:"readonly";s:1:"1";}}s:1:"G";a:8:{s:4:"type";s:4:"vbox";s:4:"size";s:5:"4,0,0";s:5:"align";s:6:"center";i:1;a:7:{s:4:"type";s:6:"button";s:4:"size";s:3:"new";s:5:"label";s:7:"Add sub";s:5:"align";s:6:"center";s:4:"name";s:22:"sp[$row_cont[info_id]]";s:4:"help";s:46:"Add a new sub-task, -note, -call to this entry";s:7:"onclick";s:198:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&action=sp&action_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:8:"view.gif";s:5:"label";s:9:"View subs";s:5:"align";s:6:"center";s:4:"name";s:24:"view[$row_cont[info_id]]";s:4:"help";s:27:"View all subs of this entry";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:10:"parent.gif";s:5:"label";s:11:"View parent";s:5:"align";s:6:"center";s:4:"name";s:31:"view[$row_cont[info_id_parent]]";s:4:"help";s:46:"View the parent of this entry and all his subs";}i:4;a:6:{s:4:"type";s:6:"button";s:4:"size";s:9:"timesheet";s:5:"label";s:19:"Add timesheet entry";s:4:"name";s:29:"timesheet[$row_cont[info_id]]";s:7:"onclick";s:233:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&link_app[]=infolog&link_id[]=$row_cont[info_id]$row_cont[extra_links]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:5:"align";s:6:"center";}s:4:"span";s:8:",noPrint";}s:1:"H";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:24:"edit[$row_cont[info_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=infolog.uiinfolog.edit&info_id=$row_cont[info_id]\'),\'_blank\',\'dependent=yes,width=750,height=600,scrollbars=yes,status=yes\'); return false;";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:26:"delete[$row_cont[info_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:64:"return $row_cont[info_anz_subs] || confirm(\'Delete this entry\');";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"size";s:4:"done";s:5:"label";s:5:"Close";s:4:"name";s:25:"close[$row_cont[info_id]]";s:4:"help";s:50:"Sets the status of this entry and its subs to done";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:8;}}','size' => '','style' => '','modified' => '1142615238',); From fb4182ea66a2cc484c5547e3520c50410877a910 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 17 May 2006 06:00:12 +0000 Subject: [PATCH 003/176] Correct spelling --- phpgwapi/inc/class.auth.inc.php | 28 +++++++++++++++++++--------- phpgwapi/setup/phpgw_de.lang | 2 +- phpgwapi/setup/phpgw_en.lang | 2 +- phpgwapi/setup/phpgw_fr.lang | 2 +- phpgwapi/setup/phpgw_nl.lang | 2 +- phpgwapi/setup/phpgw_pt-br.lang | 2 +- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/phpgwapi/inc/class.auth.inc.php b/phpgwapi/inc/class.auth.inc.php index 04d5b5069f..c4136db76f 100644 --- a/phpgwapi/inc/class.auth.inc.php +++ b/phpgwapi/inc/class.auth.inc.php @@ -1,4 +1,4 @@ - * @@ -241,32 +241,42 @@ } /** - * Checks if a given password is "save" + * Checks if a given password is "safe" * * @param string $login * @abstract atm a simple check in length, #digits, #uppercase and #lowercase - * could be made more save using e.g. pecl libary cracklib - * but as pecl dosn't tun on any platform and isn't GPL'd - * i havn't implemented it yet - * Windows compatible check is: 7 char lenth, 1 Up, 1 Low, 1 Num and 1 Special + * could be made more safe using e.g. pecl library cracklib + * but as pecl dosn't run on any platform and isn't GPL'd + * i haven't implemented it yet + * Windows compatible check is: 7 char lenth, 1 Up, 1 Low, 1 Num and 1 Special * @author cornelius weiss - * @return mixed false if password is considerd "save" or a string $message if "unsafe" + * @return mixed false if password is considered "safe" or a string $message if "unsafe" */ function crackcheck($passwd) { if (!preg_match('/.{'. ($noc=7). ',}/',$passwd)) + { $message = lang('Password must have at least %1 characters',$noc). '
'; + } if(!preg_match('/(.*\d.*){'. ($non=1). ',}/',$passwd)) + { $message .= lang('Password must contain at least %1 numbers',$non). '
'; + } if(!preg_match('/(.*[[:upper:]].*){'. ($nou=1). ',}/',$passwd)) + { $message .= lang('Password must contain at least %1 uppercase letters',$nou). '
'; + } if(!preg_match('/(.*[[:lower:]].*){'. ($nol=1). ',}/',$passwd)) + { $message .= lang('Password must contain at least %1 lowercase letters',$nol). '
'; + } if(!preg_match('/(.*[\\!"#$%&\'()*+,-.\/:;<=>?@\[\]\^_ {|}~`].*){'. ($nol=1). ',}/',$passwd)) - $message .= lang('Password must contain at least %1 special charactars',$nol). '
'; + { + $message .= lang('Password must contain at least %1 special characters',$nol). '
'; + } return $message ? $message : false; } - + /** @function smd5_compare @abstract compare SMD5-encrypted passwords for authentication diff --git a/phpgwapi/setup/phpgw_de.lang b/phpgwapi/setup/phpgw_de.lang index 20741aad86..f340975b36 100644 --- a/phpgwapi/setup/phpgw_de.lang +++ b/phpgwapi/setup/phpgw_de.lang @@ -613,7 +613,7 @@ password could not be changed common de Passwort konnte nicht ge password has been updated common de Passwort wurde aktualisiert password must contain at least %1 lowercase letters common de Das Passwort muss mindestens %1 Kleinbuchstaben enthalten password must contain at least %1 numbers common de Das Passwort muss mindestens %1 Nummern enthalten -password must contain at least %1 special charactars common de Das Passwort muss mindestens %1 Sonderzeichen enthalten +password must contain at least %1 special characters common de Das Passwort muss mindestens %1 Sonderzeichen enthalten password must contain at least %1 uppercase letters common de Das Passwort muss mindestens %1 Großbuchstaben enthalten password must have at least %1 characters common de Das Passwort muss mindestens %1 Zeichen lang sein paste htmlarea-ContextMenu de Einfügen diff --git a/phpgwapi/setup/phpgw_en.lang b/phpgwapi/setup/phpgw_en.lang index 4d932a8696..878f8b4959 100644 --- a/phpgwapi/setup/phpgw_en.lang +++ b/phpgwapi/setup/phpgw_en.lang @@ -653,7 +653,7 @@ password could not be changed common en Password could not be changed password has been updated common en Password has been updated password must contain at least %1 lowercase letters common en Password must contain at least %1 lowercase letters password must contain at least %1 numbers common en Password must contain at least %1 numbers -password must contain at least %1 special charactars common en Password must contain at least %1 special charactars +password must contain at least %1 special characters common en Password must contain at least %1 special characters password must contain at least %1 uppercase letters common en Password must contain at least %1 uppercase letters password must have at least %1 characters common en Password must have at least %1 characters paste htmlarea-ContextMenu en Paste diff --git a/phpgwapi/setup/phpgw_fr.lang b/phpgwapi/setup/phpgw_fr.lang index d17403025e..cfc23f8c5d 100644 --- a/phpgwapi/setup/phpgw_fr.lang +++ b/phpgwapi/setup/phpgw_fr.lang @@ -647,7 +647,7 @@ password could not be changed common fr Le mot de passe n'a pas pu password has been updated common fr Le mot de passe a été mis à jour avec succès password must contain at least %1 lowercase letters common fr Le mot de passe doit contenir au moins %1 caractères minuscules password must contain at least %1 numbers common fr Le mot de passe doit contenir au moins %1 chiffres -password must contain at least %1 special charactars common fr Le mot de passe doit contenir au moins %1 caractères spéciaux +password must contain at least %1 special characters common fr Le mot de passe doit contenir au moins %1 caractères spéciaux password must contain at least %1 uppercase letters common fr Le mot de passe doit contenir au moins %1 caractères majuscules password must have at least %1 characters common fr Le mot de passe doit contenir au moins %1 caractères paste htmlarea-ContextMenu fr Coller diff --git a/phpgwapi/setup/phpgw_nl.lang b/phpgwapi/setup/phpgw_nl.lang index a1b30c3034..85b4e1693a 100644 --- a/phpgwapi/setup/phpgw_nl.lang +++ b/phpgwapi/setup/phpgw_nl.lang @@ -653,7 +653,7 @@ password could not be changed common nl Wachtwoord kon niet worden gewijzigd password has been updated common nl Wachtwoord is gewijzigd password must contain at least %1 lowercase letters common nl Wachtwoord moet minstens %1 kleine letters bevatten password must contain at least %1 numbers common nl Wachtwoord moet minstens %1 cijfers bevatten -password must contain at least %1 special charactars common nl Wachtwoord moet minstens %1 bijzondere tekens bevatten +password must contain at least %1 special characters common nl Wachtwoord moet minstens %1 bijzondere tekens bevatten password must contain at least %1 uppercase letters common nl Wachtwoord moet minstens %1 hoofdletters bevatten password must have at least %1 characters common nl Wachtwoord moet minstens %1 tekens bevatten paste htmlarea-ContextMenu nl Plakken diff --git a/phpgwapi/setup/phpgw_pt-br.lang b/phpgwapi/setup/phpgw_pt-br.lang index c94260c676..8c9e3824f2 100755 --- a/phpgwapi/setup/phpgw_pt-br.lang +++ b/phpgwapi/setup/phpgw_pt-br.lang @@ -653,7 +653,7 @@ password could not be changed common pt-br Senha n password has been updated common pt-br Senha foi alterada password must contain at least %1 lowercase letters common pt-br Senha deve ter ao menos %1 caractere(s) minúsculo(s) password must contain at least %1 numbers common pt-br Senha deve ter ao menos %1 número(s) -password must contain at least %1 special charactars common pt-br Senha deve ter ao menos %1 caractere(s) especial(is) +password must contain at least %1 special characters common pt-br Senha deve ter ao menos %1 caractere(s) especial(is) password must contain at least %1 uppercase letters common pt-br Senha deve ter ao menos %1 caractere(s) maiúsculo(s) password must have at least %1 characters common pt-br Senha deve ter ao menos %1 caractere(s) paste htmlarea-ContextMenu pt-br Colar From 93f7c8ca2b77d6a1c29b2d46bc3bd36aac1a87c1 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 17 May 2006 06:15:48 +0000 Subject: [PATCH 004/176] Fix spelling in display of config page --- setup/lang/phpgw_de.lang | 2 +- setup/lang/phpgw_en.lang | 2 +- setup/lang/phpgw_es-es.lang | 2 +- setup/lang/phpgw_pt-br.lang | 2 +- setup/lang/phpgw_sk.lang | 2 +- setup/lang/phpgw_zh-tw.lang | 2 +- setup/templates/default/config.tpl | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 003d3d7077..4aa4403445 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup de Dies wird 1 Admin- und 3 Demo-Benutzerkonten anlegen.
Die Benutzernamen/Passwörter sind: demo/guest, demo2/guest und demo3/guest. accounts existing setup de Benutzerkonten existieren actions setup de Aktionen -activate save password check setup de Aktiviere die "sichere Passwort" Überprüfung +activate safe password check setup de Aktiviere die "sichere Passwort" Überprüfung add auto-created users to this group ('default' will be attempted if this is empty.) setup de Automatisch erzeugte Benutzer zu dieser Grupper hinzufügen ("Default" wird versucht wenn nichts angegeben.) add new database instance (egw domain) setup de Neue Datenbankinstanz (eGW Domain) hinzufügen additional settings setup de Zusätzliche Einstellungen diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index ef1a474107..fa44e9e366 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup en This will create 1 admin account and 3 demo accounts
The username/passwords are: demo/guest, demo2/guest and demo3/guest. accounts existing setup en Accounts existing actions setup en Actions -activate save password check setup en Activate save password check +activate safe password check setup en Activate safe password check add auto-created users to this group ('default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.) add new database instance (egw domain) setup en Add new database instance (eGW domain) additional settings setup en Additional settings diff --git a/setup/lang/phpgw_es-es.lang b/setup/lang/phpgw_es-es.lang index 75f1599cda..0922e07735 100644 --- a/setup/lang/phpgw_es-es.lang +++ b/setup/lang/phpgw_es-es.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup es-es Esto creará 1 cuenta de administrador y 3 de demostración
Los nombres de usuario y contraseñas son: demo/guest, demo2/guest y demo3/guest. accounts existing setup es-es Existen cuentas actions setup es-es Acciones -activate save password check setup es-es Activar la comprobación para guardar contraseñas +activate safe password check setup es-es Activar la comprobación para guardar contraseñas add auto-created users to this group ('default' will be attempted if this is empty.) setup es-es Añadir usuarios creados automáticamente a este grupo (si está vacío, se le asignará el grupo predeterminado) add new database instance (egw domain) setup es-es Añadir nueva instancia de base de datos (dominio eGW) additional settings setup es-es Configuración adicional diff --git a/setup/lang/phpgw_pt-br.lang b/setup/lang/phpgw_pt-br.lang index 035e24cc8a..0f22465c94 100644 --- a/setup/lang/phpgw_pt-br.lang +++ b/setup/lang/phpgw_pt-br.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup pt-br Isto irá criar 1 conta de administrador e 3 contas demo
Os usuários/senhas são: demo/guest, demo2/guest and demo3/guest. accounts existing setup pt-br Contas existentes actions setup pt-br Ações -activate save password check setup pt-br Ativar salvamento de senhas +activate safe password check setup pt-br Ativar salvamento de senhas add auto-created users to this group ('default' will be attempted if this is empty.) setup pt-br Adicionar usuários criados automaticamente para este grupo (o grupo 'Padrão' será utilizado se este campo estiver vazio.) add new database instance (egw domain) setup pt-br Adicionar nova base de dados (domínio eGW ) additional settings setup pt-br Configurações Adicionais diff --git a/setup/lang/phpgw_sk.lang b/setup/lang/phpgw_sk.lang index d04e8af46e..68c0654b48 100644 --- a/setup/lang/phpgw_sk.lang +++ b/setup/lang/phpgw_sk.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup sk Týmto sa vytvorí 1 správcovský úèet a 3 testovacie
Pou¾ívateµské mená/heslá sú: demo/guest, demo2/guest, demo3/guest. accounts existing setup sk Existujúce úèty actions setup sk Akcie -activate save password check setup sk Aktivova» voµbu ukladania hesla +activate safe password check setup sk Aktivova» voµbu ukladania hesla add auto-created users to this group ('default' will be attempted if this is empty.) setup sk Automaticky vytvorených pou¾ívateµov priradi» do tejto skupiny (ak prázdne, pou¾ije sa 'Predvolená'). add new database instance (egw domain) setup sk Prida» novú databázovú in¹tanciu (eGW domain) additional settings setup sk Ïal¹ie nastavenia diff --git a/setup/lang/phpgw_zh-tw.lang b/setup/lang/phpgw_zh-tw.lang index d89660958e..ebd7431b2e 100644 --- a/setup/lang/phpgw_zh-tw.lang +++ b/setup/lang/phpgw_zh-tw.lang @@ -10,7 +10,7 @@ this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup zh-tw 這會產生 1 個管ç†è€…å¸³è™Ÿä»¥åŠ 3 個測試帳號
測試帳號的密碼分別是: demo/guest, demo2/guest 與 demo3/guest。 accounts existing setup zh-tw 帳號已經存在 actions setup zh-tw 動作 -activate save password check setup zh-tw 啟用儲存密碼功能 +activate safe password check setup zh-tw 啟用儲存密碼功能 add auto-created users to this group ('default' will be attempted if this is empty.) setup zh-tw 新增自動建立使用者到這個群組ï¹è‹¥ç•™ç©ºç™½å‰‡ä½¿ç”¨ã€ŒDefaultã€ï¹ž add new database instance (egw domain) setup zh-tw 新增資料庫實例(eGW 網域) additional settings setup zh-tw 其他設定 diff --git a/setup/templates/default/config.tpl b/setup/templates/default/config.tpl index 430832abf8..da794355d1 100644 --- a/setup/templates/default/config.tpl +++ b/setup/templates/default/config.tpl @@ -213,7 +213,7 @@ - {lang_Activate_save_password_check}: + {lang_Activate_safe_password_check}:

'; - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - } - - /* authentication phase */ - $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header(); - - // added these to let the app work, need to templatize still - $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup'); - $setup_tpl = CreateObject('setup.Template',$tpl_root); - $setup_tpl->set_file(array( - 'T_head' => 'head.tpl', - 'T_footer' => 'footer.tpl', - 'T_alert_msg' => 'msg_alert_msg.tpl', - 'T_login_main' => 'login_main.tpl', - 'T_login_stage_header' => 'login_stage_header.tpl', - 'T_setup_manage' => 'manageheader.tpl' - )); - $setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain'); - $setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain'); - $setup_tpl->set_block('T_setup_manage','manageheader','manageheader'); - $setup_tpl->set_block('T_setup_manage','domain','domain'); - - /* Detect current mode */ - switch($GLOBALS['egw_info']['setup']['stage']['header']) - { - case '1': - $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Create your header.inc.php'); - $GLOBALS['egw_info']['setup']['PageMSG'] = lang('You have not created your header.inc.php yet!
You can create it now.'); - break; - case '2': - $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Your header admin password is NOT set. Please set it now!'); - $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Your header admin password is NOT set. Please set it now!'); - break; - case '3': - $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('You need to add some domains to your header.inc.php.'); - $GLOBALS['egw_info']['setup']['PageMSG'] = lang('You need to add some domains to your header.inc.php.'); - $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('You need to add some domains to your header.inc.php.'); - if(!$GLOBALS['egw_setup']->auth('Header')) - { - $GLOBALS['egw_setup']->html->show_header('Please login',True); - $GLOBALS['egw_setup']->html->login_form(); - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - break; - case '4': - $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.'); - $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.
WARNING!
MAKE BACKUPS!'); - $GLOBALS['egw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.'); - if(!$GLOBALS['egw_setup']->auth('Header')) - { - $GLOBALS['egw_setup']->html->show_header('Please login',True); - $GLOBALS['egw_setup']->html->login_form(); - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - break; - case '10': - if(!$GLOBALS['egw_setup']->auth('Header')) - { - $GLOBALS['egw_setup']->html->show_header('Please login',True); - $GLOBALS['egw_setup']->html->login_form(); - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - $GLOBALS['egw_info']['setup']['HeaderFormMSG'] = lang('Edit your header.inc.php'); - $GLOBALS['egw_info']['setup']['PageMSG'] = lang('Edit your existing header.inc.php'); - break; - } - - $action = @get_var('action',Array('POST')); - list($action) = @each($action); + list($action) = @each($_POST['action']); switch($action) { case 'download': - check_form_values(); - $header_template = CreateObject('setup.Template','../'); - $b = CreateObject('phpgwapi.browser'); - $b->content_header('header.inc.php','application/octet-stream'); - /* - header('Content-disposition: attachment; filename="header.inc.php"'); - header('Content-type: application/octet-stream'); - header('Pragma: no-cache'); - header('Expires: 0'); - */ - $newheader = $GLOBALS['egw_setup']->html->generate_header(); + $browser = CreateObject('phpgwapi.browser'); + $browser->content_header('header.inc.php','application/octet-stream'); echo $newheader; break; + case 'view': - check_form_values(); - $header_template = CreateObject('setup.Template','../'); $GLOBALS['egw_setup']->html->show_header('Generated header.inc.php', False, 'header'); echo '
'; echo '
' . lang('Save this text as contents of your header.inc.php') . '

'; - $newheader = $GLOBALS['egw_setup']->html->generate_header(); - echo '
';
+			echo "
\n";
 			echo htmlentities($newheader);
-			echo '

'; + echo "\n

\n"; echo '
'; echo '
' . lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".') . '
'; echo ''; @@ -234,18 +128,16 @@ echo '
'; $GLOBALS['egw_setup']->html->show_footer(); break; + case 'write': - check_form_values(); - $header_template = CreateObject('setup.Template','../'); - if(is_writeable('../header.inc.php') || (!file_exists('../header.inc.php') && is_writeable('../'))) + if ((is_writeable('../header.inc.php') || !file_exists('../header.inc.php') && is_writeable('../')) && + ($f = fopen('../header.inc.php','wb'))) { - $newheader = $GLOBALS['egw_setup']->html->generate_header(); - $fsetup = fopen('../header.inc.php','wb'); - fwrite($fsetup,$newheader); - fclose($fsetup); + fwrite($f,$newheader); + fclose($f); $GLOBALS['egw_setup']->html->show_header('Saved header.inc.php', False, 'header'); echo ''; - echo '
' . lang('Created header.inc.php!'); + echo '
' . lang('Created header.inc.php!'); echo ''; echo ''; echo ''; @@ -260,422 +152,283 @@ $GLOBALS['egw_setup']->html->show_footer(); } break; - default: - $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['HeaderFormMSG'], False, 'header'); - - if(!get_var('ConfigLang',array('POST','COOKIE'))) - { - $setup_tpl->set_var('lang_select','
Please Select your language '.lang_select(True,'en')."
"); - } - - $setup_tpl->set_var('pagemsg',$GLOBALS['egw_info']['setup']['PageMSG']); - $setup_tpl->set_var('lang_analysis',lang('Analysis')); - - //$detected = ''; - //$detected .= '

' . $GLOBALS['egw_info']['setup']['PageMSG'] . '
 

'; - - //$detected .= '' . lang('Analysis') . ''."\n".''. "\n"; - - $supported_db = array(); - foreach(array( - // short => array(extension,func_to_check,supported_db(s)) - 'mysql' => array('mysql','mysql_connect','mysql'), - 'mysqli' => array('mysql','mysql_iconnect','mysqli'), - 'pgsql' => array('pgsql','pg_connect','pgsql'), - 'mssql' => array('mssql','mssql_connect','mssql'), - 'odbc' => array('odbc',false,'sapdb','odbc_mssql','odbc_oracle'), - 'oracle' => array('oci8',false,'oracle'), - ) as $db => $data) - { - $ext = array_shift($data); - $func_to_check = array_shift($data); - $name = isset($db_fullnames[$db]) ? $db_fullnames[$db] : strtoupper($db); - if (check_load_extension($ext) || $func_to_check && function_exists($func_to_check)) - { - $detected .= lang('You appear to have %1 support.',$name) . "
\n"; - $supported_db = array_merge($supported_db,$data); - } - else - { - $detected .= lang('No %1 support found. Disabling',$name) . "
\n"; - } - } - if(!count($supported_db)) - { - $detected .= '

' - . lang('Did not find any valid DB support!') - . "
\n" - . lang('Try to configure your php to support one of the above mentioned DBMS, or install eGroupWare by hand.') - . '

'; - echo $detected; - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - - if(!function_exists('version_compare')) - { - $detected .= '

' - . lang('You appear to be using PHP earlier than 4.1.0. eGroupWare now requires 4.1.0 or later'). "\n" - . '

'; - echo $detected; - $GLOBALS['egw_setup']->html->show_footer(); - exit; - } - if (check_load_extension('session')) - { - $detected .= lang('You appear to have PHP session support. Enabling PHP sessions.') . '
' . "\n"; - $supported_sessions_type['php4'] = 'PHP'; // makeing php sessions the default - $supported_sessions_type['php4-restore'] = lang('PHP plus restore'); // php-sessions with restore of egw_info array and egw object from the session - } - $supported_sessions_type['db'] = lang('Datebase'); - - @reset($default_db_ports); - $js_default_db_ports = 'var default_db_ports = new Array();'."\n"; - while(list($k,$v) = @each($default_db_ports)) - { - $js_default_db_ports .= ' default_db_ports["'.$k.'"]="'.$v.'";'."\n"; - } - $setup_tpl->set_var('js_default_db_ports',$js_default_db_ports); - - /* - if(check_load_extension('xml') || function_exists('xml_parser_create')) - { - $detected .= lang('You appear to have XML support enabled') . '
' . "\n"; - $xml_enabled = 'True'; - } - else - { - $detected .= lang('No XML support found. Disabling') . '
' . "\n"; - } - */ - - $no_guess = False; - if(file_exists('../header.inc.php') && is_file('../header.inc.php') && is_readable('../header.inc.php')) - { - $detected .= lang('Found existing configuration file. Loading settings from the file...') . '
' . "\n"; - $GLOBALS['egw_info']['flags']['noapi'] = True; - $no_guess = true; - /* This code makes sure the newer multi-domain supporting header.inc.php is being used */ - if(!isset($GLOBALS['egw_domain'])) - { - $detected .= lang('You need to add some domains to your header.inc.php.') . '
' . "\n"; - $GLOBALS['egw_domain']['default'] = array(); - $setup_tpl->set_var('lang_domain',lang('Database instance (eGW domain)')); - $setup_tpl->set_var('lang_delete',lang('Delete')); - $setup_tpl->set_var('db_domain','default'); - $setup_tpl->set_var('db_host','localhost'); - $setup_tpl->set_var('db_name','egroupware'); - $setup_tpl->set_var('db_user','egroupware'); - $setup_tpl->set_var('db_pass',''); - $setup_tpl->set_var('config_user','changeme'); - $setup_tpl->set_var('config_pass',''); - while(list($k,$v) = @each($supported_db)) - { - $dbtype_options .= '\n"; - if (!isset($default_port)) - $default_port = $default_db_ports[$v]; - } - $setup_tpl->set_var('dbtype_options',$dbtype_options); - $setup_tpl->set_var('db_port',$default_port); - $setup_tpl->parse('domains','domain',True); - } - else - { - if(@$GLOBALS['egw_info']['server']['header_version'] != @$GLOBALS['egw_info']['server']['current_header_version']) - { - $detected .= lang("You're using an old header.inc.php version...") . '
' . "\n"; - $detected .= lang('Importing old settings into the new format....') . '
' . "\n"; - } - reset($GLOBALS['egw_domain']); - list($default_domain) = each($GLOBALS['egw_domain']); - $GLOBALS['egw_info']['server']['default_domain'] = $default_domain; - unset($default_domain); // we kill this for security reasons - $GLOBALS['egw_info']['server']['config_passwd'] = $GLOBALS['egw_domain'][$GLOBALS['egw_info']['server']['default_domain']]['config_passwd']; - $GLOBALS['egw_info']['server']['config_user'] = $GLOBALS['egw_domain'][$GLOBALS['egw_info']['server']['default_domain']]['config_user']; - - if(@$adddomain) - { - $GLOBALS['egw_domain'][lang('new')] = array(); - } - - foreach($GLOBALS['egw_domain'] as $key => $val) - { - $setup_tpl->set_var('lang_domain',lang('Database instance (eGW domain)')); - $setup_tpl->set_var('lang_delete',lang('Delete')); - $setup_tpl->set_var('db_domain',$key); - $setup_tpl->set_var('db_host',$GLOBALS['egw_domain'][$key]['db_host']); - /* Set default here if the admin didn't set a port yet */ - $setup_tpl->set_var('db_port',$GLOBALS['egw_domain'][$key]['db_port'] - ? $GLOBALS['egw_domain'][$key]['db_port'] - : @$default_db_ports[$GLOBALS['egw_domain'][$key]['db_type']] - ); - $setup_tpl->set_var('db_name',$GLOBALS['egw_domain'][$key]['db_name']); - $setup_tpl->set_var('db_user',$GLOBALS['egw_domain'][$key]['db_user']); - $setup_tpl->set_var('db_pass',$GLOBALS['egw_domain'][$key]['db_pass']); - $setup_tpl->set_var('db_type',$GLOBALS['egw_domain'][$key]['db_type']); - if(!@isset($GLOBALS['egw_domain'][$key]['config_user'])) - { - $setup_tpl->set_var('config_user','admin'); - } - else - { - $setup_tpl->set_var('config_user',$GLOBALS['egw_domain'][$key]['config_user']); - } - $setup_tpl->set_var('config_pass',''); - $setup_tpl->set_var('config_password',$GLOBALS['egw_domain'][$key]['config_passwd']); - - $selected = ''; - $dbtype_options = ''; - $found_dbtype = False; - @reset($supported_db); - while(list($k,$v) = @each($supported_db)) - { - if($v == $GLOBALS['egw_domain'][$key]['db_type']) - { - $selected = ' selected="selected" '; - $found_dbtype = true; - } - else - { - $selected = ''; - } - $dbtype_options .= '\n"; - } - $setup_tpl->set_var('dbtype_options',$dbtype_options); - - $setup_tpl->parse('domains','domain',True); - } - $setup_tpl->set_var('domain',''); - } - if(defined('PHPGW_SERVER_ROOT')) - { - $GLOBALS['egw_info']['server']['server_root'] = (PHPGW_SERVER_ROOT == '..') ? $realpath : PHPGW_SERVER_ROOT; - $GLOBALS['egw_info']['server']['include_root'] = (PHPGW_INCLUDE_ROOT == '..') ? $realpath : PHPGW_SERVER_ROOT; - } - elseif(!@isset($GLOBALS['egw_info']['server']['include_root']) && @$GLOBALS['egw_info']['server']['header_version'] <= 1.6) - { - $GLOBALS['egw_info']['server']['include_root'] = @$GLOBALS['egw_info']['server']['server_root']; - } - elseif(!@isset($GLOBALS['egw_info']['server']['header_version']) && @$GLOBALS['egw_info']['server']['header_version'] <= 1.6) - { - $GLOBALS['egw_info']['server']['include_root'] = @$GLOBALS['egw_info']['server']['server_root']; - } - } - else - { - $detected .= lang('Sample configuration not found. using built in defaults') . '
' . "\n"; - $GLOBALS['egw_info']['server']['server_root'] = $realpath; - $GLOBALS['egw_info']['server']['include_root'] = $realpath; - /* This is the basic include needed on each page for eGroupWare application compliance */ - $GLOBALS['egw_info']['flags']['htmlcompliant'] = True; - - /* These are the settings for the database system */ - $setup_tpl->set_var('lang_domain',lang('Domain')); - $setup_tpl->set_var('lang_delete',lang('Delete')); - $setup_tpl->set_var('db_domain','default'); - $setup_tpl->set_var('db_host','localhost'); - $setup_tpl->set_var('db_name','egroupware'); - $setup_tpl->set_var('db_user','egroupware'); - $setup_tpl->set_var('db_pass',''); - $setup_tpl->set_var('config_user','changeme'); - $setup_tpl->set_var('config_pass',''); - - while(list($k,$v) = each($supported_db)) - { - $dbtype_options .= '\n"; - if (!isset($default_port)) - $default_port = $default_db_ports[$v]; - } - $setup_tpl->set_var('db_port',$default_port); - $setup_tpl->set_var('dbtype_options',$dbtype_options); - - $setup_tpl->parse('domains','domain',True); - $setup_tpl->set_var('domain',''); - - $setup_tpl->set_var('comment_l',''); - - /* These are a few of the advanced settings */ - $GLOBALS['egw_info']['server']['db_persistent'] = True; - $GLOBALS['egw_info']['server']['mcrypt_enabled'] = false; // default off, as there are too many problems with buggy mcrypt implementations (was check_load_extension('mcrypt');) - $GLOBALS['egw_info']['server']['versions']['mcrypt'] = ''; - - srand((double)microtime()*1000000); - $random_char = array( - '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', - 'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' - ); - - for($i=0; $i<30; $i++) - { - $GLOBALS['egw_info']['server']['mcrypt_iv'] .= $random_char[rand(1,count($random_char))]; - } - } - - // now guessing better settings then the default ones - if(!$no_guess) - { - $detected .= lang('Now guessing better values for defaults...') . '
' . "\n"; - $this_dir = dirname($_SERVER['SCRIPT_FILENAME']); - $updir = str_replace('/setup','',$this_dir); - $GLOBALS['egw_info']['server']['server_root'] = $updir; - $GLOBALS['egw_info']['server']['include_root'] = $updir; - } - - - $setup_tpl->set_var('detected',$detected); - /* End of detected settings, now display the form with the detected or prior values */ - - $setup_tpl->set_var('server_root',@$GLOBALS['egw_info']['server']['server_root']); - $setup_tpl->set_var('include_root',@$GLOBALS['egw_info']['server']['include_root']); - if(!@isset($GLOBALS['egw_info']['server']['header_admin_user'])) - { - $setup_tpl->set_var('header_admin_user','admin'); - } - else - { - $setup_tpl->set_var('header_admin_user',@$GLOBALS['egw_info']['server']['header_admin_user']); - } - $setup_tpl->set_var('header_admin_pass',@$GLOBALS['egw_info']['server']['header_admin_password']); - $setup_tpl->set_var('header_admin_password',''); - - - if(@$GLOBALS['egw_info']['server']['db_persistent']) - { - $setup_tpl->set_var('db_persistent_yes',' selected="selected"'); - } - else - { - $setup_tpl->set_var('db_persistent_no',' selected="selected"'); - } - - $selected = ''; - $session_options = ''; - foreach($supported_sessions_type as $k => $v) - { - if($k == @$GLOBALS['egw_info']['server']['sessions_type']) - { - $selected = ' selected="selected" '; - } - else - { - $selected = ''; - } - $session_options .= '\n"; - } - $setup_tpl->set_var('session_options',$session_options); - - if(@$GLOBALS['egw_info']['server']['mcrypt_enabled']) - { - $setup_tpl->set_var('mcrypt_enabled_yes',' selected="selected"'); - } - else - { - $setup_tpl->set_var('mcrypt_enabled_no',' selected="selected"'); - } - - $setup_tpl->set_var('mcrypt',$GLOBALS['egw_info']['server']['versions']['mcrypt']); - $setup_tpl->set_var('mcrypt_iv',$GLOBALS['egw_info']['server']['mcrypt_iv']); - - $setup_tpl->set_var('lang_setup_acl',lang('Limit access')); - $setup_tpl->set_var('lang_setup_acl_descr',lang('Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org)')); - $setup_tpl->set_var('setup_acl',$GLOBALS['egw_info']['server']['setup_acl']); - - if(@$GLOBALS['egw_info']['server']['show_domain_selectbox']) - { - $setup_tpl->set_var('domain_selectbox_yes',' selected="selected"'); - } - else - { - $setup_tpl->set_var('domain_selectbox_no',' selected="selected"'); - } - - $errors = ''; - if(!$found_dbtype) - { - /* - $errors .= '
' . lang('Warning!') . '
' - . lang('The db_type in defaults (%1) is not supported on this server. using first supported type.',$GLOBALS['egw_info']['server']['db_type']) - . '
'; - */ - } - - if(is_writeable('../header.inc.php') || - (!file_exists('../header.inc.php') && is_writeable('../'))) - { - $errors .= '
 ' - . lang('or') . '  ' - . lang('or') . '  '.lang('the file').'.'; - } - else - { - $errors .= '
' - . lang('Cannot create the header.inc.php due to file permission restrictions.
Instead you can %1 the file.', - '' . lang('or') . ' '); - } - // set domain and password for the continue button - @reset($GLOBALS['egw_domain']); - list($firstDomain) = @each($GLOBALS['egw_domain']); - $setup_tpl->set_var(array( - 'FormDomain' => $firstDomain, - 'FormUser' => $GLOBALS['egw_domain'][$firstDomain]['config_user'], - 'FormPW' => $GLOBALS['egw_domain'][$firstDomain]['config_passwd'] - )); - $setup_tpl->set_var('errors',$errors); - - $setup_tpl->set_var('lang_settings',lang('Settings')); - $setup_tpl->set_var('lang_adddomain',lang('Add new database instance (eGW domain)')); - $setup_tpl->set_var('lang_serverroot',lang('Server Root')); - $setup_tpl->set_var('lang_includeroot',lang('Include Root (this should be the same as Server Root unless you know what you are doing)')); - $setup_tpl->set_var('lang_adminuser',lang('Header loginname')); - $setup_tpl->set_var('lang_adminuser_descr',lang('Admin user for header manager')); - $setup_tpl->set_var('lang_adminpass',lang('Header password')); - $setup_tpl->set_var('lang_adminpass_descr',lang('Admin password to header manager.')); - $setup_tpl->set_var('lang_leave_empty',lang('Leave empty to keep current.')); - $setup_tpl->set_var('lang_dbhost',lang('DB Host')); - $setup_tpl->set_var('lang_dbhostdescr',lang('Hostname/IP of database server').'
'. - lang('Postgres: Leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection').'
'. - lang('ODBC / MaxDB: DSN (data source name) to use')); - $setup_tpl->set_var('lang_dbport',lang('DB Port')); - $setup_tpl->set_var('lang_dbportdescr',lang('TCP port number of database server')); - $setup_tpl->set_var('lang_dbname',lang('DB Name')); - $setup_tpl->set_var('lang_dbnamedescr',lang('Name of database')); - $setup_tpl->set_var('lang_dbuser',lang('DB User')); - $setup_tpl->set_var('lang_dbuserdescr',lang('Name of db user eGroupWare uses to connect')); - $setup_tpl->set_var('lang_dbpass',lang('DB Password')); - $setup_tpl->set_var('lang_dbpassdescr',lang('Password of db user')); - $setup_tpl->set_var('lang_dbtype',lang('DB Type')); - $setup_tpl->set_var('lang_whichdb',lang('Which database type do you want to use with eGroupWare?')); - $setup_tpl->set_var('lang_configuser',lang('Configuration User')); - $setup_tpl->set_var('lang_configuser_descr',lang('Loginname needed for domain configuration')); - $setup_tpl->set_var('lang_configpass',lang('Configuration Password')); - $setup_tpl->set_var('lang_passforconfig',lang('Password needed for domain configuration.')); - $setup_tpl->set_var('lang_persist',lang('Persistent connections')); - $setup_tpl->set_var('lang_persistdescr',lang('Do you want persistent connections (higher performance, but consumes more resources)')); - $setup_tpl->set_var('lang_sesstype',lang('Sessions Type')); - $setup_tpl->set_var('lang_sesstypedescr',lang('What type of sessions management do you want to use (PHP session management may perform better)?'). - ' '.lang('PHP plus restore gives by far the best performance, as it stores the eGW enviroment completly in the session.'). - ' '.lang('Unfortunally some PHP/Apache packages have problems with it (Apache dies and you cant login anymore).')); - $setup_tpl->set_var('lang_enablemcrypt',lang('Enable MCrypt')); - $setup_tpl->set_var('lang_mcrypt_warning',lang('Not all mcrypt algorithms and modes work with eGroupWare. If you experience problems try switching it off.')); - $setup_tpl->set_var('lang_mcryptversion',lang('MCrypt version')); - $setup_tpl->set_var('lang_mcryptversiondescr',lang('Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use.')); - $setup_tpl->set_var('lang_mcryptiv',lang('MCrypt initialization vector')); - $setup_tpl->set_var('lang_mcryptivdescr',lang('This should be around 30 bytes in length.
Note: The default has been randomly generated.')); - $setup_tpl->set_var('lang_domselect',lang('Domain select box on login')); - $setup_tpl->set_var('lang_domselect_descr',lang('Alternatively domains can be accessed by logging in with username@domain.')); - $setup_tpl->set_var('lang_finaldescr',lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".')); - $setup_tpl->set_var('lang_continue',lang('Continue')); - $setup_tpl->set_var('lang_Yes',lang('Yes')); - $setup_tpl->set_var('lang_No',lang('No')); - - - $setup_tpl->pfp('out','manageheader'); - - $GLOBALS['egw_setup']->html->show_footer(); - - break; // ending the switch default } -?> +} + +/** + * Validate the posted form and place the content again in $GLOBALS['egw_info'] and $GLOBALS['egw_domain'] + * + * @return array with validation errors, see setup_header::validation_errors + */ +function check_header_form() +{ + // setting the non-domain settings from the posted content + foreach($_POST['setting'] as $name => $value) + { + if (get_magic_quotes_gpc()) $value = stripslashes($value); + + switch($name) + { + case 'show_domain_selectbox': + case 'mcrypt_enabled': + case 'db_persistent': + $GLOBALS['egw_info']['server'][$name] = $value == 'True'; + break; + case 'new_admin_password': + if ($value) $GLOBALS['egw_info']['server']['header_admin_password'] = md5($value); + break; + case 'mcrypt_version': + $GLOBALS['egw_info']['server']['versions']['mcrypt'] = $value; + default: + $GLOBALS['egw_info']['server'][$name] = $value; + break; + } + } + + // setting the domain settings from the posted content + foreach($_POST['domains'] as $key => $domain) + { + if ($_POST['deletedomain'][$key]) continue; // domain deleted + + foreach($_POST['setting_'.$key] as $name => $value) + { + if (get_magic_quotes_gpc()) $value = stripslashes($value); + + if ($name == 'new_config_passwd') + { + if ($value) $GLOBALS['egw_domain'][$domain]['config_passwd'] = md5($value); + continue; + } + $GLOBALS['egw_domain'][$domain][$name] = $value; + } + } + + // validate the input and return errors + $validation_errors = $GLOBALS['egw_setup']->header->validation_errors( + $GLOBALS['egw_info']['server']['server_root'], + $GLOBALS['egw_info']['server']['include_root']); + + //echo "egw_info[server]=
".print_r($GLOBALS['egw_info']['server'],true)."
\n"; + //echo "egw_domain=
".print_r($GLOBALS['egw_domain'],true)."
\n"; + if ($validation_errors) echo "validation_errors=
".print_r($validation_errors,true)."
\n"; + + return $validation_errors; +} + +/** + * Display the form to edit the configuration + * + * @param array $validation_errors to display + */ +function show_header_form($validation_errors) +{ + global $setup_tpl; + + $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['HeaderFormMSG'], False, 'header'); + + if(!get_var('ConfigLang',array('POST','COOKIE'))) + { + $setup_tpl->set_var('lang_select','
Please Select your language '.lang_select(True,'en')."
"); + } + + $setup_tpl->set_var('pagemsg',$GLOBALS['egw_info']['setup']['PageMSG']); + + // checking required PHP version 4.3+ + if((float) PHP_VERSION < '4.3') + { + echo '

' + . lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.',PHP_VERSION,'4.3','5'). "\n" + . '

'; + $GLOBALS['egw_setup']->html->show_footer(); + exit; + } + $supported_db = $GLOBALS['egw_setup']->header->check_db_support($detected); + + if (!count($supported_db)) + { + echo '

' + . lang('Did not find any valid DB support!') + . "
\n" + . lang('Try to configure your php to support one of the above mentioned DBMS, or install eGroupWare by hand.') + . '

'; + $GLOBALS['egw_setup']->html->show_footer(); + exit; + } + $js_default_db_ports = 'var default_db_ports = new Array();'."\n"; + foreach($GLOBALS['egw_setup']->header->default_db_ports as $db => $port) + { + $js_default_db_ports .= ' default_db_ports["'.$db.'"]="'.$port.'";'."\n"; + } + $setup_tpl->set_var('js_default_db_ports',$js_default_db_ports); + + // checking PHP session support + if ($GLOBALS['egw_setup']->header->check_load_extension('session')) + { + $detected[] = lang('You appear to have PHP session support. Enabling PHP sessions.'); + $supported_sessions_type['php4'] = 'PHP'; // makeing php sessions the default + $supported_sessions_type['php4-restore'] = lang('PHP plus restore'); // php-sessions with restore of egw_info array and egw object from the session + } + $supported_sessions_type['db'] = lang('Database'); + + if (file_exists('../header.inc.php') && is_file('../header.inc.php') && is_readable('../header.inc.php')) + { + $detected[] = lang('Found existing configuration file. Loading settings from the file...'); + + // This code makes sure the newer multi-domain supporting header.inc.php is being used + if(!isset($GLOBALS['egw_domain'])) + { + $detected[] = lang('You need to add some domains to your header.inc.php.'); + + $GLOBALS['egw_domain']['default'] = $GLOBALS['egw_setup']->header->domain_defaults( + $GLOBALS['egw_info']['server']['header_admin_user'], + $GLOBALS['egw_info']['server']['header_admin_password'],$supported_db); + } + elseif(@$GLOBALS['egw_info']['server']['header_version'] != @$GLOBALS['egw_info']['server']['current_header_version']) + { + $detected[] = lang("You're using an old header.inc.php version..."); + $detected[] = lang('Importing old settings into the new format....'); + } + } + else // no config file found => using or detecting the defaults + { + $detected[] = lang('Sample configuration not found. Using built in defaults'); + } + if ($validation_errors) $detected = $validation_errors; + $setup_tpl->set_var('detected','
  • '.implode("
  • \n
  • ",$detected)."
  • \n
\n"); + + if ($_POST['adddomain']) + { + $GLOBALS['egw_domain'][lang('new')] = $GLOBALS['egw_setup']->header->domain_defaults( + $GLOBALS['egw_info']['server']['header_admin_user'], + $GLOBALS['egw_info']['server']['header_admin_password'],$supported_db); + } + // show the non-domain settings + //echo "
".print_r($GLOBALS['egw_info']['server'],true)."
\n"; + foreach($GLOBALS['egw_info']['server'] as $name => $value) + { + switch($name) + { + case 'db_persistent': + case 'show_domain_selectbox': + case 'mcrypt_enabled': + $setup_tpl->set_var($name.($GLOBALS['egw_info']['server'][$name] ? '_yes' : '_no'),' selected="selected"'); + break; + case 'versions': + $setup_tpl->set_var('mcrypt_version',htmlspecialchars($GLOBALS['egw_info']['server']['versions']['mcrypt'])); + break; + default: + $setup_tpl->set_var($name,htmlspecialchars($value)); + break; + } + } + $options = array(); + foreach($supported_sessions_type as $type => $label) + { + $options[] = ''; + } + $setup_tpl->set_var('session_options',implode("\n",$options)); + + // showing the settings of all domains + foreach($GLOBALS['egw_domain'] as $domain => $data) + { + $setup_tpl->set_var('db_domain',htmlspecialchars($domain)); + foreach($data as $name => $value) + { + if ($name == 'db_port' && !$value) // Set default here if the admin didn't set a port yet + { + $value = $GLOBALS['egw_setup']->header->default_db_ports[$data['db_type']]; + } + $setup_tpl->set_var($name,htmlspecialchars($value)); + } + $dbtype_options = ''; + foreach($supported_db as $db) + { + $dbtype_options .= '\n"; + } + $setup_tpl->set_var('dbtype_options',$dbtype_options); + + $setup_tpl->parse('domains','domain',True); + } + if(is_writeable('../header.inc.php') || !file_exists('../header.inc.php') && is_writeable('../')) + { + $setup_tpl->set_var('actions',lang('%1, %2 or %3 the configuration file.', + '', + '', + '')); + } + else + { + $setup_tpl->set_var('actions',lang('Cannot create the header.inc.php due to file permission restrictions.
Instead you can %1 or %2 the file.', + '', + '')); + } + // set domain and password for the continue button + @reset($GLOBALS['egw_domain']); + list($firstDomain) = @each($GLOBALS['egw_domain']); + + $setup_tpl->set_var(array( + 'FormDomain' => $firstDomain, + 'FormUser' => $GLOBALS['egw_domain'][$firstDomain]['config_user'], + 'FormPW' => $GLOBALS['egw_domain'][$firstDomain]['config_passwd'] + )); + + $setup_tpl->set_var(array( + 'lang_analysis' => $validation_errors ? lang('Validation errors') : lang('Analysis'), + 'lang_settings' => lang('Settings'), + 'lang_domain' => lang('Database instance (eGW domain)'), + 'lang_delete' => lang('Delete'), + 'lang_adddomain' => lang('Add new database instance (eGW domain)'), + 'lang_serverroot' => lang('Server Root'), + 'lang_serverroot_descr'=> lang('Path (not URL!) to your eGroupWare installation.'), + 'lang_includeroot' => lang('Include Root'), + 'lang_includeroot_descr'=>lang('Should be the same as Server Root unless you know what you are doing.'), + 'lang_adminuser' => lang('Header username'), + 'lang_adminuser_descr' => lang('Admin user for header manager'), + 'lang_adminpass' => lang('Header password'), + 'lang_adminpass_descr' => lang('Admin password to header manager').'.', + 'lang_leave_empty' => lang('Leave empty to keep current.'), + 'lang_setup_acl' => lang('Limit access'), + 'lang_setup_acl_descr' => lang('Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org)'), + 'lang_dbhost' => lang('DB Host'), + 'lang_dbhostdescr' => lang('Hostname/IP of database server').'
'. + lang('Postgres: Leave it empty to use the prefered unix domain sockets instead of a tcp/ip connection').'
'. + lang('ODBC / MaxDB: DSN (data source name) to use'), + 'lang_dbport' => lang('DB Port'), + 'lang_dbportdescr' => lang('TCP port number of database server'), + 'lang_dbname' => lang('DB Name'), + 'lang_dbnamedescr' => lang('Name of database'), + 'lang_dbuser' => lang('DB User'), + 'lang_dbuserdescr' => lang('Name of db user eGroupWare uses to connect'), + 'lang_dbpass' => lang('DB Password'), + 'lang_dbpassdescr' => lang('Password of db user'), + 'lang_dbtype' => lang('DB Type'), + 'lang_whichdb' => lang('Which database type do you want to use with eGroupWare?'), + 'lang_configuser' => lang('Configuration User'), + 'lang_configuser_descr'=> lang('Loginname needed for domain configuration'), + 'lang_configpass' => lang('Configuration Password'), + 'lang_passforconfig' => lang('Password needed for domain configuration.'), + 'lang_persist' => lang('Persistent connections'), + 'lang_persistdescr' => lang('Do you want persistent connections (higher performance, but consumes more resources)'), + 'lang_sesstype' => lang('Sessions Type'), + 'lang_sesstypedescr' => lang('What type of sessions management do you want to use (PHP session management may perform better)?'). + ' '.lang('PHP plus restore gives by far the best performance, as it stores the eGW enviroment completly in the session.'). + ' '.lang('Unfortunally some PHP/Apache packages have problems with it (Apache dies and you cant login anymore).'), + 'lang_enablemcrypt' => lang('Enable MCrypt'), + 'lang_mcrypt_warning' => lang('Not all mcrypt algorithms and modes work with eGroupWare. If you experience problems try switching it off.'), + 'lang_mcryptversion' => lang('MCrypt version'), + 'lang_mcryptversiondescr' => lang('Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use.'), + 'lang_mcryptiv' => lang('MCrypt initialization vector'), + 'lang_mcryptivdescr' => lang('This should be around 30 bytes in length.
Note: The default has been randomly generated.'), + 'lang_domselect' => lang('Domain select box on login'), + 'lang_domselect_descr' => lang('Alternatively domains can be accessed by logging in with username@domain.'), + 'lang_finaldescr' => lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".'), + 'lang_continue' => lang('Continue'), + 'lang_Yes' => lang('Yes'), + 'lang_No' => lang('No') + )); + $setup_tpl->pfp('out','manageheader'); + + $GLOBALS['egw_setup']->html->show_footer(); +} diff --git a/setup/setup-cli.php b/setup/setup-cli.php new file mode 100755 index 0000000000..4f487ebf38 --- /dev/null +++ b/setup/setup-cli.php @@ -0,0 +1,419 @@ +#!/usr/bin/php + * +* ------------------------------------------------------------------------ * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU General Public License as published by the * +* Free Software Foundation; either version 2 of the License, or (at your * +* option) any later version. * +\**************************************************************************/ + +/* $Id: class.socontacts_sql.inc.php 21634 2006-05-24 02:28:57Z ralfbecker $ */ + +/** + * Command line interface for setup + * + * @package addressbook + * @author Ralf Becker + * @copyright (c) 2006 by Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + */ + +chdir(dirname(__FILE__)); // to enable our relative pathes to work, if we are called with a path + +if ($_SERVER['argc'] > 1) +{ + $arguments = $_SERVER['argv']; + array_shift($arguments); + $action = array_shift($arguments); +} +else +{ + $action = '--version'; +} + +if ((float) PHP_VERSION < '4.3') +{ + fail(98,lang2('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.',PHP_VERSION,'4.3','5+')); +} + +switch($action) +{ + case '--show-languages': + case '--show-lang': + echo html_entity_decode(file_get_contents('lang/languages'),ENT_COMPAT,'utf-8'); + break; + + case '--version': + case '--check': + do_check(); + break; + + case '--create-header': + case '--edit-header': + case '--update-header': + do_header($action == '--create-header',$arguments); + break; + + case '--exit-codes': + list_exit_codes(); + break; + + default: + fail(20,lang2("Unknows option '%1' !!!",$action)); + + case '--help': + case '--usage': + do_usage(); + break; +} +exit(0); + +/** + * Dummy translation function, if we ever want to translate the command line interface + * + * @param string $message the message with %# replacements + * @param string $arg variable number of arguments + * @return string + */ +function lang2($message,$arg=null) +{ + $args = func_get_args(); + array_shift($args); + + return str_replace(array('%1','%2','%3','%4','%5'),$args,$message); +} + +/** + * Echos usage message + */ +function do_usage() +{ + echo lang2('Usage: %1 {--version|--create-header|--edit-header|--install|--update} [additional options]',basename($_SERVER['argv'][0]))."\n\n"; + + echo '--install '.lang2('[comma-separated languages(en)],[charset(default depending on languages default)],[backup to install]')."\n"; + echo '--show-languages '.lang2('get a list of availible languages')."\n"; + echo '--update '.lang2('run a database schema update (if necessary)')."\n"; + echo '--check '.lang2('checks eGroupWare\'s installed, it\'s versions and necessary upgrads (exits 0: eGW is up to date, 1: no header.inc.php exists, 2: header update necessary, 3: database schema update necessary)')."\n"; + echo '--exit-codes '.lang2('list all exist codes of the command line interface, 0 means Ok')."\n"; + + echo "\n".lang2('Create or edit the eGroupWare configuration file: header.inc.php:')."\n"; + echo '--create-header '.lang2('header-password[,header-user(admin)]')."\n"; + echo '--edit-header '.lang2('[header-password],[header-user],[new-password],[new-user]')."\n"; + + echo "\n".lang2('Additional options and there defaults (int brackets)')."\n"; + echo '--server-root '.lang2('path of eGroupWare install directory (default auto-detected)')."\n"; + echo '--session-type '.lang2('{db|php(default)|php-restore}')."\n"; + echo '--limit-access '.lang2('comma separated ip-addresses or host-names, default access to setup from everywhere')."\n"; + echo '--mcrypt '.lang2('use mcrypt to crypt session-data: {off(default)|on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version(default empty = recent)]')."\n"; + echo '--db-persistent '.lang2('use persistent db connections: {on(default)|off}')."\n"; + echo '--domain-selectbox '.lang2('{off(default)|on}')."\n"; + + echo "\n".lang2('Adding, editing or deleting an eGroupWare domain / database instance:')."\n"; + echo '--domain '.lang2('add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)]')."\n"; + echo '--delete-domain '.lang2('domain-name')."\n"; +} + +/** + * detect eGW versions + * + * @return array array with versions (keys phpgwapi, current_header and header) + */ +function detect_versions() +{ + $versions = null; + $GLOBALS['egw_info']['flags']['noapi'] = true; + if (!@include('../header.inc.php')) + { + if (!@include('../phpgwapi/setup/setup.inc.php')) + { + fail(99,lang2("eGroupWare sources in '%1' are not complete, file '%2' missing !!!",realpath('..'),'phpgwapi/setup/setup.inc.php')); // should not happen ;-) + } + return array( + 'phpgwapi' => $setup_info['phpgwapi']['version'], + 'current_header' => $setup_info['phpgwapi']['versions']['current_header'], + ); + } + return $GLOBALS['egw_info']['server']['versions']; +} + +/** + * Check if eGW is installed, which versions and if an update is needed + */ +function do_check() +{ + $versions = detect_versions(); + echo lang2('eGroupWare API version %1 found.',$versions['phpgwapi'])."\n"; + + if (isset($versions['header'])) // header.inc.php exists + { + echo lang2("eGroupWare configuration file (header.inc.php) version %1 exists%2",$versions['header'], + ($versions['header'] == $versions['current_header'] ? ' '.lang2('and is up to date') : '')).".\n"; + + if ($versions['header'] != $versions['current_header']) + { + // exit-code 2: header.inc.php needs upgrading + fail(2,lang2('You need to upgrade your header to the new version %1 (using --edit-header)!',$versions['current_header'])); + } + } + else + { + // exit-code 1: no header.inc.php + $this->check_fail_header_exists(); + } + // ToDo: check if eGW needs a schema upgrade and exit(3) if so +} + +function fail($exit_code,$message) +{ + echo $message."\n"; + exit($exit_code); +} + +/** + * List all exit codes used by the command line interface + * + */ +function list_exit_codes() +{ + error_reporting(error_reporting() & ~E_NOTICE); + + $codes = array(); + foreach(file(__FILE__) as $line) + { + if (preg_match('/fail\(([0-9]+),(.*)\);/',$line,$matches)) + { + eval('$codes['.$matches[1].'] = '.$matches[2].';'); + } + } + ksort($codes,SORT_NUMERIC); + foreach($codes as $num => $msg) + { + echo $num."\t".str_replace("\n","\n\t",$msg)."\n"; + } +} + +/** + * Check if we have a header.inc.php and fail with exit(10) if not + * + */ +function check_fail_header_exists() +{ + if (!file_exists('../header.inc.php')) + { + fail(1,lang2('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang2('Use --create-header to create the configuration file (--usage gives more options).')); + } +} +/** + * Create, edit or update the header.inc.php + * + * @param boolean $create true = create new header, false = edit (or update) existing header + * @param array $arguments + * @return int + */ +function do_header($create,&$arguments) +{ + // setting up the $GLOBALS['egw_setup'] object AND including the header.inc.php if it exists + $GLOBALS['egw_info'] = array( + 'flags' => array( + 'currentapp' => 'home', + 'noapi' => true, + )); + include('inc/functions.inc.php'); + + require_once('inc/class.setup_header.inc.php'); + $GLOBALS['egw_setup']->header =& new setup_header(); + + if (!file_exists('../header.inc.php')) + { + if (!$create) $this->check_fail_header_exists(); + + $GLOBALS['egw_setup']->header->defaults(false); + } + else + { + if ($create) fail(11,lang2('eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first!')); + + // header.inc.php is already include by include('inc/functions.inc.php')! + unset($GLOBALS['egw_info']['flags']); + + // check header-admin-user and -password + @list($password,$user) = explode(',',@$arguments[0]); + if (!$user) $user = 'admin'; + require_once('inc/class.setup.inc.php'); + if (!setup::check_auth($user,$password,$GLOBALS['egw_info']['server']['header_admin_user'], + $GLOBALS['egw_info']['server']['header_admin_password'])) + { + fail(12,lang2('Access denied: wrong username or password for manage-header !!!')); + } + $GLOBALS['egw_info']['server']['server_root'] = EGW_SERVER_ROOT; + $GLOBALS['egw_info']['server']['include_root'] = EGW_INCLUDE_ROOT; + } + + $options = array( + '--create-header' => array( + 'header_admin_password' => 'egw_info/server/', + 'header_admin_user' => 'egw_info/server/', + ), + '--edit-header' => array( + 'header_admin_password' => 'egw_info/server/', + 'header_admin_user' => 'egw_info/server/', + 'new_admin_password' => 'egw_info/server/header_admin_password', + 'new_admin_user' => 'egw_info/server/header_admin_user', + ), + '--server-root' => 'egw_info/server/server_root', + '--include-root' => 'egw_info/server/include_root', + '--session-type' => array( + 'sessions_type' => array( + 'type' => 'egw_info/server/', + 'allowed' => array('php'=>'php4','php4'=>'php4','php-restore'=>'php4-restore','php4-restore'=>'php4-restore','db'=>'db'), + ), + ), + '--limit-access' => 'egw_info/server/setup_acl', // name used in setup + '--setup-acl' => 'egw_info/server/setup_acl', // alias to match the real name + '--mcrypt' => array( + 'mcrypt_enabled' => array( + 'type' => 'egw_info/server/', + 'allowed' => array('on' => true,'off' => false), + ), + 'mcrypt_iv' => 'egw_info/server/', + 'mcrypt' => 'egw_info/versions/mcrypt', + ), + '--domain-selectbox' => array( + 'show_domain_selectbox' => array( + 'type' => 'egw_info/server/', + 'allowed' => array('on' => true,'off' => false), + ), + ), + '--db-persistent' => array( + 'db_persistent' => array( + 'type' => 'egw_info/server/', + 'allowed' => array('on' => true,'off' => false), + ), + ), + '--domain' => array( + 'domain' => '@', + 'db_name' => 'egw_domain/@/', + 'db_user' => 'egw_domain/@/', + 'db_pass' => 'egw_domain/@/', + 'db_type' => 'egw_domain/@/', + 'db_host' => 'egw_domain/@/', + 'db_port' => 'egw_domain/@/', + 'config_user' => 'egw_domain/@/', + 'config_passwd' => 'egw_domain/@/', + ), + '--delete-domain' => true, + ); + array_unshift($arguments,$create ? '--create-header' : '--edit-header'); + while(($arg = array_shift($arguments))) + { + $values = count($arguments) && substr($arguments[0],0,2) !== '--' ? array_shift($arguments) : 'on'; + + if ($arg == '--delete-domain') + { + if (!isset($GLOBALS['egw_domain'][$values])) fail(22,lang2("Domain '%1' does NOT exist !!!",$values)); + unset($GLOBALS['egw_domain'][$values]); + continue; + } + + if (!isset($options[$arg])) fail(20,lang2("Unknow option '%1' !!!",$arg)); + + $option = $options[$arg]; + $values = !is_array($option) ? array($values) : explode(',',$values); + if (!is_array($option)) $option = array($option => $option); + $n = 0; + foreach($option as $name => $data) + { + if ($n >= count($values)) break; + + if (!is_array($data)) $data = array('type' => $data); + $type = $data['type']; + + $value = $values[$n]; + if (isset($data['allowed'])) + { + if (!isset($data['allowed'][$value])) + { + fail(21,lang2("'%1' is not allowed as %2. arguments of option %3 !!!",$value,1+$n,$arg)); + } + $value = $data['allowed'][$value]; + } + if ($type == '@') + { + $remember = $arg == '--domain' && !$value ? 'default' : $value; + if ($arg == '--domain' && (!isset($GLOBALS['egw_domain'][$remember]) || $create)) + { + $GLOBALS['egw_domain'][$remember] = $GLOBALS['egw_setup']->header->domain_defaults($GLOBALS['egw_info']['server']['header_admin_user'],$GLOBALS['egw_info']['server']['header_admin_password']); + } + } + elseif ($value !== '') + { + set_value($GLOBALS,str_replace('@',$remember,$type),$name,$value); + if ($name == 'egw_info/server/server_root') + { + set_value($GLOBALS,'egw_info/server/include_root',$name,$value); + } + } + ++$n; + } + } + if (($errors = $GLOBALS['egw_setup']->header->validation_errors($GLOBALS['egw_info']['server']['server_root'],$GLOBALS['egw_info']['server']['include_root']))) + { + echo '$GLOBALS[egw_info] = '; print_r($GLOBALS['egw_info']); + echo '$GLOBALS[egw_domain] = '; print_r($GLOBALS['egw_domain']); + echo "\n".lang2('Configuration errors:')."\n- ".implode("\n- ",$errors)."\n"; + fail(23,lang2("You need to fix the above errors, before the configuration file header.inc.php can be written!")); + } + $header = $GLOBALS['egw_setup']->header->generate($GLOBALS['egw_info'],$GLOBALS['egw_domain'], + $GLOBALS['egw_info']['server']['server_root'],$GLOBALS['egw_info']['server']['include_root']); + + echo $header; + + if (file_exists('../header.inc.php') && is_writable('../header.inc.php') || is_writable('../')) + { + if (is_writable('../') && file_exists('../header.inc.php')) unlink('../header.inc.php'); + if (($f = fopen('../header.inc.php','wb')) && fwrite($f,$header)) + { + fclose($f); + echo "\n".lang2('header.inc.php successful written.')."\n\n"; + exit(0); + } + } + fail(24,lang2("Failed writing configuration file header.inc.php, check the permissions !!!")); +} + +function set_value($arr,$index,$name,$value) +{ + if (substr($index,-1) == '/') $index .= $name; + + $var =& $arr; + foreach(explode('/',$index) as $name) + { + $var =& $var[$name]; + } + $var = strstr($name,'passw') ? md5($value) : $value; +} + +if (!function_exists('generate_mcyrpt_iv')) +{ + function generate_mcyrpt_iv() + { + srand((double)microtime()*1000000); + $random_char = array( + '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f', + 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', + 'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', + 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' + ); + + $iv = ''; + for($i=0; $i<30; $i++) + { + $iv .= $random_char[rand(1,count($random_char))]; + } + return $iv; + } +} diff --git a/setup/templates/default/manageheader.tpl b/setup/templates/default/manageheader.tpl index 30b183f83e..a167b40028 100644 --- a/setup/templates/default/manageheader.tpl +++ b/setup/templates/default/manageheader.tpl @@ -30,25 +30,32 @@ function setDefaultDBPort(selectBox,portField)
- {lang_settings} - {lang_serverroot}
+ + {lang_serverroot} {lang_serverroot_descr}
+ + - {lang_includeroot}
+ + {lang_includeroot} {lang_includeroot_descr}
+ + - {lang_adminuser}
+ {lang_adminuser}
{lang_adminuser_descr} - {lang_adminpass}
- {lang_adminpass_descr} {lang_leave_empty} + {lang_adminpass}
+ + + {lang_adminpass_descr}
{lang_leave_empty} {lang_setup_acl}
@@ -73,7 +80,7 @@ function setDefaultDBPort(selectBox,portField) {lang_enablemcrypt}
- @@ -81,7 +88,7 @@ function setDefaultDBPort(selectBox,portField) {lang_mcrypt_warning} - {lang_mcryptversion}
+ {lang_mcryptversion}
{lang_mcryptversiondescr} @@ -90,7 +97,7 @@ function setDefaultDBPort(selectBox,portField) {lang_domselect}
- @@ -107,7 +114,7 @@ function setDefaultDBPort(selectBox,portField) {comment_r} - {errors} + {actions} @@ -173,8 +180,10 @@ function setDefaultDBPort(selectBox,portField) {lang_configuser_descr} - {lang_configpass}
- {lang_passforconfig} {lang_leave_empty} + {lang_configpass}
+ + + {lang_passforconfig}
{lang_leave_empty} From 1a3b8761a68a28f92e619687cf32b202fe862272 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 28 May 2006 00:55:41 +0000 Subject: [PATCH 020/176] first step to new setup command line interface (setup/setup-cli.php): - atm. all manageheader functionality is accessible - reworked manageheader.php using the new setup_header class shared with setup-cli.php => install & update via cli is comming the next days Works in 1.2 if you drop setup-cli.php and class.setup_header.inc.php in a 1.2 install. --- setup/inc/class.setup_header.inc.php | 290 +++++++++++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 setup/inc/class.setup_header.inc.php diff --git a/setup/inc/class.setup_header.inc.php b/setup/inc/class.setup_header.inc.php new file mode 100644 index 0000000000..b075364214 --- /dev/null +++ b/setup/inc/class.setup_header.inc.php @@ -0,0 +1,290 @@ + * +* ------------------------------------------------------------------------ * +* This program is free software; you can redistribute it and/or modify it * +* under the terms of the GNU General Public License as published by the * +* Free Software Foundation; either version 2 of the License, or (at your * +* option) any later version. * +\**************************************************************************/ + +/* $Id: class.setup_html.inc.php 20991 2006-04-06 11:19:56Z ralfbecker $ */ + +/** + * Functions to manage the eGW config file header.inc.php + * + * Used by manageheader.php and the new setup command line interface setup-cli.php + * + * @package setup + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + */ +class setup_header +{ + /** + * @var array with php-extension / ADOdb drive names => describtiv label + */ + var $db_fullnames = array( + 'pgsql' => 'PostgreSQL', + 'mysql' => 'MySQL', + 'mysqli' => 'MySQLi (php5)', + 'mssql' => 'MS SQL Server', + 'odbc_mssql' => 'MS SQL Server via ODBC', + 'oracle' => 'Oracle', + 'odbc_oracle' => 'Oracle via ODBC', + 'sapdb' => 'SAP/Max DB via ODBC', + ); + + /** + * @var array with php-extension / ADOdb drive names => default port used by database + */ + var $default_db_ports = array( + 'pgsql' => 5432, + 'mysql' => 3306, + 'mysqli' => 3306, + 'mssql' => 1433, + 'odbc_mssql' => '', + 'oracle' => 1521, + 'odbc_oracle' => '', + 'sapdb' => '', + ); + + /** + * Detect settings or set defaults for the header.inc.php file (used if it does not yet exist) + * + * Sets $GLOBALS['egw_info'], $GLOBALS['egw_domains'] and the defines EGW_SERVER_ROOT and EGW_INCLUDE_ROOT, + * as if the header has been included + * + * @param string $domain='default' domain to set + */ + function defaults($domain='default') + { + $egw_root = realpath(dirname(__FILE__).'/../..'); + $GLOBALS['egw_info']['server']['server_root'] = $GLOBALS['egw_info']['server']['include_root'] = $egw_root; + define('EGW_SERVER_ROOT',$egw_root); // this is usally already defined by setup and cant be changed + define('EGW_INCLUDE_ROOT',$egw_root); + + $GLOBALS['egw_info']['server']['header_admin_user'] = 'admin'; + $GLOBALS['egw_info']['server']['header_admin_password'] = ''; + $GLOBALS['egw_info']['server']['setup_acl'] = ''; + + if ($domain) $GLOBALS['egw_domain'][$domain] = $this->domain_defaults(); + + $GLOBALS['egw_info']['server']['show_domain_selectbox'] = false; + $GLOBALS['egw_info']['server']['db_persistent'] = True; + $GLOBALS['egw_info']['server']['sessions_type'] = !$this->check_load_extension('session') ? 'db' :'php4'; + $GLOBALS['egw_info']['login_template_set'] = 'idots'; + $GLOBALS['egw_info']['server']['mcrypt_enabled'] = False; + $GLOBALS['egw_info']['server']['versions']['mcrypt'] = ''; + $GLOBALS['egw_info']['server']['mcrypt_iv'] = $this->generate_mcyrpt_iv(); + } + + function domain_defaults($user='admin',$passwd='',$supported_db=null) + { + if (is_null($supported_db)) $supported_db = $this->check_db_support($null); + $default_db = count($supported_db) ? $supported_db[0] : 'mysql'; + + return array( + 'db_host' => 'localhost', + 'db_port' => $this->default_db_ports[$default_db], + 'db_name' => 'egroupware', + 'db_user' => 'egroupware', + 'db_pass' => '', + 'db_type' => $default_db, + 'config_user' => $user, + 'config_passwd' => $passwd, + ); + } + + /** + * Checks the values of the (included) header.inc.php file + * + * The values are set in $GLOBALS['egw_info'], $GLOBALS['egw_domain'] and EGW_SERVER_ROOT + * + * @return array with errors or null if no errors + */ + function validation_errors($server_root=EGW_SERVER_ROOT,$include_root=EGW_INCLUDE_ROOT) + { + $errors = null; + + foreach(array( + lang('Server root') => $server_root, + lang('Include root') => $include_root) as $label => $path) + { + if (!is_dir($path) || !is_readable($path) || !is_dir($path.'/phpgwapi')) + { + $errors[] = lang("%1 '%2' does NOT exist, is not readable by the webserver or contains no eGroupWare installation!",$label,$path); + } + } + if(!$GLOBALS['egw_info']['server']['header_admin_password']) + { + $errors[] = lang("You didn't enter a header admin password"); + } + if(!$GLOBALS['egw_info']['server']['header_admin_user']) + { + $errors[] = lang("You didn't enter a header admin username"); + } + if (!is_array($GLOBALS['egw_domain']) || !count($GLOBALS['egw_domain'])) + { + $errors[] = lang('You need to add at least one eGroupWare domain / database instance.'); + } + else + { + foreach($GLOBALS['egw_domain'] as $domain => $data) + { + if (!$data['config_passwd']) + { + $errors[] = lang("You didn't enter a config password for domain %1",$domain); + } + if(!$data['config_user']) + { + $errors[] = lang("You didn't enter a config username for domain %1",$domain); + } + } + } + return $errors; + } + + /** + * generate header.inc.php file from given values + * + * setup_header::generate(EGW_SERVER_ROOT,EGW_INCLUDE_ROOT,$GLOBALS['egw_info'],$GLOBALS['egw_domains']) + * should write an identical header.inc.php as the one include + * + * @param array $egw_info usual content (in server key) plus keys server_root and include_root + * @param array $egw_domains info about the existing eGW domains / DB instances + * @return string content of header.inc.php + */ + function generate($egw_info,$egw_domain) + { + $tpl =& CreateObject('setup.Template','../'); + $tpl->set_file(array('header' => 'header.inc.php.template')); + $tpl->set_block('header','domain','domain'); + + foreach($egw_domain as $domain => $data) + { + $var = array('DB_DOMAIN' => $domain); + foreach($data as $name => $value) + { + if ($name == 'db_port' && !$value) $value = $this->default_db_ports[$data['db_type']]; + if ($name == 'config_passwd') + { + $var['CONFIG_PASS'] = $this->is_md5($value) ? $value : md5($value); + } + else + { + $var[strtoupper($name)] = addslashes($value); + } + } + $tpl->set_var($var); + $tpl->parse('domains','domain',True); + } + $tpl->set_var('domain',''); + + $var = Array(); + foreach($egw_info['server'] as $name => $value) + { + if ($name == 'header_admin_password' && !$this->is_md5($value)) $value = md5($value); + if ($name == 'versions') + { + $name = 'mcrypt_version'; + $value = $value['mcrypt']; + } + static $bools = array( + 'mcrypt_enabled' => 'ENABLE_MCRYPT', + 'db_persistent' => 'db_persistent', + 'show_domain_selectbox' => 'DOMAIN_SELECTBOX', + ); + if (isset($bools[$name])) + { + $name = $bools[$name]; + $value = $value ? 'true' : 'false'; + } + $var[strtoupper($name)] = addslashes($value); + } + $tpl->set_var($var); + + return $tpl->parse('out','header'); + } + + /** + * Gernerate a random mcrypt_iv vector + * + * @return string + */ + function generate_mcyrpt_iv() + { + srand((double)microtime()*1000000); + $random_char = array( + '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f', + 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', + 'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', + 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' + ); + + $iv = ''; + for($i=0; $i<30; $i++) + { + $iv .= $random_char[rand(1,count($random_char))]; + } + return $iv; + } + + /** + * checks if a named extension is loaded or loadable + */ + function check_load_extension($extension) + { + return extension_loaded($extension) || + function_exists('dl') && @dl(PHP_SHLIB_PREFIX.$extension.'.'.PHP_SHLIB_SUFFIX); + } + + function check_db_support(&$detected) + { + $supported_db = $detected = array(); + foreach(array( + // short => array(extension,func_to_check,supported_db(s)) + 'mysql' => array('mysql','mysql_connect','mysql'), + 'mysqli' => array('mysql','mysql_iconnect','mysqli'), + 'pgsql' => array('pgsql','pg_connect','pgsql'), + 'mssql' => array('mssql','mssql_connect','mssql'), + 'odbc' => array('odbc',false,'sapdb','odbc_mssql','odbc_oracle'), + 'oracle' => array('oci8',false,'oracle'), + ) as $db => $data) + { + $ext = array_shift($data); + $func_to_check = array_shift($data); + $name = isset($this->db_fullnames[$db]) ? $this->db_fullnames[$db] : strtoupper($db); + if ($this->check_load_extension($ext) || $func_to_check && function_exists($func_to_check)) + { + $detected[] = lang('You appear to have %1 support.',$name); + $supported_db = array_merge($supported_db,$data); + } + else + { + $detected[] .= lang('No %1 support found. Disabling',$name); + } + } + return $supported_db; + } + + function is_md5($str) + { + return preg_match('/^[0-9a-f]{32}$/',$str); + } +} + +// some constanst for pre php4.3 +if (!defined('PHP_SHLIB_SUFFIX')) +{ + define('PHP_SHLIB_SUFFIX',strtoupper(substr(PHP_OS, 0,3)) == 'WIN' ? 'dll' : 'so'); +} +if (!defined('PHP_SHLIB_PREFIX')) +{ + define('PHP_SHLIB_PREFIX',PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : ''); +} From cfabc10f12a59c326fa196e87d928beac2c36460 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 28 May 2006 02:37:44 +0000 Subject: [PATCH 021/176] updated header to be processed by phpDocumentor --- filemanager/webdav.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/filemanager/webdav.php b/filemanager/webdav.php index 88aeb8d6cd..3cc42a0671 100644 --- a/filemanager/webdav.php +++ b/filemanager/webdav.php @@ -1,26 +1,15 @@ * -* ------------------------------------------------------------------------ * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ - -/* $Id: class.socontacts_sql.inc.php 21634 2006-05-24 02:28:57Z ralfbecker $ */ - /** * FileManger - WebDAV access * * Using the PEAR HTTP/WebDAV/Server class (which need to be installed!) * + * @link http://www.egroupware.org + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @package filemanger * @author Ralf Becker * @copyright (c) 2006 by Ralf Becker - * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id: class.boetemplate.inc.php 21437 2006-04-24 20:42:42Z ralfbecker $ */ /** From 6ccca34f85166b75d7c1419c3c4ea2eff1fc5273 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 28 May 2006 02:39:39 +0000 Subject: [PATCH 022/176] - updated header to be processed by phpDocumentor - fixed bug in delete pointed out by Steven Hammer --- phpgwapi/inc/class.vfs_webdav_server.inc.php | 36 +++++++++----------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/phpgwapi/inc/class.vfs_webdav_server.inc.php b/phpgwapi/inc/class.vfs_webdav_server.inc.php index 5862f015e1..d2680a0957 100644 --- a/phpgwapi/inc/class.vfs_webdav_server.inc.php +++ b/phpgwapi/inc/class.vfs_webdav_server.inc.php @@ -1,16 +1,16 @@ * -* ------------------------------------------------------------------------ * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ - -/* $Id: class.socontacts_sql.inc.php 21634 2006-05-24 02:28:57Z ralfbecker $ */ +/** + * FileManger - WebDAV access + * + * Using the PEAR HTTP/WebDAV/Server class (which need to be installed!) + * + * @link http://www.egroupware.org + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @package filemanger + * @author Ralf Becker + * @copyright (c) 2006 by Ralf Becker + * @version $Id: class.boetemplate.inc.php 21437 2006-04-24 20:42:42Z ralfbecker $ + */ require_once('HTTP/WebDAV/Server.php'); @@ -252,16 +252,14 @@ class vfs_webdav_server extends HTTP_WebDAV_Server 'string' => dirname($GLOBALS['egw']->translation->convert($options['path'],'utf-8')), 'relatives' => array(RELATIVE_ROOT), // filename is relative to the vfs-root ); - if (!$this->vfs->file_exists($path)) + if (!$this->vfs->file_exists($vfs_data)) { return '404 Not found'; } - $vfs_data = array( - 'string' => $GLOBALS['egw']->translation->convert($options['path'],'utf-8'), - 'relatives' => array(RELATIVE_ROOT), // filename is relative to the vfs-root - ); - $this->vfs->rm($vfs_data); - + if (!$this->vfs->rm($vfs_data)) + { + return '403 Forbidden'; + } return '204 No Content'; } From 55b9797a59879a5e1f6764ac1616f9c1e5a4d253 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 29 May 2006 02:56:16 +0000 Subject: [PATCH 023/176] got setup command line interface fully working: - create, edit & update the header - install & update eGW - config eGW - create admin account - install & update languages - create & restore (install) backups ---> update, languages & backup can work for all domains at once ---> for use in 1.2 you have to update/switch the whole setup app to HEAD/trunk --- setup/admin_account.php | 70 +- setup/inc/class.setup.inc.php | 52 +- setup/inc/class.setup_detection.inc.php | 83 ++- setup/inc/class.setup_header.inc.php | 26 +- setup/inc/class.setup_process.inc.php | 4 +- setup/inc/class.setup_translation.inc.php | 40 +- setup/inc/functions.inc.php | 31 +- setup/index.php | 80 +-- setup/manageheader.php | 50 +- setup/setup-cli.php | 764 ++++++++++++++++------ setup/templates/default/admin_account.tpl | 4 + 11 files changed, 802 insertions(+), 402 deletions(-) diff --git a/setup/admin_account.php b/setup/admin_account.php index e592885cff..7f605b0e9f 100644 --- a/setup/admin_account.php +++ b/setup/admin_account.php @@ -1,36 +1,35 @@ + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ - /* $Id$ */ - - // Little file to setup a demo install - - $GLOBALS['egw_info'] = array( - 'flags' => array( - 'noheader' => True, - 'nonavbar' => True, - 'currentapp' => 'home', - 'noapi' => True - )); - include('./inc/functions.inc.php'); - - // Authorize the user to use setup app and load the database - // Does not return unless user is authorized - if(!$GLOBALS['egw_setup']->auth('Config') || get_var('cancel',Array('POST'))) + if (!strstr($_SERVER['PHP_SELF'],'setup-cli.php')) { - Header('Location: index.php'); - exit; + $GLOBALS['egw_info'] = array( + 'flags' => array( + 'noheader' => True, + 'nonavbar' => True, + 'currentapp' => 'home', + 'noapi' => True + )); + include('./inc/functions.inc.php'); + + // Authorize the user to use setup app and load the database + // Does not return unless user is authorized + if(!$GLOBALS['egw_setup']->auth('Config') || get_var('cancel',Array('POST'))) + { + Header('Location: index.php'); + exit; + } + $GLOBALS['egw_setup']->loaddb(true); } - $GLOBALS['egw_setup']->loaddb(true); - $error = ''; if ($_POST['submit']) { @@ -40,6 +39,7 @@ $username = get_var('username',Array('POST')); $fname = get_var('fname',Array('POST')); $lname = get_var('lname',Array('POST')); + $email = get_var('email',Array('POST')); if($passwd != $passwd2 || !$username) { @@ -81,7 +81,8 @@ $setup_tpl->set_var('adminusername',lang('Admin username')); $setup_tpl->set_var('adminfirstname',lang('Admin first name')); $setup_tpl->set_var('adminlastname',lang('Admin last name')); - $setup_tpl->set_var('adminpassword',lang('Admin password')); + $setup_tpl->set_var('adminemail',lang('Admin email address')); + $setup_tpl->set_var('adminpassword',lang('Admin password')); $setup_tpl->set_var('adminpassword2',lang('Re-enter password')); $setup_tpl->set_var('create_demo_accounts',lang('Create demo accounts')); @@ -183,7 +184,7 @@ } /* Create records for administrator account, with Admins as primary and Default as additional group */ - $accountid = $GLOBALS['egw_setup']->add_account($username,$fname,$lname,$passwd,'Admins',True); + $accountid = $GLOBALS['egw_setup']->add_account($username,$fname,$lname,$passwd,'Admins',True,$email); if (!$accountid) { echo '

'.lang('Error in admin-creation !!!')."

\n"; @@ -196,7 +197,8 @@ $GLOBALS['egw_setup']->db->transaction_commit(); - Header('Location: index.php'); - exit; + if (!strstr($_SERVER['PHP_SELF'],'setup-cli.php')) + { + Header('Location: index.php'); + } } -?> diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php index b0dc6a7ab5..071d286050 100644 --- a/setup/inc/class.setup.inc.php +++ b/setup/inc/class.setup.inc.php @@ -1,20 +1,17 @@ * - * and Dan Kuykendall * - * and Mark Peters * - * and Miles Lott * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * Setup + * + * @link http://www.egroupware.org + * @package setup + * @author Joseph Engo + * @author Dan Kuykendall + * @author Mark Peters + * @author Miles Lott + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ class egw_dummy { var $db; @@ -49,6 +46,12 @@ var $tbl_apps; var $tbl_config; var $tbl_hooks; + + /** + * @var float $required_php_version php version required by eGroupWare + */ + var $required_php_version = 4.3; + var $recommended_php_version = '5+'; function setup($html=False, $translation=False) { @@ -885,14 +888,16 @@ * * if the $username already exists, only the id is returned, no new user / group gets created * - * @param username string alphanumerical username or groupname (account_lid) - * @param first, last string first / last name + * @param string $username alphanumerical username or groupname (account_lid) + * @param string $first first name + * @param string $last last name * @param $passwd string cleartext pw - * @param $group string/boolean Groupname for users primary group or False for a group, default 'Default' - * @param $changepw boolean user has right to change pw, default False - * @return the numerical user-id + * @param string/boolean $group Groupname for users primary group or False for a group, default 'Default' + * @param boolean $changepw user has right to change pw, default False + * @param string $email + * @return int the numerical user-id */ - function add_account($username,$first,$last,$passwd,$group='default',$changepw=False) + function add_account($username,$first,$last,$passwd,$group='default',$changepw=False,$email='') { $this->setup_account_object(); @@ -908,7 +913,8 @@ 'account_lastname' => $last, 'account_status' => 'A', 'account_primary_group' => $groupid, - 'account_expires' => -1 + 'account_expires' => -1, + 'account_email' => $email, )); } $accountid = (int)$accountid; diff --git a/setup/inc/class.setup_detection.inc.php b/setup/inc/class.setup_detection.inc.php index 3d3338904f..dad4c46a2d 100755 --- a/setup/inc/class.setup_detection.inc.php +++ b/setup/inc/class.setup_detection.inc.php @@ -1,18 +1,14 @@ * - * and Miles Lott * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * Setup + * + * @link http://www.egroupware.org + * @package setup + * @author Dan Kuykendall + * @author Miles Lott + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ class setup_detection { @@ -306,6 +302,11 @@ } } + /** + * Check if eGW configuration exists + * + * @return int 1 = Needs config, ..., 10 = Config Ok + */ function check_config() { $GLOBALS['egw_setup']->db->Halt_On_Error = 'no'; @@ -314,18 +315,58 @@ return ''; } - $GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_value',array('config_name'=>'freshinstall'),__LINE__,__FILE__); - $configured = $GLOBALS['egw_setup']->db->next_record() ? $GLOBALS['egw_setup']->db->f('config_value') : False; - if($configed) + $GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_name,config_value',array('config_app' => 'phpgwapi'),__LINE__,__FILE__); + while($GLOBALS['egw_setup']->db->next_record()) + { + $config[$GLOBALS['egw_setup']->db->f(0)] = $GLOBALS['egw_setup']->db->f(1); + } + + $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)'; + if(!count($config)) { - $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Needs Configuration)'; return 1; } - else + $config_errors =& $GLOBALS['egw_info']['setup']['config_errors']; + $config_errors = array(); + if (!check_dir($config['temp_dir'],$error_msg)) { - $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Configuration OK)'; - return 10; + $config_errors[] = lang("Your temporary directory '%1' %2",$config['temp_dir'],$error_msg); } + + if ((!isset($config['file_repository']) || $config['file_repository'] == 'sql') && + (!isset($config['file_store_contents']) || $config['file_store_contents'] == 'filesystem') && + !check_dir($config['files_dir'],$error_msg,true)) + { + $config_errors[] = lang("Your files directory '%1' %2",$config['files_dir'],$error_msg); + } + // set and create the default backup_dir + if (@is_writeable($config['files_dir']) && !$config['backup_dir'] && $config['file_store_contents'] == 'filesystem') + { + $config['backup_dir'] = $config['files_dir'].'/db_backup'; + if (!is_dir($config['backup_dir']) && mkdir($config['backup_dir'])) + { + $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( + 'config_value' => $config['backup_dir'], + ),array( + 'config_app' => 'phpgwapi', + 'config_name' => 'backup_dir', + ),__LINE__,__FILE__); + } + } + if (!check_dir($config['backup_dir'],$error_msg,true)) + { + $config_errors[] = lang("Your backup directory '%1' %2",$config['backup_dir'],$error_msg); + } + if (!$config['mail_server'] || !$config['mail_server_type'] || !$config['smtp_server']) + { + $config_errors[] = lang('Missing or uncomplete mailserver configuration'); + } + if ($config_errors) + { + return 2; + } + $GLOBALS['egw_info']['setup']['header_msg'] = 'Stage 2 (Configuration OK)'; + return 10; } function check_lang($check = True) diff --git a/setup/inc/class.setup_header.inc.php b/setup/inc/class.setup_header.inc.php index b075364214..8b17b6fc4d 100644 --- a/setup/inc/class.setup_header.inc.php +++ b/setup/inc/class.setup_header.inc.php @@ -1,19 +1,15 @@ * -* ------------------------------------------------------------------------ * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ - -/* $Id: class.setup_html.inc.php 20991 2006-04-06 11:19:56Z ralfbecker $ */ +/** + * Setup - Manage the eGW config file header.inc.php + * + * @link http://www.egroupware.org + * @package setup + * @author Ralf Becker + * @author Miles Lott + * @author Tony Puglisi (Angles) + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ /** * Functions to manage the eGW config file header.inc.php diff --git a/setup/inc/class.setup_process.inc.php b/setup/inc/class.setup_process.inc.php index 21010b5e49..3806ab66c2 100755 --- a/setup/inc/class.setup_process.inc.php +++ b/setup/inc/class.setup_process.inc.php @@ -196,9 +196,9 @@ $is_windows = strtoupper(substr(PHP_OS,0,3)) == 'WIN'; $GLOBALS['current_config']['site_title'] = 'eGroupWare'; - $GLOBALS['current_config']['hostname'] = $_SERVER['HTTP_HOST']; + $GLOBALS['current_config']['hostname'] = $_SERVER['HTTP_HOST'] ? $_SERVER['HTTP_HOST'] : 'localhost'; - // guessing the phpGW url + // guessing the eGW url $parts = explode('/',$_SERVER['PHP_SELF']); array_pop($parts); // remove config.php array_pop($parts); // remove setup diff --git a/setup/inc/class.setup_translation.inc.php b/setup/inc/class.setup_translation.inc.php index 15a6755356..6eff5f1e6c 100644 --- a/setup/inc/class.setup_translation.inc.php +++ b/setup/inc/class.setup_translation.inc.php @@ -1,27 +1,15 @@ * - * and Dan Kuykendall * - * Handles multi-language support using flat files * - * -------------------------------------------------------------------------* - * This library is part of the eGroupWare API * - * http://www.egroupware.org/api * - * ------------------------------------------------------------------------ * - * This library is free software; you can redistribute it and/or modify it * - * under the terms of the GNU Lesser General Public License as published by * - * the Free Software Foundation; either version 2.1 of the License, * - * or any later version. * - * This library is distributed in the hope that it will be useful, but * - * WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License * - * along with this library; if not, write to the Free Software Foundation, * - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - \**************************************************************************/ - - /* $Id$ */ +/** + * Setup + * + * @link http://www.egroupware.org + * @package setup + * @author Dan Kuykendall + * @author Miles Lott + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ if (!defined('MAX_MESSAGE_ID_LENGTH')) { @@ -31,6 +19,8 @@ class setup_translation { var $langarray = array(); + + var $no_translation_marker = '*'; /** * constructor for the class, loads all phrases into langarray @@ -81,7 +71,7 @@ */ function translate($key, $vars=False) { - $ret = $key.'*'; + $ret = $key . $this->no_translation_marker; $key = strtolower(trim($key)); if (isset($this->langarray[$key])) { @@ -99,7 +89,7 @@ { foreach($vars as $n => $var) { - $ret = preg_replace( '/%'.($n+1).'/', $var, $ret ); + $ret = str_replace( '%'.($n+1), $var, $ret ); } } return $ret; diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index c83496f174..896efdfa37 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -1,20 +1,17 @@ * - * and Dan Kuykendall * - * and Mark Peters * - * and Miles Lott * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ +/** + * Setup + * + * @link http://www.egroupware.org + * @package setup + * @author Joseph Engo + * @author Dan Kuykendall + * @author Mark Peters + * @author Miles Lott + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ error_reporting(error_reporting() & ~E_NOTICE); @@ -63,7 +60,7 @@ $msg = lang('does not exist'); return false; } - if (!@is_writeable($dir)) + if (!@is_writeable($dir) && $_SERVER['HTTP_HOST']) // only do the check if we run by the webserver { $msg = lang('is not writeable by the webserver'); return false; diff --git a/setup/index.php b/setup/index.php index 7ddb04c76e..8c2bbefebb 100644 --- a/setup/index.php +++ b/setup/index.php @@ -1,14 +1,14 @@ + * @author Ralf Becker + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ $GLOBALS['DEBUG'] = False; $GLOBALS['egw_info'] = array( @@ -157,11 +157,12 @@ $setup_tpl->set_var('subaction',@$subaction); // Old PHP - if (!function_exists('version_compare'))//version_compare() is only available in PHP4.1+ + if ((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) { $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['header_msg'],True); $GLOBALS['egw_setup']->html->show_alert_msg('Error', - lang('You appear to be running an old version of PHP
It its recommend that you upgrade to a new version.
Older version of PHP might not run eGroupWare correctly, if at all.

Please upgrade to at least version %1','4.1')); + lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.', + PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,$GLOBALS['egw_setup']->recommended_php_version)); $GLOBALS['egw_setup']->html->show_footer(); exit; } @@ -178,8 +179,8 @@ $setup_tpl->set_var('db_step_text',lang('Step %1 - Simple Application Management',1)); $setup_tpl->set_var('lang_system_charset',lang('charset to use (use utf-8 if you plan to use languages with different charsets):')); - $setup_tpl->set_var('system_charset',str_replace('&','&',$GLOBALS['egw_setup']->translation->get_charsets('system_charset', - $GLOBALS['egw_setup']->system_charset))); + $setup_tpl->set_var('system_charset',str_replace('&','&', + $GLOBALS['egw_setup']->translation->get_charsets('system_charset',$GLOBALS['egw_setup']->system_charset))); switch($GLOBALS['egw_info']['setup']['stage']['db']) { @@ -307,7 +308,7 @@ // use uploaded backup, instead installing from scratch if ($_POST['upload']) { - $db_backup = CreateObject('phpgwapi.db_backup'); + $db_backup =& CreateObject('phpgwapi.db_backup'); if (is_array($_FILES['uploaded']) && !$_FILES['uploaded']['error'] && is_uploaded_file($_FILES['uploaded']['tmp_name'])) { @@ -410,7 +411,7 @@ $setup_tpl->set_var('config_status_alt',lang('not completed')); switch($GLOBALS['egw_info']['setup']['stage']['config']) { - case 1: + case 1: // AFAIK this dont happen any more, as we have setup_process::save_minimal_config() now -- RalfBecker $btn_config_now = $GLOBALS['egw_setup']->html->make_frm_btn_simple( lang('Please configure eGroupWare for your environment'), 'post','config.php', @@ -420,48 +421,13 @@ $setup_tpl->set_var('ldap_table_data',' '); break; case 10: - $GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_name,config_value',array('config_app' => 'phpgwapi'),__LINE__,__FILE__); - while($GLOBALS['egw_setup']->db->next_record()) + $setup_tpl->set_var('config_status_img',$completed); + $setup_tpl->set_var('config_status_alt',lang('completed')); + $config_msg = lang('Configuration completed'); + case 2: + if ($GLOBALS['egw_info']['setup']['config_errors']) { - $config[$GLOBALS['egw_setup']->db->f(0)] = $GLOBALS['egw_setup']->db->f(1); - } - $config_msg = ''; - if (!check_dir($config['temp_dir'],$error_msg)) - { - $config_msg = lang("Your temporary directory '%1' %2",$config['temp_dir'],$error_msg); - } - if ($config['file_repository'] == 'sql' && $config['file_store_contents'] == 'filesystem' && !check_dir($config['files_dir'],$error_msg,true)) - { - $config_msg .= ($config_msg?"
\n":'').lang("Your files directory '%1' %2",$config['files_dir'],$error_msg); - } - // set and create the default backup_dir - if (@is_writeable($config['files_dir']) && !$config['backup_dir'] && $config['file_store_contents'] == 'filesystem') - { - $config['backup_dir'] = $config['files_dir'].'/db_backup'; - if (!is_dir($config['backup_dir']) && mkdir($config['backup_dir'])) - { - $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( - 'config_value' => $config['backup_dir'], - ),array( - 'config_app' => 'phpgwapi', - 'config_name' => 'backup_dir', - ),__LINE__,__FILE__); - } - } - if (!check_dir($config['backup_dir'],$error_msg,true)) - { - $no_backup_dir = lang("Your backup directory '%1' %2",$config['backup_dir'],$error_msg); - $config_msg .= ($config_msg?"
\n":'').$no_backup_dir; - } - if (!$config['mail_server'] || !$config['mail_server_type'] || !$config['smtp_server']) - { - $config_msg .= ($config_msg?"
\n":'').lang('Missing or uncomplete mailserver configuration'); - } - if (!$config_msg) - { - $setup_tpl->set_var('config_status_img',$completed); - $setup_tpl->set_var('config_status_alt',lang('completed')); - $config_msg = lang('Configuration completed'); + $config_msg = implode('
',$GLOBALS['egw_info']['setup']['config_errors']); } $btn_edit_config = $GLOBALS['egw_setup']->html->make_frm_btn_simple( $config_msg, diff --git a/setup/manageheader.php b/setup/manageheader.php index 3a2d89295e..b37f173e22 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -1,18 +1,14 @@ + * @author Miles Lott + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ $GLOBALS['egw_info'] = array( 'flags' => array( @@ -27,12 +23,6 @@ include('./inc/functions.inc.php'); require_once('./inc/class.setup_header.inc.php'); $GLOBALS['egw_setup']->header =& new setup_header(); -/* necessary ? -$GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header']; -$GLOBALS['egw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version']; -unset($setup_info); -*/ - $setup_tpl = CreateObject('setup.Template','./templates/default'); $setup_tpl->set_file(array( 'T_head' => 'head.tpl', @@ -233,12 +223,22 @@ function show_header_form($validation_errors) $setup_tpl->set_var('pagemsg',$GLOBALS['egw_info']['setup']['PageMSG']); - // checking required PHP version 4.3+ - if((float) PHP_VERSION < '4.3') + // checking required PHP version + if ((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) { - echo '

' - . lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.',PHP_VERSION,'4.3','5'). "\n" - . '

'; + $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['header_msg'],True); + $GLOBALS['egw_setup']->html->show_alert_msg('Error', + lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.', + PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,$GLOBALS['egw_setup']->recommended_php_version)); + $GLOBALS['egw_setup']->html->show_footer(); + exit; + } + if((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) + { + echo '

' . + lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.', + PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,$GLOBALS['egw_setup']->recommended_php_version) . + "

\n"; $GLOBALS['egw_setup']->html->show_footer(); exit; } diff --git a/setup/setup-cli.php b/setup/setup-cli.php index 4f487ebf38..3fc438a2f8 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -1,28 +1,17 @@ #!/usr/bin/php * -* ------------------------------------------------------------------------ * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 2 of the License, or (at your * -* option) any later version. * -\**************************************************************************/ - -/* $Id: class.socontacts_sql.inc.php 21634 2006-05-24 02:28:57Z ralfbecker $ */ - /** - * Command line interface for setup + * Setup - Command line interface * - * @package addressbook + * @link http://www.egroupware.org + * @package setup * @author Ralf Becker * @copyright (c) 2006 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ */ -chdir(dirname(__FILE__)); // to enable our relative pathes to work, if we are called with a path +chdir(dirname(__FILE__)); // to enable our relative pathes to work if ($_SERVER['argc'] > 1) { @@ -35,178 +24,491 @@ else $action = '--version'; } -if ((float) PHP_VERSION < '4.3') +// setting the language from the enviroment +$_POST['ConfigLang'] = get_lang(); +create_http_enviroment(); // guessing the docroot etc. + +// setting up the $GLOBALS['egw_setup'] object AND including the header.inc.php if it exists +$GLOBALS['egw_info'] = array( + 'flags' => array( + 'currentapp' => 'home', + 'noapi' => true, +)); +include('inc/functions.inc.php'); +$GLOBALS['egw_setup']->translation->no_translation_marker = ''; + +if ((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) { - fail(98,lang2('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.',PHP_VERSION,'4.3','5+')); + fail(98,lang('You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3.',PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,$GLOBALS['egw_setup']->recommended_php_version)); } switch($action) { - case '--show-languages': - case '--show-lang': - echo html_entity_decode(file_get_contents('lang/languages'),ENT_COMPAT,'utf-8'); - break; - case '--version': case '--check': - do_check(); + do_check($arguments[0]); break; case '--create-header': case '--edit-header': - case '--update-header': + case '--upgrade-header': do_header($action == '--create-header',$arguments); break; + case '--install': + do_install($arguments[0]); + break; + + case '--config': + do_config($arguments); + break; + + case '--admin': + do_admin($arguments[0]); + break; + + case '--language': + do_lang($arguments[0]); + break; + + case '--update': + do_update($arguments[0]); + break; + + case '--backup': + do_backup($arguments[0]); + break; + + case '--languages': + echo html_entity_decode(file_get_contents('lang/languages'),ENT_COMPAT,'utf-8'); + break; + + case '--charsets': + echo html_entity_decode(implode("\n",$GLOBALS['egw_setup']->translation->get_charsets(false)),ENT_COMPAT,'utf-8')."\n"; + break; + case '--exit-codes': list_exit_codes(); break; - default: - fail(20,lang2("Unknows option '%1' !!!",$action)); - case '--help': case '--usage': do_usage(); break; + + default: + fail(90,lang("Unknows option '%1' !!!",$action)); } exit(0); /** - * Dummy translation function, if we ever want to translate the command line interface + * Configure eGroupWare * - * @param string $message the message with %# replacements - * @param string $arg variable number of arguments - * @return string + * @param array $args domain(default),[config user(admin)],password,[,name=value,...] --files-dir --backup-dir --mailserver */ -function lang2($message,$arg=null) +function do_config($args) { - $args = func_get_args(); - array_shift($args); + $options = _check_auth_config(array_shift($args),15); - return str_replace(array('%1','%2','%3','%4','%5'),$args,$message); -} - -/** - * Echos usage message - */ -function do_usage() -{ - echo lang2('Usage: %1 {--version|--create-header|--edit-header|--install|--update} [additional options]',basename($_SERVER['argv'][0]))."\n\n"; - - echo '--install '.lang2('[comma-separated languages(en)],[charset(default depending on languages default)],[backup to install]')."\n"; - echo '--show-languages '.lang2('get a list of availible languages')."\n"; - echo '--update '.lang2('run a database schema update (if necessary)')."\n"; - echo '--check '.lang2('checks eGroupWare\'s installed, it\'s versions and necessary upgrads (exits 0: eGW is up to date, 1: no header.inc.php exists, 2: header update necessary, 3: database schema update necessary)')."\n"; - echo '--exit-codes '.lang2('list all exist codes of the command line interface, 0 means Ok')."\n"; - - echo "\n".lang2('Create or edit the eGroupWare configuration file: header.inc.php:')."\n"; - echo '--create-header '.lang2('header-password[,header-user(admin)]')."\n"; - echo '--edit-header '.lang2('[header-password],[header-user],[new-password],[new-user]')."\n"; - - echo "\n".lang2('Additional options and there defaults (int brackets)')."\n"; - echo '--server-root '.lang2('path of eGroupWare install directory (default auto-detected)')."\n"; - echo '--session-type '.lang2('{db|php(default)|php-restore}')."\n"; - echo '--limit-access '.lang2('comma separated ip-addresses or host-names, default access to setup from everywhere')."\n"; - echo '--mcrypt '.lang2('use mcrypt to crypt session-data: {off(default)|on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version(default empty = recent)]')."\n"; - echo '--db-persistent '.lang2('use persistent db connections: {on(default)|off}')."\n"; - echo '--domain-selectbox '.lang2('{off(default)|on}')."\n"; - - echo "\n".lang2('Adding, editing or deleting an eGroupWare domain / database instance:')."\n"; - echo '--domain '.lang2('add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)]')."\n"; - echo '--delete-domain '.lang2('domain-name')."\n"; -} - -/** - * detect eGW versions - * - * @return array array with versions (keys phpgwapi, current_header and header) - */ -function detect_versions() -{ - $versions = null; - $GLOBALS['egw_info']['flags']['noapi'] = true; - if (!@include('../header.inc.php')) + $values = array(); + foreach($options as $option) { - if (!@include('../phpgwapi/setup/setup.inc.php')) - { - fail(99,lang2("eGroupWare sources in '%1' are not complete, file '%2' missing !!!",realpath('..'),'phpgwapi/setup/setup.inc.php')); // should not happen ;-) - } - return array( - 'phpgwapi' => $setup_info['phpgwapi']['version'], - 'current_header' => $setup_info['phpgwapi']['versions']['current_header'], - ); + list($name,$value) = explode('=',$option,2); + $values[$name] = $value; } - return $GLOBALS['egw_info']['server']['versions']; + static $config = array( + '--files-dir' => 'files_dir', + '--backup-dir' => 'backup_dir', + '--temp-dir' => 'temp_dir', + '--webserver-url' => 'webserver_url', + '--mailserver' => array( //server,{IMAP|IMAPS|POP|POPS},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}] + 'mail_server', + array('name' => 'mail_server_type','allowed' => array('imap','imaps','pop3','pop3s')), + 'mail_suffix', + array('name' => 'mail_login_type','allowed' => array('standard','vmailmgr')), + ), + '--smtpserver' => array( //smtp server,[smtp port],[smtp user],[smtp password] + 'smtp_server','smtp_port','smtp_auth_user','smtp_auth_passwd'), + ); + while (($arg = array_shift($args))) + { + if (!isset($config[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg)); + + foreach(explode(',',array_shift($args)) as $n => $value) + { + if ($value === '') continue; + + $name = $config[$arg][$n]; + if (is_array($name)) + { + if (!in_array($value,$name['allowed'])) fail(91,"'%1' is not allowed as %2. arguments of option %3 !!!",$value,1+$n,$arg); + $name = $name['name']; + } + $values[$name] = $value; + } + } + foreach($values as $name => $value) + { + $GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->config_table,array( + 'config_value' => $value, + ),array( + 'config_app' => 'phpgwapi', + 'config_name' => $name, + ),__LINE__,__FILE__); + } +} + +/** + * Create an admin account + * + * @param string $arg domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] + */ +function do_admin($arg) +{ + list($_POST['username'],$_POST['passwd'],$_POST['fname'],$_POST['lname'],$_POST['email']) = _check_auth_config($arg,15); + $_POST['passwd2'] = $_POST['passwd']; + + if (!$_POST['fname']) $_POST['fname'] = 'Admin'; + if (!$_POST['lname']) $_POST['lname'] = 'User'; + + $_POST['submit'] = true; + ob_start(); + include('admin_account.php'); + $error = ob_get_contents(); + ob_end_clean(); + + if ($error) + { + fail(41,lang('Error in admin-creation !!!')); + } + echo lang('Admin account successful created.')."\n"; +} + +/** + * Backup one or all domains + * + * @param string $arg domain(all),[config user(admin)],password,[backup-file, 'no' for no backup or empty for default name] + * @param boolean $quite_check quiten the call to _check_auth_config + */ +function do_backup($arg,$quite_check=false) +{ + list($domain,,,$backup) = $options = explode(',',$arg); + + $domains = $GLOBALS['egw_domain']; + if ($domain && $domain != 'all') + { + $domains = array($domain => $GLOBALS['egw_domain'][$domain]); + } + foreach($domains as $domain => $data) + { + $options[0] = $domain; + + if ($quite_check) ob_start(); + _check_auth_config(implode(',',$options),14); + if ($quite_check) ob_end_clean(); + + if ($backup == 'no') + { + echo lang('Backup skipped!')."\n"; + } + else + { + $db_backup =& CreateObject('phpgwapi.db_backup'); + if (is_resource($f = $db_backup->fopen_backup($backup))) + { + echo lang('backup started, this might take a view minutes ...')."\n"; + $db_backup->backup($f); + fclose($f); + echo lang('backup finished')."\n"; + } + else // backup failed ==> dont start the upgrade + { + fail(50,lang('Backup failed').': '.$f); + } + } + } +} + +/** + * Update one or all domains + * + * @param string $arg domain(all),[config user(admin)],password,[backup-file, 'no' for no backup or empty for default name] + */ +function do_update($arg) +{ + global $setup_info; + + list($domain,,,$no_backup) = $options = explode(',',$arg); + + $domains = $GLOBALS['egw_domain']; + if ($domain && $domain != 'all') + { + $domains = array($domain => $GLOBALS['egw_domain'][$domain]); + } + foreach($domains as $domain => $data) + { + $options[0] = $domain; + $arg = implode(',',$options); + + _check_auth_config($arg,14); + + if ($GLOBALS['egw_info']['setup']['stage']['db'] != 4) + { + echo lang('No update necessary, domain %1(%2) is up to date.',$domain,$data['db_type'])."\n"; + } + else + { + echo lang('Starting update ...')."\n"; + + do_backup($arg,true); + + ob_start(); + $GLOBALS['egw_setup']->process->pass($setup_info,'upgrade',false); + $messages = ob_get_contents(); + ob_end_clean(); + if ($messages) strip_tags($messages)."\n"; + + echo lang('Update finished.')."\n"; + } + } +} + +/** + * Install / update languages + * + * @param string $arg domain(all),[config user(admin)],password,[+][lang1][,lang2,...] + */ +function do_lang($arg) +{ + global $setup_info; + + list($domain,,,$no_backup) = $options = explode(',',$arg); + + $domains = $GLOBALS['egw_domain']; + if ($domain && $domain != 'all') + { + $domains = array($domain => $GLOBALS['egw_domain'][$domain]); + } + foreach($domains as $domain => $data) + { + $options[0] = $domain; + $arg = implode(',',$options); + + $langs = _check_auth_config($arg,15); + + $GLOBALS['egw_setup']->translation->setup_translation_sql(); + + if ($langs[0]{0} === '+' || !count($langs)) // update / add to existing languages + { + if ($langs[0]{0} === '+') + { + if ($langs[0] === '+') + { + array_shift($langs); + } + else + { + $langs[0] = substr($langs[0],1); + } + } + $installed_langs = $GLOBALS['egw_setup']->translation->sql->get_installed_langs(true); + if (is_array($installed_langs)) + { + $langs = array_merge($langs,array_keys($installed_langs)); + } + } + $langs = array_unique($langs); + echo lang('Start updating languages %1 ...',implode(',',$langs))."\n"; + $GLOBALS['egw_setup']->translation->sql->install_langs($langs); + echo lang('languages updated.')."\n"; + } +} + +/** + * Check if eGW is installed according to $stop and we have the necessary authorization for config + * + * We allow the config user/pw of the domain or the header admin user/pw! + * + * @param string $arg [domain(default)],[user(admin)],password + * @param int $stop see do_check() + * @return array with unprocessed arguments from $arg + */ +function _check_auth_config($arg,$stop=15) +{ + $options = explode(',',$arg); + if (!($domain = array_shift($options))) $domain = 'default'; + if (!($user = array_shift($options))) $user = 'admin'; + $password = array_shift($options); + + do_check($domain,$stop); // check if eGW is installed + + //echo "check_auth('$user','$password','{$GLOBALS['egw_domain'][$domain]['config_user']}','{$GLOBALS['egw_domain'][$domain]['config_passwd']}')\n"; + if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['config_user'], + $GLOBALS['egw_domain'][$domain]['config_passwd'])) + { + fail(40,lang("Access denied: wrong username or password to configure the domain '%1(%2)' !!!",$domain,$GLOBALS['egw_domain'][$domain]['db_type'])); + } + return $options; +} + +/** + * Install eGroupWare + * + * @param string $args domain,[backup-file],[charset] + */ +function do_install($args) +{ + global $setup_info; + + list($domain,$backup,$charset) = explode(',',$args); + if (!$domain) $domain = 'default'; + + if (!do_check($domain,13)) // check and fail if we have no working db + { + fail(30,lang('eGroupWare is already installed!')); + } + // use uploaded backup, instead installing from scratch + if ($backup) + { + $db_backup =& CreateObject('phpgwapi.db_backup'); + + if (!is_resource($f = $db_backup->fopen_backup($backup,true))) + { + fail(31,lang('Restore failed')); + } + echo lang('Restore started, this might take a view minutes ...')."\n"; + $db_backup->restore($f,$charset); + fclose($f); + echo lang('Restore finished')."\n"; + } + else + { + if (!$charset) $charset = $GLOBALS['egw_setup']->translation->langarray['charset']; + + $setup_info = $GLOBALS['egw_setup']->detection->upgrade_exclude($setup_info); + + // Set the DB's client charset if a system-charset is set + $GLOBALS['egw_setup']->system_charset = strtolower($charset); + $GLOBALS['egw_setup']->db->Link_ID->SetCharSet($charset); + + echo lang('Installation started, this might take a view minutes ...')."\n"; + $setup_info = $GLOBALS['egw_setup']->process->pass($setup_info,'new',false,True); + echo lang('Installation finished')."\n"; + } } /** * Check if eGW is installed, which versions and if an update is needed + * + * @param string $domain='' domain to check, default '' = all + * @param int $stop=0 stop checks before given exit-code, defaul 0 = all checks */ -function do_check() +function do_check($domain='',$stop=0) { - $versions = detect_versions(); - echo lang2('eGroupWare API version %1 found.',$versions['phpgwapi'])."\n"; + global $setup_info; + static $header_checks=true; // output the header checks only once - if (isset($versions['header'])) // header.inc.php exists + $versions =& $GLOBALS['egw_info']['server']['versions']; + + if (!$versions['phpgwapi']) { - echo lang2("eGroupWare configuration file (header.inc.php) version %1 exists%2",$versions['header'], - ($versions['header'] == $versions['current_header'] ? ' '.lang2('and is up to date') : '')).".\n"; - - if ($versions['header'] != $versions['current_header']) + if (!include('../phpgwapi/setup/setup.inc.php')) { - // exit-code 2: header.inc.php needs upgrading - fail(2,lang2('You need to upgrade your header to the new version %1 (using --edit-header)!',$versions['current_header'])); + fail(99,lang("eGroupWare sources in '%1' are not complete, file '%2' missing !!!",realpath('..'),'phpgwapi/setup/setup.inc.php')); // should not happen ;-) + } + $versions['phpgwapi'] = $setup_info['phpgwapi']['version']; + unset($setup_info); + } + if ($header_checks) + { + echo lang('eGroupWare API version %1 found.',$versions['phpgwapi'])."\n"; + } + $header_stage = $GLOBALS['egw_setup']->detection->check_header(); + if ($stop && $header_stage == $stop) return true; + + switch ($header_stage) + { + case 1: fail(1,lang('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang('Use --create-header to create the configuration file (--usage gives more options).')); + + case 2: fail(2,lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('No header admin password set! Use --edit-header [,] to set one (--usage gives more options).')); + + case 3: fail(3,lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('No eGroupWare domains / database instances exist! Use --edit-header --domain to add one (--usage gives more options).')); + + case 4: fail(4,lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('It needs upgrading to version %1! Use --update-header [,] to do so (--usage gives more options).',$versions['current_header'])); + } + if ($header_checks) + { + echo lang('eGroupWare configuration file (header.inc.php) version %1 exists%2', + $versions['header'],' '.lang('and is up to date')).".\n"; + } + $header_checks = false; // no further output of the header checks + + $domains = $GLOBALS['egw_domain']; + if ($domain) // domain to check given + { + if (!isset($GLOBALS['egw_domain'][$domain])) fail(92,lang("Domain '%1' does NOT exist !!!",$domain)); + + $domains = array($domain => $GLOBALS['egw_domain'][$domain]); + } + foreach($domains as $domain => $data) + { + $GLOBALS['egw_setup']->ConfigDomain = $domain; // set the domain the setup class operates on + if (count($GLOBALS['egw_domain']) > 1) echo "\n".lang('eGroupWare domain/instance %1(%2):',$domain,$data['db_type'])."\n"; + + $setup_info = $GLOBALS['egw_setup']->detection->get_versions(); + // check if there's already a db-connection and close if, otherwise the db-connection of the previous domain will be used + if (is_object($GLOBALS['egw_setup']->db)) + { + $GLOBALS['egw_setup']->db->disconnect(); + } + $GLOBALS['egw_setup']->loaddb(); + + $db = $data['db_type'].'://'.$data['db_user'].'@'.$data['db_host'].'/'.$data['db_name']; + + $db_stage =& $GLOBALS['egw_info']['setup']['stage']['db']; + if (($db_stage = $GLOBALS['egw_setup']->detection->check_db($setup_info)) != 1) + { + $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info); + $db_stage = $GLOBALS['egw_setup']->detection->check_db($setup_info); + } + if ($stop && 10+$db_stage == $stop) return true; + + switch($db_stage) + { + case 1: fail(11,lang('Your Database is not working!')." $db: ".$GLOBALS['egw_setup']->db->Error); + + case 3: fail(13,lang('Your database is working, ibut you dont have any applications installed')." ($db). ".lang("Use --install to install eGroupWare.")); + + case 4: fail(14,lang('eGroupWare API needs a database (schema) update from version %1 to %2!',$setup_info['phpgwapi']['currentver'],$versions['phpgwapi']).' '.lang('Use --update to do so.')); + + case 10: // also check apps of updates + $apps_to_upgrade = array(); + foreach($setup_info as $app => $data) + { + if ($data['currentver'] && $data['version'] && $data['version'] != $data['currentver']) + { + $apps_to_upgrade[] = $app; + } + } + if ($apps_to_upgrade) + { + $db_stage = 4; + if ($stop && 10+$db_stage == $stop) return true; + fail(14,lang('The following applications need to be upgraded:').' '.implode(', ',$apps_to_upgrade).'! '.lang('Use --update to do so.')); + } + break; + } + echo lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver'])."\n"; + + $GLOBALS['egw_setup']->detection->check_config(); + if ($GLOBALS['egw_info']['setup']['config_errors'] && $stop != 15) + { + fail(15,lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors'])); } } - else - { - // exit-code 1: no header.inc.php - $this->check_fail_header_exists(); - } - // ToDo: check if eGW needs a schema upgrade and exit(3) if so + return false; } -function fail($exit_code,$message) -{ - echo $message."\n"; - exit($exit_code); -} - -/** - * List all exit codes used by the command line interface - * - */ -function list_exit_codes() -{ - error_reporting(error_reporting() & ~E_NOTICE); - - $codes = array(); - foreach(file(__FILE__) as $line) - { - if (preg_match('/fail\(([0-9]+),(.*)\);/',$line,$matches)) - { - eval('$codes['.$matches[1].'] = '.$matches[2].';'); - } - } - ksort($codes,SORT_NUMERIC); - foreach($codes as $num => $msg) - { - echo $num."\t".str_replace("\n","\n\t",$msg)."\n"; - } -} - -/** - * Check if we have a header.inc.php and fail with exit(10) if not - * - */ -function check_fail_header_exists() -{ - if (!file_exists('../header.inc.php')) - { - fail(1,lang2('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang2('Use --create-header to create the configuration file (--usage gives more options).')); - } -} /** * Create, edit or update the header.inc.php * @@ -216,38 +518,32 @@ function check_fail_header_exists() */ function do_header($create,&$arguments) { - // setting up the $GLOBALS['egw_setup'] object AND including the header.inc.php if it exists - $GLOBALS['egw_info'] = array( - 'flags' => array( - 'currentapp' => 'home', - 'noapi' => true, - )); - include('inc/functions.inc.php'); - require_once('inc/class.setup_header.inc.php'); $GLOBALS['egw_setup']->header =& new setup_header(); if (!file_exists('../header.inc.php')) { - if (!$create) $this->check_fail_header_exists(); + if (!$create) fail(1,lang('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang('Use --create-header to create the configuration file (--usage gives more options).')); $GLOBALS['egw_setup']->header->defaults(false); } else { - if ($create) fail(11,lang2('eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first!')); + if ($create) fail(20,lang('eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first!')); // header.inc.php is already include by include('inc/functions.inc.php')! unset($GLOBALS['egw_info']['flags']); - // check header-admin-user and -password - @list($password,$user) = explode(',',@$arguments[0]); - if (!$user) $user = 'admin'; - require_once('inc/class.setup.inc.php'); - if (!setup::check_auth($user,$password,$GLOBALS['egw_info']['server']['header_admin_user'], - $GLOBALS['egw_info']['server']['header_admin_password'])) + // check header-admin-user and -password (only if a password is set!) + if ($GLOBALS['egw_info']['server']['header_admin_password']) { - fail(12,lang2('Access denied: wrong username or password for manage-header !!!')); + @list($password,$user) = explode(',',@$arguments[0]); + if (!$user) $user = 'admin'; + if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_info']['server']['header_admin_user'], + $GLOBALS['egw_info']['server']['header_admin_password'])) + { + fail(21,lang('Access denied: wrong username or password for manage-header !!!')); + } } $GLOBALS['egw_info']['server']['server_root'] = EGW_SERVER_ROOT; $GLOBALS['egw_info']['server']['include_root'] = EGW_INCLUDE_ROOT; @@ -314,12 +610,12 @@ function do_header($create,&$arguments) if ($arg == '--delete-domain') { - if (!isset($GLOBALS['egw_domain'][$values])) fail(22,lang2("Domain '%1' does NOT exist !!!",$values)); + if (!isset($GLOBALS['egw_domain'][$values])) fail(92,lang("Domain '%1' does NOT exist !!!",$values)); unset($GLOBALS['egw_domain'][$values]); continue; } - if (!isset($options[$arg])) fail(20,lang2("Unknow option '%1' !!!",$arg)); + if (!isset($options[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg)); $option = $options[$arg]; $values = !is_array($option) ? array($values) : explode(',',$values); @@ -337,7 +633,7 @@ function do_header($create,&$arguments) { if (!isset($data['allowed'][$value])) { - fail(21,lang2("'%1' is not allowed as %2. arguments of option %3 !!!",$value,1+$n,$arg)); + fail(91,lang("'%1' is not allowed as %2. arguments of option %3 !!!",$value,1+$n,$arg)); } $value = $data['allowed'][$value]; } @@ -351,10 +647,10 @@ function do_header($create,&$arguments) } elseif ($value !== '') { - set_value($GLOBALS,str_replace('@',$remember,$type),$name,$value); + _set_value($GLOBALS,str_replace('@',$remember,$type),$name,$value); if ($name == 'egw_info/server/server_root') { - set_value($GLOBALS,'egw_info/server/include_root',$name,$value); + _set_value($GLOBALS,'egw_info/server/include_root',$name,$value); } } ++$n; @@ -364,8 +660,8 @@ function do_header($create,&$arguments) { echo '$GLOBALS[egw_info] = '; print_r($GLOBALS['egw_info']); echo '$GLOBALS[egw_domain] = '; print_r($GLOBALS['egw_domain']); - echo "\n".lang2('Configuration errors:')."\n- ".implode("\n- ",$errors)."\n"; - fail(23,lang2("You need to fix the above errors, before the configuration file header.inc.php can be written!")); + echo "\n".lang('Configuration errors:')."\n- ".implode("\n- ",$errors)."\n"; + fail(23,lang("You need to fix the above errors, before the configuration file header.inc.php can be written!")); } $header = $GLOBALS['egw_setup']->header->generate($GLOBALS['egw_info'],$GLOBALS['egw_domain'], $GLOBALS['egw_info']['server']['server_root'],$GLOBALS['egw_info']['server']['include_root']); @@ -378,14 +674,22 @@ function do_header($create,&$arguments) if (($f = fopen('../header.inc.php','wb')) && fwrite($f,$header)) { fclose($f); - echo "\n".lang2('header.inc.php successful written.')."\n\n"; + echo "\n".lang('header.inc.php successful written.')."\n\n"; exit(0); } } - fail(24,lang2("Failed writing configuration file header.inc.php, check the permissions !!!")); + fail(24,lang("Failed writing configuration file header.inc.php, check the permissions !!!")); } -function set_value($arr,$index,$name,$value) +/** + * Set a value in the given array $arr with (multidimensional) key $index[/$name] + * + * @param array &$arr + * @param string $index multidimensional index written with / as separator, eg. egw_info/server/ + * @param string $name additional index to use if $index end with a slash + * @param mixed $value value to set + */ +function _set_value(&$arr,$index,$name,$value) { if (substr($index,-1) == '/') $index .= $name; @@ -397,23 +701,117 @@ function set_value($arr,$index,$name,$value) $var = strstr($name,'passw') ? md5($value) : $value; } -if (!function_exists('generate_mcyrpt_iv')) +/** + * Reads the users language from the enviroment + * + * @return string 2 or 5 digit language code used in eGW + */ +function get_lang() { - function generate_mcyrpt_iv() + list($lang,$nation,$charset) = split("[_.]",$_SERVER['LANG']); + $nation = strtolower($nation); + + foreach(file('lang/languages') as $line) { - srand((double)microtime()*1000000); - $random_char = array( - '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', - 'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L', - 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' - ); + list($code,$language) = explode("\t",$line); + $languages[$code] = $language; + } + if (isset($languages[$lang.'-'.$nation])) return $lang.'-'.$nation; - $iv = ''; - for($i=0; $i<30; $i++) + if (isset($languages[$lang])) return $lang; + + return 'en'; +} + +/** + * Try guessing the document root of the webserver, should work for RH, SuSE, debian and plesk + */ +function create_http_enviroment() +{ + $_SERVER['SCRIPT_FILENAME'] = __FILE__; + + foreach(array('httpsdocs','httpdocs','htdocs','html','www') as $docroottop) + { + $parts = explode($docroottop,__FILE__); + if (count($parts) == 2) { - $iv .= $random_char[rand(1,count($random_char))]; + $_SERVER['DOCUMENT_ROOT'] = $parts[0].$docroottop; + $_SERVER['PHP_SELF'] = str_replace('\\','/',$parts[1]); + break; } - return $iv; + } + //print_r($_SERVER); exit; +} + +/** + * Echos usage message + */ +function do_usage() +{ + echo lang('Usage: %1 {--check|--create-header|--edit-header|--install|--config|--admin|--language|--backup|--update} [additional options]',basename($_SERVER['argv'][0]))."\n\n"; + + echo '--check '.lang('checks eGroupWare\'s installed, it\'s versions and necessary upgrads (return values see --exit-codes)')."\n"; + echo '--install '.lang('domain(default),[backup to install],[charset(default depends on language)]')."\n"; + echo '--config '.lang('domain(default),[config user(admin)],password,[,name=value,...] sets config values beside:')."\n"; + echo ' --files-dir, --backup-dir, --temp-dir '.lang('path to various directories: have to exist and be writeable by the webserver')."\n"; + echo ' --webserver-url '.lang('eg. /egroupware or http://domain.com/egroupware, default: %1',str_replace('/setup/setup-cli.php','',$_SERVER['PHP_SELF']))."\n"; + echo ' --mailserver '.lang('host,{imap|pop3|imaps|pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}]')."\n"; + echo ' --smtpserver '.lang('host,[smtp port],[smtp user],[smtp password]')."\n"; + echo '--admin '.lang('creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email]')."\n"; + echo '--language '.lang('install or update translations: domain(all),[config user(admin)],password,[[+]lang1[,lang2,...]] + adds, no langs update existing ones')."\n"; + echo '--backup '.lang('domain(all),[config user(admin)],password,[file-name(default: backup-dir/db_backup-YYYYMMDDHHii)]')."\n"; + echo '--update '.lang('run a database schema update (if necessary): domain(all),[config user(admin)],password')."\n"; + + echo "\n".lang('Create or edit the eGroupWare configuration file: header.inc.php:')."\n"; + echo '--create-header '.lang('header-password[,header-user(admin)]')."\n"; + echo '--edit-header '.lang('[header-password],[header-user],[new-password],[new-user]')."\n"; + + echo "\n".lang('Additional options and there defaults (int brackets)')."\n"; + echo '--server-root '.lang('path of eGroupWare install directory (default auto-detected)')."\n"; + echo '--session-type '.lang('{db|php(default)|php-restore}')."\n"; + echo '--limit-access '.lang('comma separated ip-addresses or host-names, default access to setup from everywhere')."\n"; + echo '--mcrypt '.lang('use mcrypt to crypt session-data: {off(default)|on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version]')."\n"; + echo '--db-persistent '.lang('use persistent db connections: {on(default)|off}')."\n"; + echo '--domain-selectbox '.lang('{off(default)|on}')."\n"; + + echo "\n".lang('Adding, editing or deleting an eGroupWare domain / database instance:')."\n"; + echo '--domain '.lang('add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)]')."\n"; + echo '--delete-domain '.lang('domain-name')."\n"; + + echo "\n".lang('List availible values:')."\n"; + echo '--languages '.lang('list of availible translations')."\n"; + echo '--charsets '.lang('charsets used by the different languages')."\n"; + echo '--exit-codes '.lang('all exit codes of the command line interface')."\n"; +} + +function fail($exit_code,$message) +{ + echo $message."\n"; + exit($exit_code); +} + +/** + * List all exit codes used by the command line interface + * + * The list is generated by "greping" this file for calls to the fail() function. + * Calls to fail() have to be in one line, to be recogniced! + */ +function list_exit_codes() +{ + error_reporting(error_reporting() & ~E_NOTICE); + + $codes = array('Ok'); + foreach(file(__FILE__) as $n => $line) + { + if (preg_match('/fail\(([0-9]+),(.*)\);/',$line,$matches)) + { + //echo "Line $n: $matches[1]: $matches[2]\n"; + eval('$codes['.$matches[1].'] = '.$matches[2].';'); + } + } + ksort($codes,SORT_NUMERIC); + foreach($codes as $num => $msg) + { + echo $num."\t".str_replace("\n","\n\t",$msg)."\n"; } } diff --git a/setup/templates/default/admin_account.tpl b/setup/templates/default/admin_account.tpl index ab27b79009..4fff9ce55e 100644 --- a/setup/templates/default/admin_account.tpl +++ b/setup/templates/default/admin_account.tpl @@ -28,6 +28,10 @@ {adminlastname} + + {adminemail} + + {adminpassword} From 6a595dc541a316ae917ec8b154f9dbaabb281b2e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 00:23:31 +0000 Subject: [PATCH 024/176] quitened a debug-message --- setup/manageheader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/manageheader.php b/setup/manageheader.php index b37f173e22..69911c55be 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -200,7 +200,7 @@ function check_header_form() //echo "egw_info[server]=
".print_r($GLOBALS['egw_info']['server'],true)."
\n"; //echo "egw_domain=
".print_r($GLOBALS['egw_domain'],true)."
\n"; - if ($validation_errors) echo "validation_errors=
".print_r($validation_errors,true)."
\n"; + //if ($validation_errors) echo "validation_errors=
".print_r($validation_errors,true)."
\n"; return $validation_errors; } From b868fa4be7178a03c4f1d88e8ba22d2ff781c2e0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 00:27:15 +0000 Subject: [PATCH 025/176] some more setup-cli stuff: - install needs a password now - translations for en & de - password can entered via command-line or env.variable - installing a backup should work now --- setup/lang/phpgw_de.lang | 83 ++++++++++++++++++++++++++++---- setup/lang/phpgw_en.lang | 67 ++++++++++++++++++++++++++ setup/setup-cli.php | 100 ++++++++++++++++++++++++--------------- 3 files changed, 205 insertions(+), 45 deletions(-) diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 3dab22a500..8751e47d3c 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -2,6 +2,7 @@ %1 does not exist !!! setup de %1 existiert nicht!!! %1 is %2%3 !!! setup de %1 ist %2%3!!! %1, %2 or %3 the configuration file. setup de %1, %2 oder %3 der Konfigurationsdatei. +'%1' is not allowed as %2. arguments of option %3 !!! setup de '%1' ist nicht erlaubt als %2. Parameter für die Option %3 !!! (searching accounts and changing passwords) setup de Benutzerkonten suchen und Passwörter ändern) *** do not update your database via setup, as the update might be interrupted by the max_execution_time, which leaves your db in an unrecoverable state (your data is lost) !!! setup de *** Updaten Sie NICHT Ihre Datenbank via Setup, da das Update von der max_execution_time (max. Ausführungszeit für Skripte) unterbrochen werden kann. Ihre Datenbank ist dann in einem nicht mehr wiederherstellbaren Zustand (Ihre Daten sind VERLOREN)!!! *** you have to do the changes manualy in your php.ini (usualy in /etc on linux) in order to get egw fully working !!! setup de *** Sie müssen die Änderungen manuell in Ihrer php.ini Datei (üblicherweise in /etc unter Linux) durchführen, um eGroupWare vollständig/fehlerfrei ausführen zu können!!! @@ -10,23 +11,32 @@ 80 (http) setup de 80 (http) charset to use (use utf-8 if you plan to use languages with different charsets): setup de Zeichensatz (benutzen sie utf-8 wenn sie planen Sprachen mit verschiedenen Zeichensätzen zu verwenden) this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup de Dies wird 1 Admin- und 3 Demo-Benutzerkonten anlegen.
Die Benutzernamen/Passwörter sind: demo/guest, demo2/guest und demo3/guest. +[header-password],[header-user],[new-password],[new-user] setup de [Header-Passwort],[Header-Benutzer],[neues-Passwort],[neuer-Benutzer] +access denied: wrong username or password for manage-header !!! setup de Zugriff verweigert: Falsche Benutzername oder Passwort für die Headerverwaltung !!! +access denied: wrong username or password to configure the domain '%1(%2)' !!! setup de Zugriff verweigert: Falsche Benutzername oder Passwort für Konfiguration der Domain '%1(%2)' !!! accounts existing setup de Benutzerkonten existieren actions setup de Aktionen activate safe password check setup de Aktiviere die "sichere Passwort" Überprüfung add auto-created users to this group ('default' will be attempted if this is empty.) setup de Automatisch erzeugte Benutzer zu dieser Grupper hinzufügen ("Default" wird versucht wenn nichts angegeben.) add new database instance (egw domain) setup de Neue Datenbankinstanz (eGW Domain) hinzufügen +add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)] setup de Domain hinzufügen oder bearbeiten: [Domainname(default)],[DB-Name(egroupware)],[DB-Benutzer(egroupware)],DB-Passwort,[DB-Typ(mysql)],[DB-Host(localhost)],[DB-Port(DB spezifisch)],[Konfigurationsbenutzer(wie Header)],[Konfig-Passwort(wie Header)] +adding, editing or deleting an egroupware domain / database instance: setup de Hinzufügen, bearbeiten oder Löschen einer eGroupWare Domain / Datenbank Instanz +additional options and there defaults (in brackets) setup de Zusätzliche Optionen und ihre Vorgaben (in Klammer) additional settings setup de Zusätzliche Einstellungen -admin first name setup de Admin-Vorname -admin last name setup de Admin-Nachname -admin password setup de Admin-Passwort -admin password to header manager setup de Admin-Passwort für Headerverwaltung -admin user for header manager setup de Admin-Benutzer für Headerverwaltung -admin username setup de Admin-Benutzername +admin account successful created. setup de Admin Benutzer erfolgreich angelegt +admin email address setup de Admin Emailadresse +admin first name setup de Admin Vorname +admin last name setup de Admin Nachname +admin password setup de Admin Passwort +admin password to header manager setup de Admin Passwort für Headerverwaltung +admin user for header manager setup de Admin Benutzer für Headerverwaltung +admin username setup de Admin Benutzername admins setup de Administratoren after backing up your tables first. setup de Nach einer Datensicherung Ihrer Tabelen. after retrieving the file, put it into place as the header.inc.php. then, click "continue". setup de Datei nach dem Herunterladen als header.inc.php speichern. Danach auf "Weiter" klicken. all applications setup de Alle Anwendungen all core tables and the admin and preferences applications setup de Sie alle Kern-Tabellen und die Anwendungen Admin und Einstellungen +all exit codes of the command line interface setup de alle Rückgabewerte des Komandozeilen Interface all languages (incl. not listed ones) setup de alle Sprachen (einschl. nicht aufgeführte) all users setup de Alle Benutzer allow authentication via cookie setup de Erlaube Benutzerauthentifizierung über ein Cookie @@ -34,6 +44,7 @@ allow password migration setup de Erlaube Password Migration allowed migration types (comma-separated) setup de Erlauber Migrationstypen (Komma separiert) alternatively domains can be accessed by logging in with username@domain. setup de Auf Domains kann alternative auch durch Anmelden als benutzer@domain zugegriffen werden. analysis setup de Analyse +and is up to date setup de und ist aktuell and reload your webserver, so the above changes take effect !!! setup de UND reloaden Sie ihren Webserver, damit die obigen Änderungen in Kraft treten!!! app details setup de Details der Anwendung app install/remove/upgrade setup de Anwendung installierenn/entfernen/aktualisieren @@ -70,6 +81,7 @@ backup failed setup de Datensicherung fehlgeschlagen backup finished setup de Datensicherung beendet backup now setup de jetzt sichern backup sets setup de Datensicherungen +backup skipped! setup de Datensicherung ausgelassen! backup started, this might take a view minutes ... setup de Datensicherung gestartet, das kann einige Minuten dauern ... because an application it depends upon was upgraded setup de da eine Anwendung von der sie abhängt upgegradet wurde because it depends upon setup de weil es abhängt von @@ -86,6 +98,7 @@ cannot create the header.inc.php due to file permission restrictions.
inst change system-charset setup de Systemzeichensatz wechseln charset setup de ISO-8859-1 charset to convert to setup de Zeichensatz in den konvertiert werden soll +charsets used by the different languages setup de Zeichensätze die von den verschiedenen Sprachen benutzt werden check can only be performed, if called via a webserver, as the user-id/-name of the webserver is not known. setup de Dieser Test kann nur durchgeführt werden, wenn der Aufruf über den Webserver erfolgt, da Benutzer-Id und -name des Webservers nicht bekannt sind. check installation setup de Installation überprüfen check ip address of all sessions setup de IP Adresse bei allen Sessions überprüfen @@ -96,14 +109,17 @@ checking pear%1 is installed setup de checking php.ini setup de Überprüfe die php.ini Datei checking required php version %1 (recommended %2) setup de Überprüfe benötigte PHP Version %1 (empfohlen %2) checking the egroupware installation setup de Überprüfe die eGroupWare-Installation +checks egroupware's installed, it's versions and necessary upgrads (return values see --exit-codes) setup de Überprüft ob eGroupWare installiert ist, die Version und notwendige Aktualisierungen (Rückgabewerte siehe --exit-codes) click here to return to setup. setup de Hier klicken um zu Setup zurück zu kehren. click here setup de Hier klicken click here to re-run the installation tests setup de zum Wiederholen der Installationstests hier klicken +comma separated ip-addresses or host-names, default access to setup from everywhere setup de Komma getrennte IP-Adressen oder Hostnamen, Vorgabe Zugriff von überall completed setup de Abgeschlossen config password setup de Konfigurationspasswort config username setup de Konfigurationsbenutzername configuration setup de Konfiguration configuration completed setup de Konfiguration abgeschlossen +configuration errors: setup de Fehler in der Konfiguration; configuration password setup de Konfigurationspasswort configuration user setup de Konfigurationsbenutzer configure now setup de Jetzt konfigurieren @@ -121,11 +137,13 @@ create admin account setup de Administrator-Konto anlegen create database setup de Datenbank erzeugen create demo accounts setup de Demo-Benutzer anlegen create one now setup de Jetzt erstellen +create or edit the egroupware configuration file: header.inc.php: setup de Anlegen oder bearbeiten der eGroupWare Konfigurationsdatei: header.inc.php: create the empty database - setup de Legen Sie eine leere Datenbank an - create the empty database and grant user permissions - setup de Leere Datenbank anlegen und Benutzerrechte daran gewähren - create your header.inc.php setup de Datei header.inc.php anlegen created setup de erzeugt created header.inc.php! setup de header.inc.php erzeugt! +creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup de anlegen eines Administrator Benutzers: Domain(default),[Konfigurationsbenutzer(admin)],Passwort,Benutzername,Passwort,[Vorname],[Nachname],[Email Adresse] creating tables setup de Erstelle Tabellen current system-charset setup de Aktueller Systemzeichensatz current system-charset is %1. setup de Aktueller Systemzeichensatz ist %1. @@ -133,6 +151,7 @@ current version setup de Gegenw currently installed languages: %1
setup de Gegenwärtig installierte Sprachen: %1
database setup de Datenbank database instance (egw domain) setup de Datenbankinstanz (eGW Domain) +database is version %1 and up to date. setup de Datenbank ist Version %1 und aktuell. database successfully converted from '%1' to '%2' setup de Datenbank erfolgreich von "%1" nach "%2" konvertiert datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup de Port für Datum/Zeitabfragen
Wenn der Port 13 verwendet wird, bitte VOR dem Absenden die Firewallregeln dementsprechend setzen.
(Port 13/Host: 129.6.15.28) day setup de Tag @@ -165,14 +184,28 @@ do you want persistent connections (higher performance, but consumes more resour do you want to manage homedirectory and loginshell attributes? setup de Wollen Sie Benutzerverzeichnisse und Login-Shell Attribute verwalten? does not exist setup de existiert nicht domain setup de Domain +domain '%1' does not exist !!! setup de Domain '%1' existiert NICHT !!! domain name setup de Name der Domain domain select box on login setup de Domain-Auswahlbox beim Einloggen +domain(all),[config user(admin)],password,[file-name(default: backup-dir/db_backup-yyyymmddhhii)] setup de Domain(alle),[Konfigurationsbenutzer(admin)],Passwort,[Dateiname(Vorgabe: Backupverzeichnis/db_backup-JJJJMMTTSSmm)] +domain(default),[config user(admin)],password,[backup to install],[charset(default depends on language)] setup de Domain(default),[Konfigurationsbenutzer(admin)],Passwort,[Backupdatei],[Zeichensatz(Vorgabe sprachabhänig)] +domain(default),[config user(admin)],password,[name=value,...] sets config values beside: setup de Domain(default),[Konfigurationsbenutzer(admin)],Passwort,[Name=Wert,...] setzt Konfigurationswerte neben: +domain-name setup de Domainname dont touch my data setup de Meine Daten nicht verändern download setup de Herunterladen edit current configuration setup de Gegenwärtige Konfiguration überarbeiten edit your existing header.inc.php setup de Bearbeiten Ihrer existierenden header.inc.php edit your header.inc.php setup de Bearbeiten Ihrer header.inc.php +eg. /egroupware or http://domain.com/egroupware, default: %1 setup de zB. /egroupware oder http://domain.com/egroupware, Vorgabe: %1 egroupware administration manual setup de eGroupWare Administrationsmanual (nur in englisch) +egroupware api needs a database (schema) update from version %1 to %2! setup de eGroupWare API benötigt eine Datenbank (Schema) Aktualisierung von Version %1 auf %2! +egroupware api version %1 found. setup de eGroupWare API Version %1 gefunden. +egroupware configuration file (header.inc.php) does not exist. setup de eGroupWare Konfigurationsdatei (header.inc.php) existiert NICHT. +egroupware configuration file (header.inc.php) version %1 exists%2 setup de eGroupWare Konfigurationsdatei (header.inc.php) Version %1 existiert%2 +egroupware configuration file header.inc.php already exists, you need to use --edit-header or delete it first! setup de eGroupWare Konfigurationsdatei header.inc.php existiert bereits, benutzen Sie --edit-header oder löschen Sie diese zuerst! +egroupware domain/instance %1(%2): setup de eGroupWare Domain/Instanz %1(%2): +egroupware is already installed! setup de eGroupWare ist bereits installiert! +egroupware sources in '%1' are not complete, file '%2' missing !!! setup de eGroupWare Quellen in '%1' sind nicht komplett, Datei '%2' fehlt !!! enable for extra debug-messages setup de ankreuzen für zusätzliche Diagnosemeldungen enable ldap version 3 setup de LDAP Version 3 verwenden enable mcrypt setup de MCrypt einschalten @@ -198,6 +231,7 @@ error in group-creation !!! setup de Fehler beim Anlegen der Gruppen !!! export egroupware accounts from sql to ldap setup de eGroupWare Benutzerkonten von SQL nach LDAP exportieren export has been completed! you will need to set the user passwords manually. setup de Export ist abgeschlossen! Sie müssen die Benutzerpasswörter manuell setzen. export sql users to ldap setup de SQL-Benutzer in LDAP exportieren +failed writing configuration file header.inc.php, check the permissions !!! setup de Fehler beim Schreiben der Konfigurationsdatei header.inc.php, bitte überprüfen Sie die Zugriffsrechte !!! false setup de Falsch file setup de DATEI file type, size, version, etc. setup de Dateityp, Größe, Version usw. @@ -212,12 +246,16 @@ go to setup de Gehen zu grant access setup de Zugriff gewähren has a version mismatch setup de hat eine falsche Versionsanpassung header admin login setup de Login Headerverwaltung -header password setup de Passwort der Headerverwaltung -header username setup de Benutzername der Headerverwaltung +header password setup de Passwort Headerverwaltung +header username setup de Benutzer Headerverwaltung +header-password[,header-user(admin)] setup de Passwort Headerverwaltung[,Benutzer Headerverwaltung(admin)] +header.inc.php successful written. setup de header.inc.php erfolgreich geschrieben. historylog removed setup de Historylog gelöscht hooks deregistered setup de Haken nicht mehr aktiv hooks registered setup de Haken registriert host information setup de Host Informationen +host,[smtp port],[smtp user],[smtp password] setup de Host,[SMTP Port],[SMTP Benutzer],[SMTP Passwort] +host,{imap | pop3 | imaps | pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}] setup de Host,{imap | pop3 | imaps | pop3s},[Domain],[{standard(Vorgabe)|vmailmgr = Domain für Mailserver Anmeldung anhängen}] host/ip domain controler setup de Hostname / IP des Domain Controler hostname/ip of database server setup de Hostname/IP des Datenbank-Servers hour (0-24) setup de Stunde (0-24) @@ -245,6 +283,9 @@ install all setup de Alle Installieren install applications setup de Anwendungen installieren install backup setup de Datensicherung installieren install language setup de Sprachen installieren +install or update translations: domain(all),[config user(admin)],password,[[+]lang1[,lang2,...]] + adds, no langs update existing ones setup de Sprachen installieren oder aktualisieren: Domain(alle),[Konfigurationsbenutzer(admin)],Passwort,[[+]Sprache1[,Sprache2,...]] + hinzufügen, keine Sprachen aktualisiert die installierten +installation finished setup de Installation beendet +installation started, this might take a view minutes ... setup de Installation gestartet, das kann einige Minuten dauern ... installed setup de installiert instructions for creating the database in %1: setup de Anweisungen um eine Datenbank unter %1 anzulegen: invalid ip address setup de Ungültige IP Adresse @@ -254,6 +295,8 @@ is broken setup de ist kaputt is disabled setup de ist nicht aktiv is in the webservers docroot setup de ist im Dokumentenverzeichnis (Documentroot) des Webservers is not writeable by the webserver setup de ist nicht vom Webserver schreibbar +it needs upgrading to version %1! use --update-header [,] to do so (--usage gives more options). setup de Benötigt eine Aktualisierung auf Version %1! Benutzen Sie --update-header Passwort[,Benutzer] dafür (--usage gibt weitere Optionen) +languages updated. setup de Sprachen aktualisiert. ldap account import/export setup de LDAP-Benutzerkonten importieren/exportieren ldap accounts configuration setup de LDAP-Benutzerkonten Konfiguration ldap accounts context setup de LDAP-Kontext für Benutzerkonten @@ -274,6 +317,8 @@ ldap search filter for accounts, default: "(uid=%user)", %domain=egw-domain setu leave empty to keep current. setup de Leer lassen um das existierende Password zu behalten. limit access setup de Zugang beschränken limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) setup de Zugang zu Setup auf die folgenden IP Adressen, Netzwerke oder Hostnamen beschränken (z.B. 127.0.0.1,10.1.1,myhost.dnydns.org) +list availible values: setup de Listen der verfügbaren Werte: +list of availible translations setup de Liste der verfügbaren Sprachen login as user postgres, eg. by using su as root setup de Als Benutzer postgres einlogen, zB. durch benutzen von su als root login to mysql - setup de mysql aufrufen - loginname needed for domain configuration setup de Benutzername für die Konfiguration der Domain @@ -311,7 +356,10 @@ no setup de Nein no %1 support found. disabling setup de Keine Unterstützung für %1 gefunden. Abgeschaltet no accounts existing setup de Keine Benutzerkonten gefunden no algorithms available setup de Kein Algorithmus verfügbar +no egroupware domains / database instances exist! use --edit-header --domain to add one (--usage gives more options). setup de Keine eGroupWare Domain / Datenbank Instanz existiert! Benutzen Sie --edit-header --domain um eine hinzuzufügen (--usage gibt weitere Optionen). +no header admin password set! use --edit-header [,] to set one (--usage gives more options). setup de Kein Passwort für die Headerverwaltung gesetzt! Benutzen Sie --edit-header Passwort[,Benutzer] um eines zu setzen (--usage gibt weitere Optionen). no modes available setup de kein Modus verfügbar +no update necessary, domain %1(%2) is up to date. setup de Keine Aktualisierung notwendig, Domain %1(%2) ist aktuell. no xml support found. disabling setup de Keine Unterstützung für XML gefunden. Abgeschaltet not setup de nicht not all mcrypt algorithms and modes work with egroupware. if you experience problems try switching it off. setup de Nicht alle MCrypt-Algorithmen und -Modi funktionieren mit eGroupWare. Wenn Sie Probleme feststellen, versuchen Sie es abzuschalten. @@ -339,7 +387,9 @@ password of db user setup de Passwort des Datenbank Benutzers passwords did not match, please re-enter setup de Passworte stimmten nicht überein, bitte nocheinmal eingeben path (not url!) to your egroupware installation. setup de Pfad (nicht Internetadresse/URL!) Ihrer eGroupWare Installation. path information setup de Pfadinformationen +path of egroupware install directory (default auto-detected) setup de Pfad des eGroupWare Installationsverzeichnis (Vorgabe wird automatisch erkannt) path to user and group files has to be outside of the webservers document-root!!! setup de Pfad zu Benutzer und Gruppen Dateien MUSS AUSSERHALB des Wurzelverzeichnisses (document root) des Webservers sein!!! +path to various directories: have to exist and be writeable by the webserver setup de Pfade zu verschiedenen Verzeichnissen: Diese müssen vorhanden sein und vom Webserver beschreibbar pear is needed by syncml or the ical import+export of calendar. setup de PEAR wird von SyncML oder dem iCal Import+Export des Kalenders benötigt. pear::log is needed by syncml. setup de PEAR::Log wird von SyncML benötigt. persistent connections setup de Permanente Verbindungen @@ -386,6 +436,7 @@ restore finished setup de Wiederherstellen beendet restore started, this might take a view minutes ... setup de Wiederherstellung gestartet, das kann einige Minuten dauern ... restoring a backup will delete/replace all content in your database. are you sure? setup de Das Wiederherstellen einer Datensicherung löscht / ersetzt den Inhalt Ihrer Datenbank. Sind Sie sicher? return to setup setup de Zurück zum Setup +run a database schema update (if necessary): domain(all),[config user(admin)],password setup de Führt eine Aktualisierung des Datenbank Schema aus (falls notwendig): Domain(alle),[Konfigurationsbenutzer(admin)],Passwort run installation tests setup de Installationstests starten safe_mode is turned on, which is generaly a good thing as it makes your install more secure. setup de safe_mode ist eingeschaltet, was ist generell gut, da es Ihre Installation sicherer macht. sample configuration not found. using built in defaults setup de Beispiel Konfiguration nicht gefunden, benutze eingebaute Voreinstellungen @@ -436,6 +487,8 @@ sql encryption type setup de SQL-Verschl standard (login-name identical to egroupware user-name) setup de Standard (Loginname identisch zu eGroupWare Benutzername) standard mailserver settings (used for mail authentication too) setup de Standard Mailserver Einstellungen (werden auch für die Mail Authentifizierung benutzt) start the postmaster setup de Starten Sie den postmaster +start updating languages %1 ... setup de Starte Aktualisierung der Sprachen %1 ... +start updating the database ... setup de Starte Aktualisierung der Datenbank ... status setup de Status step %1 - admin account setup de Schrit %1 - Administrator-Konto step %1 - advanced application management setup de Schritt %1 - Erweiterte Verwaltung der Anwendungen @@ -489,6 +542,8 @@ unfortunally some php/apache packages have problems with it (apache dies and you uninstall setup de deinstaliert uninstall all applications setup de Alle Anwendungen deinstallieren uninstalled setup de nicht installiert +unknow option '%1' !!! setup de Unbekannte Option '%1' !!! +update finished. setup de Aktualisierung beendet. upgrade setup de Aktualisieren upgrade all setup de Alle Aktualiseren upgraded setup de Aktualisiert @@ -496,7 +551,13 @@ upgrading tables setup de aktualisiere Tabellen upload backup setup de Datensicherung hochladen uploads a backup and installs it on your db setup de lädt eine Datensicherung hoch und installiert sie auf Ihrer DB uploads a backup to the backup-dir, from where you can restore it setup de Läde eine Datensicherung in das Datensicherungsverzeichnis, von wo sie diese zurücksichern können +usage: %1 command [additional options] setup de Aufruf: %1 Kommando [zusätzliche Optionen] +use --create-header to create the configuration file (--usage gives more options). setup de Benutzen Sie --create-header um die Konfigurationsdatei anzulegen (--usage gibt mehr Optionen). +use --install to install egroupware. setup de Benutzen Sie --install um eGroupWare zu instalieren. +use --update to do so. setup de Benutzen Sie --update dafür. use cookies to pass sessionid setup de SitzungsId in einem Cookie speichern +use mcrypt to crypt session-data: {off(default) | on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version] setup de benutze mcrypt zur Verschlüselung der Sitzungsdaten: {off(Vorgabe) | on},[mcrypt Initialisierung(Vorgabe ist zufällig erzeugt)],[mcrypt Version] +use persistent db connections: {on(default) | off} setup de benutze permanente Datenbankverbindung: {on(Vorgabe) | off} use pure html compliant code (not fully working yet) setup de Vollständig HTML kompatiblen Code verwenden (nicht vollständig implementiert) user account prefix setup de Präfix für Benutzernamen user for smtp-authentication (leave it empty if no auth required) setup de Benutzer für SMTP-Authentifizierung (leer lassen wenn keine notwendig ist) @@ -535,6 +596,7 @@ you appear to have xml support enabled setup de Sie scheinen XML Unterst you are ready for this stage, but this stage is not yet written.
setup de Sie sind bereit für diesen Schritt, aber dieser Abschnitt wurde noch nicht geschrieben.
you are using php version %1. egroupware now requires %2 or later, recommended is php %3. setup de Sie benutzen die PHP Version %1. eGroupWare benötigt mindestens die Version %2, empfohlen ist PHP %3. you can install it by running: setup de Installation durch ausführen von: +you can use the header user and password for every domain too. if the password is not set via the commandline, it is read from the enviroment variable egw_cli_password or queried from the user. setup de Sie können den Benutzer und das Passwort der Headerverwaltung auch für jede Domain verwenden. Wenn das Passwort nicht in der Komandozeile angegeben wurde, wird es aus der Umgebungsvariable EGW_CLI_PASSWORD gelesen oder vom Benutzer abgefragt. you didn't enter a config password for domain %1 setup de Sie haben kein Passwort für die Domain %1 angegeben you didn't enter a config username for domain %1 setup de Sie haben keinen Benutzernamen für die Domain %1 angegeben you didn't enter a header admin password setup de Sie haben kein Passwort für die Headerverwaltung eingegeben @@ -544,6 +606,9 @@ you have not created your header.inc.php yet!
you can create it now. setup you have successfully logged out setup de Sie haben sich erfolgreich abgemeldet. you must enter a username for the admin setup de Sie müssen einen Benutzernamen für den Administrator eingeben! you need to add at least one egroupware domain / database instance. setup de Sie müssen mindestens eine eGroupWare Domain / Datenbank Instanz hinzufügen. +you need to add some domains to your header.inc.php. setup de Sie müssen eine Domain zu ihrer header.inc.php hinzufügen. +you need to configure egroupware: setup de Sie müssen eGroupWare konfigurieren: +you need to fix the above errors, before the configuration file header.inc.php can be written! setup de Sie müssen die obigen Fehler beheben, bevor die Konfigurationsdatei header.inc.php gespeichert werden kann! you need to select your current charset! setup de Sie müssen Ihren aktuellen Zeichensatz auswählen! you should either uninstall and then reinstall it, or attempt manual repairs setup de Sie sollten entweder de- und neuinstallieren, oder manuelle Reparaturen versuchen you will need to load the proper schema into your ldap server - see phpgwapi/doc/ldap/readme setup de Sie müssen das notwendige phpgwAccounts Schema auf Ihrem LDAP Server installieren - siehe phpgwapi/doc/ldap/README. @@ -563,3 +628,5 @@ your php installation does not have appropriate gd support. you need gd library your tables are current setup de Ihre Tabellen sind aktuell your tables will be dropped and you will lose data setup de Ihre Tabellen werden gelöscht werden und Sie werden alle Daten verlieren! your temporary directory '%1' %2 setup de Ihr temporäres Verzeichnis '%1' %2 +{db | php(default) | php-restore} setup de {db | php(Vorgabe) | php-restore} +{off(default) | on} setup de {off(Vorgabe) | on} diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index 202e3ae339..df99531cba 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -2,6 +2,7 @@ %1 does not exist !!! setup en %1 does not exist !!! %1 is %2%3 !!! setup en %1 is %2%3 !!! %1, %2 or %3 the configuration file. setup en %1, %2 or %3 the configuration file. +'%1' is not allowed as %2. arguments of option %3 !!! setup en '%1' is not allowed as %2. arguments of option %3 !!! (searching accounts and changing passwords) setup en (searching accounts and changing passwords) *** do not update your database via setup, as the update might be interrupted by the max_execution_time, which leaves your db in an unrecoverable state (your data is lost) !!! setup en *** Do NOT update your database via setup, as the update might be interrupted by the max_execution_time, which leaves your DB in an unrecoverable state (your data is lost) !!! *** you have to do the changes manualy in your php.ini (usualy in /etc on linux) in order to get egw fully working !!! setup en *** You have to do the changes manualy in your php.ini (usualy in /etc on linux) in order to get eGW fully working !!! @@ -10,12 +11,20 @@ 80 (http) setup en 80 (http) charset to use (use utf-8 if you plan to use languages with different charsets): setup en charset to use (use utf-8 if you plan to use languages with different charsets): this will create 1 admin account and 3 demo accounts
the username/passwords are: demo/guest, demo2/guest and demo3/guest. setup en This will create 1 admin account and 3 demo accounts
The username/passwords are: demo/guest, demo2/guest and demo3/guest. +[header-password],[header-user],[new-password],[new-user] setup en [header-password],[header-user],[new-password],[new-user] +access denied: wrong username or password for manage-header !!! setup en Access denied: wrong username or password for manage-header !!! +access denied: wrong username or password to configure the domain '%1(%2)' !!! setup en Access denied: wrong username or password to configure the domain '%1(%2)' !!! accounts existing setup en Accounts existing actions setup en Actions activate safe password check setup en Activate safe password check add auto-created users to this group ('default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.) add new database instance (egw domain) setup en Add new database instance (eGW domain) +add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)] setup en add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)] +adding, editing or deleting an egroupware domain / database instance: setup en Adding, editing or deleting an eGroupWare domain / database instance: +additional options and there defaults (in brackets) setup en Additional options and there defaults (in brackets) additional settings setup en Additional settings +admin account successful created. setup en Admin account successful created. +admin email address setup en Admin email address admin first name setup en Admin first name admin last name setup en Admin last name admin password setup en Admin password @@ -27,6 +36,7 @@ after backing up your tables first. setup en After backing up your tables first. after retrieving the file, put it into place as the header.inc.php. then, click "continue". setup en After retrieving the file, put it into place as the header.inc.php. Then, click "continue". all applications setup en all applications all core tables and the admin and preferences applications setup en all core tables and the admin and preferences applications +all exit codes of the command line interface setup en all exit codes of the command line interface all languages (incl. not listed ones) setup en all languages (incl. not listed ones) all users setup en All Users allow authentication via cookie setup en Allow authentication via cookie @@ -34,6 +44,7 @@ allow password migration setup en Allow password migration allowed migration types (comma-separated) setup en Allowed migration types (comma-separated) alternatively domains can be accessed by logging in with username@domain. setup en Alternatively domains can be accessed by logging in with username@domain. analysis setup en Analysis +and is up to date setup en and is up to date and reload your webserver, so the above changes take effect !!! setup en AND reload your webserver, so the above changes take effect !!! app details setup en App details app install/remove/upgrade setup en App install/remove/upgrade @@ -70,6 +81,7 @@ backup failed setup en Backup failed backup finished setup en backup finished backup now setup en backup now backup sets setup en backup sets +backup skipped! setup en Backup skipped! backup started, this might take a view minutes ... setup en backup started, this might take a view minutes ... because an application it depends upon was upgraded setup en because an application it depends upon was upgraded because it depends upon setup en because it depends upon @@ -86,6 +98,7 @@ cannot create the header.inc.php due to file permission restrictions.
inst change system-charset setup en Change system-charset charset setup en ISO-8859-1 charset to convert to setup en Charset to convert to +charsets used by the different languages setup en charsets used by the different languages check can only be performed, if called via a webserver, as the user-id/-name of the webserver is not known. setup en Check can only be performed, if called via a webserver, as the user-id/-name of the webserver is not known. check installation setup en Check installation check ip address of all sessions setup en check ip address of all sessions @@ -96,14 +109,17 @@ checking pear%1 is installed setup en Checking PEAR%1 is installed checking php.ini setup en Checking php.ini checking required php version %1 (recommended %2) setup en Checking required PHP version %1 (recommended %2) checking the egroupware installation setup en Checking the eGroupWare Installation +checks egroupware's installed, it's versions and necessary upgrads (return values see --exit-codes) setup en checks eGroupWare's installed, it's versions and necessary upgrads (return values see --exit-codes) click here to return to setup. setup en click here to return to setup. click here setup en Click Here click here to re-run the installation tests setup en Click here to re-run the installation tests +comma separated ip-addresses or host-names, default access to setup from everywhere setup en comma separated ip-addresses or host-names, default access to setup from everywhere completed setup en Completed config password setup en Config Password config username setup en Config Username configuration setup en Configuration configuration completed setup en Configuration completed +configuration errors: setup en Configuration errors: configuration password setup en Configuration Password configuration user setup en Configuration User configure now setup en Configure Now @@ -121,11 +137,13 @@ create admin account setup en Create admin account create database setup en Create Database create demo accounts setup en Create demo accounts create one now setup en Create one now +create or edit the egroupware configuration file: header.inc.php: setup en Create or edit the eGroupWare configuration file: header.inc.php: create the empty database - setup en Create the empty database - create the empty database and grant user permissions - setup en Create the empty database and grant user permissions - create your header.inc.php setup en Create your header.inc.php created setup en created created header.inc.php! setup en Created header.inc.php! +creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup en creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] creating tables setup en Creating Tables current system-charset setup en Current system-charset current system-charset is %1. setup en Current system-charset is %1. @@ -133,6 +151,7 @@ current version setup en Current Version currently installed languages: %1
setup en Currently installed languages: %1
database setup en Database database instance (egw domain) setup en Database instance (eGW domain) +database is version %1 and up to date. setup en database is version %1 and up to date. database successfully converted from '%1' to '%2' setup en Database successfully converted from '%1' to '%2' datetime port.
if using port 13, please set firewall rules appropriately before submitting this page.
(port: 13 / host: 129.6.15.28) setup en Datetime port.
If using port 13, please set firewall rules appropriately before submitting this page.
(Port: 13 / Host: 129.6.15.28) day setup en day @@ -165,14 +184,28 @@ do you want persistent connections (higher performance, but consumes more resour do you want to manage homedirectory and loginshell attributes? setup en Do you want to manage homedirectory and loginshell attributes? does not exist setup en does not exist domain setup en Domain +domain '%1' does not exist !!! setup en Domain '%1' does NOT exist !!! domain name setup en Domain name domain select box on login setup en Domain select box on login +domain(all),[config user(admin)],password,[file-name(default: backup-dir/db_backup-yyyymmddhhii)] setup en domain(all),[config user(admin)],password,[file-name(default: backup-dir/db_backup-YYYYMMDDHHii)] +domain(default),[config user(admin)],password,[backup to install],[charset(default depends on language)] setup en domain(default),[config user(admin)],password,[backup to install],[charset(default depends on language)] +domain(default),[config user(admin)],password,[name=value,...] sets config values beside: setup en domain(default),[config user(admin)],password,[name=value,...] sets config values beside: +domain-name setup en domain-name dont touch my data setup en Dont touch my data download setup en Download edit current configuration setup en Edit Current Configuration edit your existing header.inc.php setup en Edit your existing header.inc.php edit your header.inc.php setup en Edit your header.inc.php +eg. /egroupware or http://domain.com/egroupware, default: %1 setup en eg. /egroupware or http://domain.com/egroupware, default: %1 egroupware administration manual setup en eGroupWare Administration Manual +egroupware api needs a database (schema) update from version %1 to %2! setup en eGroupWare API needs a database (schema) update from version %1 to %2! +egroupware api version %1 found. setup en eGroupWare API version %1 found. +egroupware configuration file (header.inc.php) does not exist. setup en eGroupWare configuration file (header.inc.php) does NOT exist. +egroupware configuration file (header.inc.php) version %1 exists%2 setup en eGroupWare configuration file (header.inc.php) version %1 exists%2 +egroupware configuration file header.inc.php already exists, you need to use --edit-header or delete it first! setup en eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first! +egroupware domain/instance %1(%2): setup en eGroupWare domain/instance %1(%2): +egroupware is already installed! setup en eGroupWare is already installed! +egroupware sources in '%1' are not complete, file '%2' missing !!! setup en eGroupWare sources in '%1' are not complete, file '%2' missing !!! enable for extra debug-messages setup en enable for extra debug-messages enable ldap version 3 setup en Enable LDAP Version 3 enable mcrypt setup en Enable MCrypt @@ -196,6 +229,7 @@ error in group-creation !!! setup en Error in group-creation !!! export egroupware accounts from sql to ldap setup en Export eGroupWare accounts from SQL to LDAP export has been completed! you will need to set the user passwords manually. setup en Export has been completed! You will need to set the user passwords manually. export sql users to ldap setup en Export SQL users to LDAP +failed writing configuration file header.inc.php, check the permissions !!! setup en Failed writing configuration file header.inc.php, check the permissions !!! false setup en False file setup en FILE file type, size, version, etc. setup en file type, size, version, etc. @@ -212,10 +246,14 @@ has a version mismatch setup en has a version mismatch header admin login setup en Header Admin Login header password setup en Header Password header username setup en Header Username +header-password[,header-user(admin)] setup en header-password[,header-user(admin)] +header.inc.php successful written. setup en header.inc.php successful written. historylog removed setup en Historylog removed hooks deregistered setup en hooks deregistered hooks registered setup en hooks registered host information setup en Host information +host,[smtp port],[smtp user],[smtp password] setup en host,[smtp port],[smtp user],[smtp password] +host,{imap | pop3 | imaps | pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}] setup en host,{imap | pop3 | imaps | pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}] host/ip domain controler setup en Host/IP Domain controler hostname/ip of database server setup en Hostname/IP of database server hour (0-24) setup en hour (0-24) @@ -243,6 +281,9 @@ install all setup en Install All install applications setup en Install Applications install backup setup en install backup install language setup en Install Language +install or update translations: domain(all),[config user(admin)],password,[[+]lang1[,lang2,...]] + adds, no langs update existing ones setup en install or update translations: domain(all),[config user(admin)],password,[[+]lang1[,lang2,...]] + adds, no langs update existing ones +installation finished setup en Installation finished +installation started, this might take a view minutes ... setup en Installation started, this might take a view minutes ... installed setup en installed instructions for creating the database in %1: setup en Instructions for creating the database in %1: invalid ip address setup en Invalid IP address @@ -252,6 +293,8 @@ is broken setup en is broken is disabled setup en is disabled is in the webservers docroot setup en is in the webservers docroot is not writeable by the webserver setup en is not writeable by the webserver +it needs upgrading to version %1! use --update-header [,] to do so (--usage gives more options). setup en It needs upgrading to version %1! Use --update-header [,] to do so (--usage gives more options). +languages updated. setup en Languages updated. ldap account import/export setup en LDAP account import/export ldap accounts configuration setup en LDAP Accounts Configuration ldap accounts context setup en LDAP accounts context @@ -272,6 +315,8 @@ ldap search filter for accounts, default: "(uid=%user)", %domain=egw-domain setu leave empty to keep current. setup en Leave empty to keep current. limit access setup en Limit access limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) setup en Limit access to setup to the following addresses, networks or hostnames (e.g. 127.0.0.1,10.1.1,myhost.dnydns.org) +list availible values: setup en List availible values: +list of availible translations setup en list of availible translations login as user postgres, eg. by using su as root setup en Login as user postgres, eg. by using su as root login to mysql - setup en Login to mysql - loginname needed for domain configuration setup en Loginname needed for domain configuration @@ -309,7 +354,10 @@ no setup en No no %1 support found. disabling setup en No %1 support found. Disabling no accounts existing setup en No accounts existing no algorithms available setup en no algorithms available +no egroupware domains / database instances exist! use --edit-header --domain to add one (--usage gives more options). setup en No eGroupWare domains / database instances exist! Use --edit-header --domain to add one (--usage gives more options). +no header admin password set! use --edit-header [,] to set one (--usage gives more options). setup en No header admin password set! Use --edit-header [,] to set one (--usage gives more options). no modes available setup en no modes available +no update necessary, domain %1(%2) is up to date. setup en No update necessary, domain %1(%2) is up to date. no xml support found. disabling setup en No XML support found. Disabling not setup en not not all mcrypt algorithms and modes work with egroupware. if you experience problems try switching it off. setup en Not all mcrypt algorithms and modes work with eGroupWare. If you experience problems try switching it off. @@ -337,7 +385,9 @@ password of db user setup en Password of db user passwords did not match, please re-enter setup en Passwords did not match, please re-enter path (not url!) to your egroupware installation. setup en Path (not URL!) to your eGroupWare installation. path information setup en Path information +path of egroupware install directory (default auto-detected) setup en path of eGroupWare install directory (default auto-detected) path to user and group files has to be outside of the webservers document-root!!! setup en Path to user and group files HAS TO BE OUTSIDE of the webservers document-root!!! +path to various directories: have to exist and be writeable by the webserver setup en path to various directories: have to exist and be writeable by the webserver pear is needed by syncml or the ical import+export of calendar. setup en PEAR is needed by SyncML or the iCal import+export of calendar. pear::log is needed by syncml. setup en PEAR::Log is needed by SyncML. persistent connections setup en Persistent connections @@ -384,6 +434,7 @@ restore finished setup en restore finished restore started, this might take a view minutes ... setup en restore started, this might take a view minutes ... restoring a backup will delete/replace all content in your database. are you sure? setup en Restoring a backup will delete/replace all content in your database. Are you sure? return to setup setup en Return to Setup +run a database schema update (if necessary): domain(all),[config user(admin)],password setup en run a database schema update (if necessary): domain(all),[config user(admin)],password run installation tests setup en Run installation tests safe_mode is turned on, which is generaly a good thing as it makes your install more secure. setup en safe_mode is turned on, which is generaly a good thing as it makes your install more secure. sample configuration not found. using built in defaults setup en Sample configuration not found. using built in defaults @@ -434,6 +485,8 @@ sql encryption type setup en SQL encryption type for passwords (default - md5) standard (login-name identical to egroupware user-name) setup en standard (login-name identical to eGroupWare user-name) standard mailserver settings (used for mail authentication too) setup en Standard mailserver settings (used for Mail authentication too) start the postmaster setup en Start the postmaster +start updating languages %1 ... setup en Start updating languages %1 ... +start updating the database ... setup en Start updating the database ... status setup en Status step %1 - admin account setup en Step %1 - Admin Account step %1 - advanced application management setup en Step %1 - Advanced Application Management @@ -487,6 +540,8 @@ unfortunally some php/apache packages have problems with it (apache dies and you uninstall setup en uninstall uninstall all applications setup en Uninstall all applications uninstalled setup en uninstalled +unknow option '%1' !!! setup en Unknow option '%1' !!! +update finished. setup en Update finished. upgrade setup en Upgrade upgrade all setup en Upgrade All upgraded setup en upgraded @@ -494,7 +549,13 @@ upgrading tables setup en Upgrading Tables upload backup setup en upload backup uploads a backup and installs it on your db setup en uploads a backup and installs it on your DB uploads a backup to the backup-dir, from where you can restore it setup en uploads a backup to the backup-dir, from where you can restore it +usage: %1 command [additional options] setup en Usage: %1 command [additional options] +use --create-header to create the configuration file (--usage gives more options). setup en Use --create-header to create the configuration file (--usage gives more options). +use --install to install egroupware. setup en Use --install to install eGroupWare. +use --update to do so. setup en Use --update to do so. use cookies to pass sessionid setup en Use cookies to pass sessionid +use mcrypt to crypt session-data: {off(default) | on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version] setup en use mcrypt to crypt session-data: {off(default) | on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version] +use persistent db connections: {on(default) | off} setup en use persistent db connections: {on(default) | off} use pure html compliant code (not fully working yet) setup en Use pure HTML compliant code (not fully working yet) user account prefix setup en User account prefix user for smtp-authentication (leave it empty if no auth required) setup en User for SMTP-authentication (leave it empty if no auth required) @@ -533,6 +594,7 @@ you appear to have xml support enabled setup en You appear to have XML support e you are ready for this stage, but this stage is not yet written.
setup en You are ready for this stage, but this stage is not yet written.
you are using php version %1. egroupware now requires %2 or later, recommended is php %3. setup en You are using PHP version %1. eGroupWare now requires %2 or later, recommended is PHP %3. you can install it by running: setup en You can install it by running: +you can use the header user and password for every domain too. if the password is not set via the commandline, it is read from the enviroment variable egw_cli_password or queried from the user. setup en You can use the header user and password for every domain too. If the password is not set via the commandline, it is read from the enviroment variable EGW_CLI_PASSWORD or queried from the user. you didn't enter a config password for domain %1 setup en You didn't enter a config password for domain %1 you didn't enter a config username for domain %1 setup en You didn't enter a config username for domain %1 you didn't enter a header admin password setup en You didn't enter a header admin password @@ -542,6 +604,9 @@ you have not created your header.inc.php yet!
you can create it now. setup you have successfully logged out setup en You have successfully logged out you must enter a username for the admin setup en You must enter a username for the admin you need to add at least one egroupware domain / database instance. setup en You need to add at least one eGroupWare domain / database instance. +you need to add some domains to your header.inc.php. setup en You need to add some domains to your header.inc.php. +you need to configure egroupware: setup en You need to configure eGroupWare: +you need to fix the above errors, before the configuration file header.inc.php can be written! setup en You need to fix the above errors, before the configuration file header.inc.php can be written! you need to select your current charset! setup en You need to select your current charset! you should either uninstall and then reinstall it, or attempt manual repairs setup en You should either uninstall and then reinstall it, or attempt manual repairs you will need to load the proper schema into your ldap server - see phpgwapi/doc/ldap/readme setup en You will need to load the proper schema into your ldap server - see phpgwapi/doc/ldap/README @@ -561,3 +626,5 @@ your php installation does not have appropriate gd support. you need gd library your tables are current setup en Your tables are current your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data !! your temporary directory '%1' %2 setup en Your temporary directory '%1' %2 +{db | php(default) | php-restore} setup en {db | php(default) | php-restore} +{off(default) | on} setup en {off(default) | on} diff --git a/setup/setup-cli.php b/setup/setup-cli.php index 3fc438a2f8..7dd4a16779 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -25,7 +25,7 @@ else } // setting the language from the enviroment -$_POST['ConfigLang'] = get_lang(); +$_POST['ConfigLang'] = get_lang($charset); create_http_enviroment(); // guessing the docroot etc. // setting up the $GLOBALS['egw_setup'] object AND including the header.inc.php if it exists @@ -36,6 +36,7 @@ $GLOBALS['egw_info'] = array( )); include('inc/functions.inc.php'); $GLOBALS['egw_setup']->translation->no_translation_marker = ''; +$GLOBALS['egw_setup']->system_charset = $charset; if ((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) { @@ -216,10 +217,10 @@ function do_backup($arg,$quite_check=false) $db_backup =& CreateObject('phpgwapi.db_backup'); if (is_resource($f = $db_backup->fopen_backup($backup))) { - echo lang('backup started, this might take a view minutes ...')."\n"; + echo lang('Backup started, this might take a view minutes ...')."\n"; $db_backup->backup($f); fclose($f); - echo lang('backup finished')."\n"; + echo lang('Backup finished')."\n"; } else // backup failed ==> dont start the upgrade { @@ -258,7 +259,7 @@ function do_update($arg) } else { - echo lang('Starting update ...')."\n"; + echo lang('Start updating the database ...')."\n"; do_backup($arg,true); @@ -320,14 +321,17 @@ function do_lang($arg) $langs = array_unique($langs); echo lang('Start updating languages %1 ...',implode(',',$langs))."\n"; $GLOBALS['egw_setup']->translation->sql->install_langs($langs); - echo lang('languages updated.')."\n"; + echo lang('Languages updated.')."\n"; } } /** * Check if eGW is installed according to $stop and we have the necessary authorization for config * - * We allow the config user/pw of the domain or the header admin user/pw! + * The password can be specified as parameter, via the enviroment variable EGW_CLI_PASSWORD or + * querier from the user. Specifying it as parameter can be security problem! + * + * We allow the config user/pw of the domain OR the header admin user/pw! * * @param string $arg [domain(default)],[user(admin)],password * @param int $stop see do_check() @@ -338,13 +342,22 @@ function _check_auth_config($arg,$stop=15) $options = explode(',',$arg); if (!($domain = array_shift($options))) $domain = 'default'; if (!($user = array_shift($options))) $user = 'admin'; - $password = array_shift($options); - + if (!($password = array_shift($options))) + { + if (!($password = $_SERVER['EGW_CLI_PASSWORD'])) + { + echo lang('Config password').' '; + $password = trim(fgets($f = fopen('php://stdin','rb'))); + fclose($f); + } + } do_check($domain,$stop); // check if eGW is installed //echo "check_auth('$user','$password','{$GLOBALS['egw_domain'][$domain]['config_user']}','{$GLOBALS['egw_domain'][$domain]['config_passwd']}')\n"; if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['config_user'], - $GLOBALS['egw_domain'][$domain]['config_passwd'])) + $GLOBALS['egw_domain'][$domain]['config_passwd']) && + !$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['header_admin_user'], + $GLOBALS['egw_domain'][$domain]['header_admin_password'])) { fail(40,lang("Access denied: wrong username or password to configure the domain '%1(%2)' !!!",$domain,$GLOBALS['egw_domain'][$domain]['db_type'])); } @@ -354,19 +367,17 @@ function _check_auth_config($arg,$stop=15) /** * Install eGroupWare * - * @param string $args domain,[backup-file],[charset] + * @param string $args domain,[config user(admin)],password,[backup-file],[charset] */ function do_install($args) { global $setup_info; - list($domain,$backup,$charset) = explode(',',$args); + list($domain,,,$backup,$charset) = explode(',',$args); if (!$domain) $domain = 'default'; - if (!do_check($domain,13)) // check and fail if we have no working db - { - fail(30,lang('eGroupWare is already installed!')); - } + $options = _check_auth_config($args,array(13,14,20)); + // use uploaded backup, instead installing from scratch if ($backup) { @@ -383,6 +394,10 @@ function do_install($args) } else { + if ($GLOBALS['egw_info']['setup']['stage']['db'] != 3) + { + fail(30,lang('eGroupWare is already installed!')); + } if (!$charset) $charset = $GLOBALS['egw_setup']->translation->langarray['charset']; $setup_info = $GLOBALS['egw_setup']->detection->upgrade_exclude($setup_info); @@ -401,13 +416,15 @@ function do_install($args) * Check if eGW is installed, which versions and if an update is needed * * @param string $domain='' domain to check, default '' = all - * @param int $stop=0 stop checks before given exit-code, defaul 0 = all checks + * @param int/array $stop=0 stop checks before given exit-code(s), default 0 = all checks */ function do_check($domain='',$stop=0) { global $setup_info; static $header_checks=true; // output the header checks only once + if ($stop && !is_array($stop)) $stop = array($stop); + $versions =& $GLOBALS['egw_info']['server']['versions']; if (!$versions['phpgwapi']) @@ -424,7 +441,7 @@ function do_check($domain='',$stop=0) echo lang('eGroupWare API version %1 found.',$versions['phpgwapi'])."\n"; } $header_stage = $GLOBALS['egw_setup']->detection->check_header(); - if ($stop && $header_stage == $stop) return true; + if ($stop && in_array($header_stage,$stop)) return true; switch ($header_stage) { @@ -471,13 +488,13 @@ function do_check($domain='',$stop=0) $setup_info = $GLOBALS['egw_setup']->detection->get_db_versions($setup_info); $db_stage = $GLOBALS['egw_setup']->detection->check_db($setup_info); } - if ($stop && 10+$db_stage == $stop) return true; + if ($stop && in_array(10+$db_stage,$stop)) return true; switch($db_stage) { case 1: fail(11,lang('Your Database is not working!')." $db: ".$GLOBALS['egw_setup']->db->Error); - case 3: fail(13,lang('Your database is working, ibut you dont have any applications installed')." ($db). ".lang("Use --install to install eGroupWare.")); + case 3: fail(13,lang('Your database is working, but you dont have any applications installed')." ($db). ".lang("Use --install to install eGroupWare.")); case 4: fail(14,lang('eGroupWare API needs a database (schema) update from version %1 to %2!',$setup_info['phpgwapi']['currentver'],$versions['phpgwapi']).' '.lang('Use --update to do so.')); @@ -493,7 +510,7 @@ function do_check($domain='',$stop=0) if ($apps_to_upgrade) { $db_stage = 4; - if ($stop && 10+$db_stage == $stop) return true; + if ($stop && in_array(10+$db_stage,$stop)) return true; fail(14,lang('The following applications need to be upgraded:').' '.implode(', ',$apps_to_upgrade).'! '.lang('Use --update to do so.')); } break; @@ -531,14 +548,21 @@ function do_header($create,&$arguments) { if ($create) fail(20,lang('eGroupWare configuration file header.inc.php already exists, you need to use --edit-header or delete it first!')); - // header.inc.php is already include by include('inc/functions.inc.php')! - unset($GLOBALS['egw_info']['flags']); - // check header-admin-user and -password (only if a password is set!) if ($GLOBALS['egw_info']['server']['header_admin_password']) { - @list($password,$user) = explode(',',@$arguments[0]); + @list($password,$user) = $options = explode(',',@$arguments[0]); if (!$user) $user = 'admin'; + if (!$password && !($password = $_SERVER['EGW_CLI_PASSWORD'])) + { + echo lang('Admin password to header manager').' '; + $password = trim(fgets($f = fopen('php://stdin','rb'))); + fclose($f); + } + $options[0] = $user; + $options[1] = $password; + $arguments[0] = implode(',',$options); + if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_info']['server']['header_admin_user'], $GLOBALS['egw_info']['server']['header_admin_password'])) { @@ -658,6 +682,7 @@ function do_header($create,&$arguments) } if (($errors = $GLOBALS['egw_setup']->header->validation_errors($GLOBALS['egw_info']['server']['server_root'],$GLOBALS['egw_info']['server']['include_root']))) { + unset($GLOBALS['egw_info']['flags']); echo '$GLOBALS[egw_info] = '; print_r($GLOBALS['egw_info']); echo '$GLOBALS[egw_domain] = '; print_r($GLOBALS['egw_domain']); echo "\n".lang('Configuration errors:')."\n- ".implode("\n- ",$errors)."\n"; @@ -704,13 +729,13 @@ function _set_value(&$arr,$index,$name,$value) /** * Reads the users language from the enviroment * + * @param string &$charset charset set in LANG enviroment variable or the default utf-8 * @return string 2 or 5 digit language code used in eGW */ -function get_lang() +function get_lang(&$charset) { - list($lang,$nation,$charset) = split("[_.]",$_SERVER['LANG']); - $nation = strtolower($nation); - + list($lang,$nation,$charset) = split("[_.]",strtolower($_SERVER['LANG'])); + foreach(file('lang/languages') as $line) { list($code,$language) = explode("\t",$line); @@ -748,31 +773,32 @@ function create_http_enviroment() */ function do_usage() { - echo lang('Usage: %1 {--check|--create-header|--edit-header|--install|--config|--admin|--language|--backup|--update} [additional options]',basename($_SERVER['argv'][0]))."\n\n"; + echo lang('Usage: %1 command [additional options]',basename($_SERVER['argv'][0]))."\n\n"; echo '--check '.lang('checks eGroupWare\'s installed, it\'s versions and necessary upgrads (return values see --exit-codes)')."\n"; - echo '--install '.lang('domain(default),[backup to install],[charset(default depends on language)]')."\n"; - echo '--config '.lang('domain(default),[config user(admin)],password,[,name=value,...] sets config values beside:')."\n"; + echo '--install '.lang('domain(default),[config user(admin)],password,[backup to install],[charset(default depends on language)]')."\n"; + echo '--config '.lang('domain(default),[config user(admin)],password,[name=value,...] sets config values beside:')."\n"; echo ' --files-dir, --backup-dir, --temp-dir '.lang('path to various directories: have to exist and be writeable by the webserver')."\n"; echo ' --webserver-url '.lang('eg. /egroupware or http://domain.com/egroupware, default: %1',str_replace('/setup/setup-cli.php','',$_SERVER['PHP_SELF']))."\n"; - echo ' --mailserver '.lang('host,{imap|pop3|imaps|pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}]')."\n"; + echo ' --mailserver '.lang('host,{imap | pop3 | imaps | pop3s},[domain],[{standard(default)|vmailmgr = add domain for mailserver login}]')."\n"; echo ' --smtpserver '.lang('host,[smtp port],[smtp user],[smtp password]')."\n"; echo '--admin '.lang('creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email]')."\n"; echo '--language '.lang('install or update translations: domain(all),[config user(admin)],password,[[+]lang1[,lang2,...]] + adds, no langs update existing ones')."\n"; echo '--backup '.lang('domain(all),[config user(admin)],password,[file-name(default: backup-dir/db_backup-YYYYMMDDHHii)]')."\n"; echo '--update '.lang('run a database schema update (if necessary): domain(all),[config user(admin)],password')."\n"; + echo lang('You can use the header user and password for every domain too. If the password is not set via the commandline, it is read from the enviroment variable EGW_CLI_PASSWORD or queried from the user.')."\n"; echo "\n".lang('Create or edit the eGroupWare configuration file: header.inc.php:')."\n"; echo '--create-header '.lang('header-password[,header-user(admin)]')."\n"; echo '--edit-header '.lang('[header-password],[header-user],[new-password],[new-user]')."\n"; - echo "\n".lang('Additional options and there defaults (int brackets)')."\n"; + echo "\n".lang('Additional options and there defaults (in brackets)')."\n"; echo '--server-root '.lang('path of eGroupWare install directory (default auto-detected)')."\n"; - echo '--session-type '.lang('{db|php(default)|php-restore}')."\n"; + echo '--session-type '.lang('{db | php(default) | php-restore}')."\n"; echo '--limit-access '.lang('comma separated ip-addresses or host-names, default access to setup from everywhere')."\n"; - echo '--mcrypt '.lang('use mcrypt to crypt session-data: {off(default)|on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version]')."\n"; - echo '--db-persistent '.lang('use persistent db connections: {on(default)|off}')."\n"; - echo '--domain-selectbox '.lang('{off(default)|on}')."\n"; + echo '--mcrypt '.lang('use mcrypt to crypt session-data: {off(default) | on},[mcrypt-init-vector(default randomly generated)],[mcrypt-version]')."\n"; + echo '--db-persistent '.lang('use persistent db connections: {on(default) | off}')."\n"; + echo '--domain-selectbox '.lang('{off(default) | on}')."\n"; echo "\n".lang('Adding, editing or deleting an eGroupWare domain / database instance:')."\n"; echo '--domain '.lang('add or edit a domain: [domain-name(default)],[db-name(egroupware)],[db-user(egroupware)],db-password,[db-type(mysql)],[db-host(localhost)],[db-port(db specific)],[config-user(as header)],[config-passwd(as header)]')."\n"; From b2102ccbd6cab96be60c970540d12338fd45da95 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 00:33:27 +0000 Subject: [PATCH 026/176] - week- and month-view can now be configured (via the user prefs) to display a non-time-grid view (close to what the old calendar does) - fixed / improved some layout problems with the time-grid views --- calendar/inc/class.uiviews.inc.php | 127 ++++++++++----- calendar/inc/hook_settings.inc.php | 163 ++++++++++---------- calendar/setup/phpgw_de.lang | 8 +- calendar/setup/phpgw_en.lang | 8 +- calendar/templates/default/app.css | 40 ++++- calendar/templates/default/event_widget.tpl | 19 ++- 6 files changed, 222 insertions(+), 143 deletions(-) diff --git a/calendar/inc/class.uiviews.inc.php b/calendar/inc/class.uiviews.inc.php index 5e0aac3d6e..906accb25d 100644 --- a/calendar/inc/class.uiviews.inc.php +++ b/calendar/inc/class.uiviews.inc.php @@ -62,6 +62,12 @@ class uiviews extends uical */ var $search_params; + /** + * @var boolean $use_time_grid=true should we use a time grid, + * can be set for week- and month-view to false by the cal_pref no_time_grid + */ + var $use_time_grid=true; + /** * Constructor * @@ -231,6 +237,8 @@ class uiviews extends uical { if ($this->debug > 0) $this->bo->debug_message('uiviews::month(weeks=%1) date=%2',True,$weeks,$this->date); + $this->use_time_grid = $this->cal_prefs['use_time_grid'] == ''; // all views + if ($weeks) { $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day=1); @@ -314,6 +322,8 @@ class uiviews extends uical */ function week($days=0,$home=false) { + $this->use_time_grid = $this->cal_prefs['use_time_grid'] != 'day'; + if (!$days) { $days = isset($_GET['days']) ? $_GET['days'] : $this->cal_prefs['days_in_weekview']; @@ -389,6 +399,8 @@ class uiviews extends uical $this->last = $this->first = $this->bo->date2ts((string)$this->date); $GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang(adodb_date('l',$this->first)).', '.$this->bo->long_date($this->first); + $this->use_time_grid = true; // day-view always uses a time-grid, independent what's set in the prefs! + $this->search_params['end'] = $this->last = $this->first+DAY_s-1; if (!$home) @@ -611,25 +623,27 @@ class uiviews extends uical $html .= $indent."\t".'
'.$title."
\n"; - $off = false; // Off-row means a different bgcolor - $add_links = count($daysEvents) == 1; - - // the hour rows - for($i=1; $i < $this->rowsToDisplay; $i++) + if ($this->use_time_grid) { - $currentTime = $this->display_start + (($i-1) * $this->granularity_m); - if($this->wd_start <= $currentTime && $this->wd_end >= $currentTime) + $off = false; // Off-row means a different bgcolor + $add_links = count($daysEvents) == 1; + + // the hour rows + for($i=1; $i < $this->rowsToDisplay; $i++) { - $html .= $indent."\t".'
'."\n"; - $time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$currentTime/60),sprintf('%02d',$currentTime%60)); - if ($add_links) $time = $this->add_link($time,$this->date,(int) ($currentTime/60),$currentTime%60); - $html .= $indent."\t\t".'
'.$time."
\n"; - $html .= $indent."\t
\n"; // calTimeRow - $off = !$off; + $currentTime = $this->display_start + (($i-1) * $this->granularity_m); + if($this->wd_start <= $currentTime && $this->wd_end >= $currentTime) + { + $html .= $indent."\t".'
'."\n"; + $time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$currentTime/60),sprintf('%02d',$currentTime%60)); + if ($add_links) $time = $this->add_link($time,$this->date,(int) ($currentTime/60),$currentTime%60); + $html .= $indent."\t\t".'
'.$time."
\n"; + $html .= $indent."\t
\n"; // calTimeRow + $off = !$off; + } } } - if (is_array($daysEvents) && count($daysEvents)) { $numberOfDays = count($daysEvents); @@ -639,9 +653,10 @@ class uiviews extends uical // Lars Kneschke 2005-08-28 // why do we use a div in a div which has the same height and width??? - // To make IE6 happy!!! Whithout the second div you can't use + // To make IE6 happy!!! Without the second div you can't use // style="left: 50px; right: 0px;" - $html .= $indent."\t".'
'."\n"; $dayCol_width = $dayCols_width / count($daysEvents); $n = 0; @@ -703,9 +718,16 @@ class uiviews extends uical $event['end_m'] = 24*60-1; $event['multiday'] = True; } - for($c = 0; $event['start_m'] < $col_ends[$c]; ++$c); + if ($this->use_time_grid) + { + for($c = 0; $event['start_m'] < $col_ends[$c]; ++$c); + $col_ends[$c] = $event['end_m']; + } + else + { + $c = 0; // without grid we only use one column + } $eventCols[$c][] = $event; - $col_ends[$c] = $event['end_m']; } if (count($eventCols)) @@ -739,25 +761,36 @@ class uiviews extends uical $title = $this->html->a_href($title,$day_view,'', !isset($this->holidays[$day_ymd])?' title="'.lang('Dayview').'"':''); } + elseif ($short_title === false) + { + // add arrows to go to the previous and next day (dayview only) + $day_view['date'] = $this->bo->date2string($ts -= 12*HOUR_s); + $title = $this->html->a_href($this->html->image('phpgwapi','left',$this->bo->long_date($ts)),$day_view).'   '.$title; + $day_view['date'] = $this->bo->date2string($ts += 48*HOUR_s); + $title .= '   '.$this->html->a_href($this->html->image('phpgwapi','right',$this->bo->long_date($ts)),$day_view); + } $this->_day_class_holiday($day_ymd,$class,$holidays); // the weekday and date $html .= $indent."\t".'
'. $title.(!$short_title && $holidays ? ': '.$holidays : '')."
\n"; - // adding divs to click on for each row / time-span - for($counter = 1; $counter < $this->rowsToDisplay; $counter++) + if ($this->use_time_grid) { - //print "$counter - ". $counter*$this->rowHeight ."
"; - $linkData = array( - 'menuaction' =>'calendar.uiforms.edit', - 'date' => $day_ymd, - 'hour' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))/60), - 'minute' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))%60), - ); - if ($owner) $linkData['owner'] = $owner; - - $html .= $indent."\t".'
'."\n"; + // adding divs to click on for each row / time-span + for($counter = 1; $counter < $this->rowsToDisplay; $counter++) + { + //print "$counter - ". $counter*$this->rowHeight ."
"; + $linkData = array( + 'menuaction' =>'calendar.uiforms.edit', + 'date' => $day_ymd, + 'hour' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))/60), + 'minute' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))%60), + ); + if ($owner) $linkData['owner'] = $owner; + + $html .= $indent."\t".'
'."\n"; + } } // displaying all event columns of the day foreach($eventCols as $n => $eventCol) @@ -834,7 +867,8 @@ class uiviews extends uical { if ($this->debug > 1 || $this->debug==='eventColWidget') $this->bo->debug_message('uiviews::eventColWidget(%1,left=%2,width=%3,)',False,$events,$left,$width); - $html = $indent.'
'."\n"; + $html = $indent.'
'."\n"; foreach($events as $event) { $html .= $this->eventWidget($event,$width,$indent."\t"); @@ -917,15 +951,17 @@ class uiviews extends uical { $participants .= $this->add_nonempty($participant,$part_group,True); } + // as we only deal with percentual widht, we consider only the full dayview (1 colum) as NOT small + $small = $this->view != 'day' || $width < 50; + // $small = $width <= $small_trigger_width $tpl->set_var(array( // event-content, some of it displays only if it really has content or is needed - 'header_icons' => $width > $small_trigger_width ? implode("",$icons) : '', - 'body_icons' => $width > $small_trigger_width ? '' : implode("\n",$icons), + 'header_icons' => $small ? '' : implode("",$icons), + 'body_icons' => $small ? implode("\n",$icons) : '', 'icons' => implode("\n",$icons), - 'timespan' => $timespan, - 'header' => !$is_private ? $this->html->htmlspecialchars($event['title']) : lang('private'), // $timespan, - 'title' => !$is_private ? $this->html->htmlspecialchars($event['title']) : lang('private'), + 'timespan' => $small ? str_replace(' ','',$timespan) : $timespan, + 'title' => !$is_private ? $this->html->htmlspecialchars($event['title']).$width : lang('private'), 'description' => !$is_private ? nl2br($this->html->htmlspecialchars($event['description'])) : '', 'location' => !$is_private ? $this->add_nonempty($event['location'],lang('Location')) : '', 'participants' => $participants, @@ -950,8 +986,7 @@ class uiviews extends uical 'bodybackground' => 'url('.$GLOBALS['egw_info']['server']['webserver_url']. '/calendar/inc/gradient.php?color1='.urlencode($bodybgcolor1).'&color2='.urlencode($bodybgcolor2). '&width='.$width.') repeat-y '.$bodybgcolor2, - 'Small' => $width > $small_trigger_width ? '' : 'Small', // to use in css class-names - // otherwise a click in empty parts of the event, will "click through" and create a new event + 'Small' => $small ? 'Small' : '', // to use in css class-names )); foreach(array( 'upper_left'=>array('width'=>-$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor), @@ -990,8 +1025,16 @@ class uiviews extends uical $this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). ' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n"; } - return $indent.'
'."\n".$ie_fix.$html.$indent."
\n"; + if ($this->use_time_grid) + { + $style = 'top: '.$this->time2pos($event['start_m']).'%; height: '.$height.'%;'; + } + else + { + $style = 'position: relative;'; + } + return $indent.'
'."\n".$ie_fix.$html.$indent."
\n"; } function add_nonempty($content,$label,$one_per_line=False) diff --git a/calendar/inc/hook_settings.inc.php b/calendar/inc/hook_settings.inc.php index 87bf698426..3eefae9342 100644 --- a/calendar/inc/hook_settings.inc.php +++ b/calendar/inc/hook_settings.inc.php @@ -25,6 +25,11 @@ 'planner_user' => lang('Planner by user'), 'listview' => lang('Listview'), ); + $grid_views = array( + '' => lang('Dayview').', '.lang('Weekview').' & '.lang('Monthview'), + 'day_week' => lang('Dayview').' & '.lang('Weekview'), + 'day' => lang('Dayview'), + ); /* Select list with number of day by week */ $week_view = array( '5' => lang('Weekview without weekend'), @@ -149,6 +154,84 @@ 'xmlrpc' => True, 'admin' => False ), + 'show_rejected' => array( + 'type' => 'check', + 'label' => 'Show invitations you rejected', + 'name' => 'show_rejected', + 'help' => 'Should invitations you rejected still be shown in your calendar ?
You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!' + ), + 'weekdaystarts' => array( + 'type' => 'select', + 'label' => 'weekday starts on', + 'name' => 'weekdaystarts', + 'values' => $weekdaystarts, + 'help' => 'This day is shown as first day in the week or month view.', + 'xmlrpc' => True, + 'admin' => False + ), + 'workdaystarts' => array( + 'type' => 'select', + 'label' => 'work day starts on', + 'name' => 'workdaystarts', + 'values' => $times, + 'help' => 'This defines the start of your dayview. Events before this time, are shown above the dayview.
This time is also used as a default starttime for new events.', + 'xmlrpc' => True, + 'admin' => False + ), + 'workdayends' => array( + 'type' => 'select', + 'label' => 'work day ends on', + 'name' => 'workdayends', + 'values' => $times, + 'help' => 'This defines the end of your dayview. Events after this time, are shown below the dayview.', + 'xmlrpc' => True, + 'admin' => False + ), + 'use_time_grid' => array( + 'type' => 'select', + 'label' => 'Views with fixed time intervals', + 'name' => 'use_time_grid', + 'values' => $grid_views, + 'help' => 'For which views should calendar show distinct lines with a fixed time interval.', + 'xmlrpc' => True, + 'admin' => False + ), + 'interval' => array( + 'type' => 'select', + 'label' => 'Length of the time interval', + 'name' => 'interval', + 'values' => $intervals, + 'help' => 'How many minutes should each interval last?', + 'xmlrpc' => True, + 'admin' => False + ), + 'defaultlength' => array( + 'type' => 'input', + 'label' => 'default appointment length (in minutes)', + 'name' => 'defaultlength', + 'help' => 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.', + 'default' => '', + 'size' => 3, + 'xmlrpc' => True, + 'admin' => False + ), + 'planner_start_with_group' => array( + 'type' => 'select', + 'label' => 'Preselected group for entering the planner', + 'name' => 'planner_start_with_group', + 'values' => $options, + 'help' => 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.', + 'xmlrpc' => True, + 'admin' => False + ), + 'default_private' => array( + 'type' => 'check', + 'label' => 'Set new events to private', + 'name' => 'default_private', + 'help' => 'Should new events created as private by default ?', + 'xmlrpc' => True, + 'admin' => False + ), 'receive_updates' => array( 'type' => 'select', 'label' => 'Receive email updates', @@ -244,86 +327,6 @@ 'xmlrpc' => True, 'admin' => False ), - 'show_rejected' => array( - 'type' => 'check', - 'label' => 'Show invitations you rejected', - 'name' => 'show_rejected', - 'help' => 'Should invitations you rejected still be shown in your calendar ?
You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!' - ), - 'weekdaystarts' => array( - 'type' => 'select', - 'label' => 'weekday starts on', - 'name' => 'weekdaystarts', - 'values' => $weekdaystarts, - 'help' => 'This day is shown as first day in the week or month view.', - 'xmlrpc' => True, - 'admin' => False - ), - 'workdaystarts' => array( - 'type' => 'select', - 'label' => 'work day starts on', - 'name' => 'workdaystarts', - 'values' => $times, - 'help' => 'This defines the start of your dayview. Events before this time, are shown above the dayview.
This time is also used as a default starttime for new events.', - 'xmlrpc' => True, - 'admin' => False - ), - 'workdayends' => array( - 'type' => 'select', - 'label' => 'work day ends on', - 'name' => 'workdayends', - 'values' => $times, - 'help' => 'This defines the end of your dayview. Events after this time, are shown below the dayview.', - 'xmlrpc' => True, - 'admin' => False - ), - 'interval' => array( - 'type' => 'select', - 'label' => 'Intervals in day view', - 'name' => 'interval', - 'values' => $intervals, - 'help' => 'Defines the size in minutes of the lines in the day view.', - 'xmlrpc' => True, - 'admin' => False - ), - 'defaultlength' => array( - 'type' => 'input', - 'label' => 'default appointment length (in minutes)', - 'name' => 'defaultlength', - 'help' => 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.', - 'default' => '', - 'size' => 3, - 'xmlrpc' => True, - 'admin' => False - ), - 'planner_start_with_group' => array( - 'type' => 'select', - 'label' => 'Preselected group for entering the planner', - 'name' => 'planner_start_with_group', - 'values' => $options, - 'help' => 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.', - 'xmlrpc' => True, - 'admin' => False - ), -/* dont think that default is realy necessary -- RalfBecker 2005/11/12 - 'defaultfilter' => array( - 'type' => 'select', - 'label' => 'Default calendar filter', - 'name' => 'defaultfilter', - 'values' => $defaultfilter, - 'help' => 'Which events do you want to see when you enter the calendar.', - 'xmlrpc' => True, - 'admin' => False - ), -*/ - 'default_private' => array( - 'type' => 'check', - 'label' => 'Set new events to private', - 'name' => 'default_private', - 'help' => 'Should new events created as private by default ?', - 'xmlrpc' => True, - 'admin' => False - ), /* disabled free/busy stuff til it gets rewritten with new Horde iCal classes -- RalfBecker 2006/03/03 'freebusy' => array( 'type' => 'check', diff --git a/calendar/setup/phpgw_de.lang b/calendar/setup/phpgw_de.lang index 0968f333f8..544c87551e 100644 --- a/calendar/setup/phpgw_de.lang +++ b/calendar/setup/phpgw_de.lang @@ -63,7 +63,6 @@ default calendar filter calendar de Standard-Filter des Kalenders default calendar view calendar de Standard-Ansicht des Kalenders default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar de Vorgabe für die Länge von neuen Kalendareinträgen. Die Länge ist in Minuten, zb. 60 für 1 Stunde. default week view calendar de Vorgabe Wochenansicht -defines the size in minutes of the lines in the day view. calendar de Bestimmt die Zeitskala in Minuten der Tagesansicht des Kalendars. delete series calendar de Serie löschen delete this alarm calendar de Diesen Alarm löschen delete this event calendar de Diesen Termin löschen @@ -113,6 +112,7 @@ filename of the download calendar de Name der herunterzuladenden Datei find free timeslots where the selected participants are availible for the given timespan calendar de Such freie Zeitslots an denen die ausgewählten Teilnehmer für die gegebene Zeitspanne verfügbar sind firstname of person to notify calendar de Vorname der zu benachrichtigenden Person for calendar de für +for which views should calendar show distinct lines with a fixed time interval. calendar de Für welche Ansichten soll der Kalender einzelne Zeilen mit festen Zeitintervallen anzeigen. format of event updates calendar de Format der Benachrichtigungen forward half a month calendar de einen halben Monat weiter forward one month calendar de einen Monat weiter @@ -135,6 +135,7 @@ holiday management calendar de Feiertagsverwaltung holidays calendar de Feiertage hours calendar de Stunden how far to search (from startdate) calendar de wie weit suchen (vom Startdatum) +how many minutes should each interval last? calendar de Wie viele Minute soll jedes Interval dauern? ical calendar de iCal ical / rfc2445 calendar de iCal / RFC2445 ical export calendar de iCal Export @@ -145,12 +146,12 @@ if checked holidays falling on a weekend, are taken on the monday after. calenda if you dont set a password here, the information is available to everyone, who knows the url!!! calendar de Wenn Sie hier kein Passwort angeben, ist die Information für jeden verfügbar, der die Adresse (URL) kennt!!! ignore conflict calendar de Konflikt ignorieren import calendar de Importieren -import csv-file calendar de CSV-Datei importieren +import csv-file common de CSV-Datei importieren interval calendar de Intervall -intervals in day view calendar de Zeitintervalle in der Tagesansicht invalid email-address "%1" for user %2 calendar de Ungültige Email-Adresse "%1" für Benutzer %2 last calendar de letzte lastname of person to notify calendar de Nachname der zu benachrichtigenden Person +length of the time interval calendar de Länge des Zeitintervals link to view the event calendar de Verweis (Weblink) um den Termin anzuzeigen links calendar de Verknüpfungen links, attachments calendar de Verknüpfungen, Dateianhänge @@ -280,6 +281,7 @@ updated calendar de Aktualisiert use end date calendar de Enddatum benutzen use the selected time and close the popup calendar de benutzt die ausgewählte Zeit und schließt das Popup view this event calendar de Diesen Termin anzeigen +views with fixed time intervals calendar de Ansichten mit festen Zeitintervallen wed calendar de Mi week calendar de Woche weekday starts on calendar de Arbeitswoche beginnt am diff --git a/calendar/setup/phpgw_en.lang b/calendar/setup/phpgw_en.lang index c9b806e7fb..faa59e3939 100644 --- a/calendar/setup/phpgw_en.lang +++ b/calendar/setup/phpgw_en.lang @@ -63,7 +63,6 @@ default calendar filter calendar en Default calendar filter default calendar view calendar en default calendar view default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar en Default length of newly created events. The length is in minutes, eg. 60 for 1 hour. default week view calendar en default week view -defines the size in minutes of the lines in the day view. calendar en Defines the size in minutes of the lines in the day view. delete series calendar en Delete series delete this alarm calendar en Delete this alarm delete this event calendar en Delete this event @@ -113,6 +112,7 @@ filename of the download calendar en Filename of the download find free timeslots where the selected participants are availible for the given timespan calendar en Find free timeslots where the selected participants are availible for the given timespan firstname of person to notify calendar en Firstname of person to notify for calendar en for +for which views should calendar show distinct lines with a fixed time interval. calendar en For which views should calendar show distinct lines with a fixed time interval. format of event updates calendar en Format of event updates forward half a month calendar en forward half a month forward one month calendar en forward one month @@ -135,6 +135,7 @@ holiday management calendar en Holiday Management holidays calendar en Holidays hours calendar en hours how far to search (from startdate) calendar en how far to search (from startdate) +how many minutes should each interval last? calendar en How many minutes should each interval last? ical calendar en iCal ical / rfc2445 calendar en iCal / rfc2445 ical export calendar en iCal Export @@ -147,10 +148,10 @@ ignore conflict calendar en Ignore conflict import calendar en Import import csv-file common en Import CSV-File interval calendar en Interval -intervals in day view calendar en Intervals in day view invalid email-address "%1" for user %2 calendar en Invalid email-address "%1" for user %2 last calendar en Last lastname of person to notify calendar en Lastname of person to notify +length of the time interval calendar en Length of the time interval link to view the event calendar en Link to view the event links calendar en Links links, attachments calendar en Links, Attachments @@ -173,7 +174,6 @@ no filter calendar en No filter no matches found calendar en no matches found no response calendar en No response non blocking calendar en non blocking -not calendar en not notification messages for added events calendar en Notification messages for added events notification messages for canceled events calendar en Notification messages for canceled events notification messages for disinvited participants calendar en Notification messages for disinvited participants @@ -246,7 +246,6 @@ show list of upcoming events calendar en show list of upcoming events show this month calendar en show this month show this week calendar en show this week single event calendar en single event -site configuration calendar en site configuration start calendar en Start start date/time calendar en Start Date/Time startdate / -time calendar en Startdate / -time @@ -282,6 +281,7 @@ updated calendar en Updated use end date calendar en use end date use the selected time and close the popup calendar en use the selected time and close the popup view this event calendar en View this event +views with fixed time intervals calendar en Views with fixed time intervals wed calendar en Wed week calendar en Week weekday starts on calendar en weekday starts on diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 8d71c5760e..c3f529122b 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -4,6 +4,30 @@ * CSS settings for the day, week and month view (timeGridWidget) * ******************************************************************/ +/* +Names used in the "graphic" are the css classes from this file. +The function names in class uiviews have the leading cal removed and a trailing Widget added: +e.g. the div with class calTimeGrid is generated by the timeGridWidget method of uiviews. + ++++ calTimeGrid +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ #### calDayCols[12h|NoGrip] ########################################################### ++ #... calDayCol ............................. ... calDayCol .......................... ++ #.+- calDayColHeader ---------------------+. .+- calDayColHeader ------------------+. ++ #.| |. .| |. ++ #.+---------------------------------------+. .+------------------------------------+. ++.calTimeRowTime.#.** calEventCol ***** ** calEventCol *****. .** calEventCol ***********************. ++. .#.* * * *. .* *. ++. .#.* * * *. .* *. ++................#.*+- calEvent -----+* * *. .* *. ++.calTimeRowTime.#.*| |* * *. .*+- calEvent[Private] --------------+*. ++. .#.*| |* *+- calEvent -----+*. .*| |*. ++. .#.*+----------------+* *| |*. .*| |*. ++................#.* * *| |*. .*| |*. ++.calTimeRowTime.#.* * *+----------------+*. .*| |*. ++. .#.* * * *. .*+----------------------------------+*. + +*/ + .redItalic { color: red; font-style: italic; } .size120b { font-size: 120%; font-weight: bold; } @@ -65,10 +89,10 @@ /* contains (multiple) dayCol's */ -.calDayCols,.calDayCols12h{ +.calDayCols,.calDayCols12h,.calDayColsNoGrid{ position: absolute; top: 0px; - height: 100%; + bottom: 0px; left: 45px; right: 0px; } @@ -77,6 +101,11 @@ .calDayCols12h{ left: 65px; } +/* no time grid --> no time column + */ +.calDayColsNoTime{ + left: 0px; +} /* contains (multiple) eventCol's */ @@ -146,7 +175,7 @@ .calEventCol{ position: absolute; top: 0px; - height: 100%; + bottom: 0px; /* set via inline style on runtime: * left: * width: @@ -189,11 +218,10 @@ */ .calEventHeader,.calEventHeaderSmall{ font-weight: bold; - font-size: 10pt; + font-size: 9pt; background-color: #0000ff; color: white; - text-align: center; - white-space: nowrap; + text-align: left; } .calEventHeaderSmall{ font-size: 8pt; diff --git a/calendar/templates/default/event_widget.tpl b/calendar/templates/default/event_widget.tpl index 020b6a674c..d7defe7a3e 100644 --- a/calendar/templates/default/event_widget.tpl +++ b/calendar/templates/default/event_widget.tpl @@ -1,27 +1,30 @@ - +
- +
{header_icons} {header} + {icons} {timespan} +
-

{body_icons}
- {title}

+ {title}
- +
- + -
{header_icons} {header} + {icons} {timespan} +
-

{body_icons} +

+

{title}
{description}

{times} From 7690dd10f7182321ac036a2513aa01afa00f3f7f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 01:55:13 +0000 Subject: [PATCH 027/176] fixed smal prob with non existing header --- setup/inc/functions.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index 896efdfa37..62ce9f87c0 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -39,6 +39,8 @@ define('EGW_INCLUDE_ROOT','..'); define('PHPGW_SERVER_ROOT','..'); define('PHPGW_INCLUDE_ROOT','..'); + + define('EGW_API_INC',EGW_SERVER_ROOT.'/phpgwapi/inc'); } require(EGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php'); From ecae41f1566839d784409ca13960a4ae180bee7f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 01:58:03 +0000 Subject: [PATCH 028/176] fixed smal prob with non existing header --- phpgwapi/inc/class.translation.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.translation.inc.php b/phpgwapi/inc/class.translation.inc.php index 0f1e66282b..2149422c4e 100644 --- a/phpgwapi/inc/class.translation.inc.php +++ b/phpgwapi/inc/class.translation.inc.php @@ -61,7 +61,7 @@ $this->placeholders[] = '%'.$i; } $this->db = is_object($GLOBALS['egw']->db) ? $GLOBALS['egw']->db : $GLOBALS['egw_setup']->db; - $this->db->set_app('phpgwapi'); + if (is_object($this->db)) $this->db->set_app('phpgwapi'); if (!isset($GLOBALS['egw_setup'])) { From 478c9ab8e22ead82ab2a2efa032bab3a861578c4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 31 May 2006 17:21:25 +0000 Subject: [PATCH 029/176] fixed not working --config (after last changes) and added output of (basic) current config --- setup/inc/class.setup_translation.inc.php | 2 +- setup/lang/phpgw_de.lang | 4 ++- setup/lang/phpgw_en.lang | 4 ++- setup/setup-cli.php | 35 +++++++++++++++++------ 4 files changed, 33 insertions(+), 12 deletions(-) diff --git a/setup/inc/class.setup_translation.inc.php b/setup/inc/class.setup_translation.inc.php index 6eff5f1e6c..14c1428ac2 100644 --- a/setup/inc/class.setup_translation.inc.php +++ b/setup/inc/class.setup_translation.inc.php @@ -99,7 +99,7 @@ function setup_translation_sql() { - if (!is_object($this->sql)) + if (!is_object($this->sql) || is_object($GLOBALS['egw_setup']->db) && !is_object($this->sql->db)) { include_once(EGW_API_INC.'/class.translation.inc.php'); $this->sql =& new translation; diff --git a/setup/lang/phpgw_de.lang b/setup/lang/phpgw_de.lang index 8751e47d3c..29e58f3d2d 100644 --- a/setup/lang/phpgw_de.lang +++ b/setup/lang/phpgw_de.lang @@ -118,6 +118,7 @@ completed setup de Abgeschlossen config password setup de Konfigurationspasswort config username setup de Konfigurationsbenutzername configuration setup de Konfiguration +configuration changed. setup de Konfiguration geändert. configuration completed setup de Konfiguration abgeschlossen configuration errors: setup de Fehler in der Konfiguration; configuration password setup de Konfigurationspasswort @@ -145,6 +146,7 @@ created setup de erzeugt created header.inc.php! setup de header.inc.php erzeugt! creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup de anlegen eines Administrator Benutzers: Domain(default),[Konfigurationsbenutzer(admin)],Passwort,Benutzername,Passwort,[Vorname],[Nachname],[Email Adresse] creating tables setup de Erstelle Tabellen +current configuration: setup de Aktuelle Konfiguration: current system-charset setup de Aktueller Systemzeichensatz current system-charset is %1. setup de Aktueller Systemzeichensatz ist %1. current version setup de Gegenwärtige Version @@ -542,7 +544,7 @@ unfortunally some php/apache packages have problems with it (apache dies and you uninstall setup de deinstaliert uninstall all applications setup de Alle Anwendungen deinstallieren uninstalled setup de nicht installiert -unknow option '%1' !!! setup de Unbekannte Option '%1' !!! +unknown option '%1' !!! setup de Unbekannte Option '%1' !!! update finished. setup de Aktualisierung beendet. upgrade setup de Aktualisieren upgrade all setup de Alle Aktualiseren diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index df99531cba..044a49d1e1 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -118,6 +118,7 @@ completed setup en Completed config password setup en Config Password config username setup en Config Username configuration setup en Configuration +configuration changed. setup en Configuration changed. configuration completed setup en Configuration completed configuration errors: setup en Configuration errors: configuration password setup en Configuration Password @@ -145,6 +146,7 @@ created setup en created created header.inc.php! setup en Created header.inc.php! creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] setup en creates an admin user: domain(default),[config user(admin)],password,username,password,[first name],[last name],[email] creating tables setup en Creating Tables +current configuration: setup en Current configuration: current system-charset setup en Current system-charset current system-charset is %1. setup en Current system-charset is %1. current version setup en Current Version @@ -540,7 +542,7 @@ unfortunally some php/apache packages have problems with it (apache dies and you uninstall setup en uninstall uninstall all applications setup en Uninstall all applications uninstalled setup en uninstalled -unknow option '%1' !!! setup en Unknow option '%1' !!! +unknown option '%1' !!! setup en Unknown option '%1' !!! update finished. setup en Update finished. upgrade setup en Upgrade upgrade all setup en Upgrade All diff --git a/setup/setup-cli.php b/setup/setup-cli.php index 7dd4a16779..709fe50a60 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -98,7 +98,7 @@ switch($action) break; default: - fail(90,lang("Unknows option '%1' !!!",$action)); + fail(90,lang("Unknown option '%1' !!!",$action)); } exit(0); @@ -133,7 +133,7 @@ function do_config($args) ); while (($arg = array_shift($args))) { - if (!isset($config[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg)); + if (!isset($config[$arg])) fail(90,lang("Unknown option '%1' !!!",$arg)); foreach(explode(',',array_shift($args)) as $n => $value) { @@ -157,6 +157,19 @@ function do_config($args) 'config_name' => $name, ),__LINE__,__FILE__); } + if (count($values)) + { + echo lang('Configuration changed.')."\n"; + } + echo lang('Current configuration:')."\n"; + $GLOBALS['egw_setup']->db->select($GLOBALS['egw_setup']->config_table,'config_name,config_value',array( + 'config_app' => 'phpgwapi', + "config_name LIKE '%\\_dir' OR (config_name LIKE 'mail%' AND config_name != 'mail_footer') OR config_name LIKE 'smtp%' OR config_name IN ('webserver_url','system_charset')", + ),__LINE__,__FILE__); + while (($row = $GLOBALS['egw_setup']->db->row(true))) + { + echo $row['config_name'].': '.$row['config_value']."\n"; + } } /** @@ -283,7 +296,7 @@ function do_lang($arg) { global $setup_info; - list($domain,,,$no_backup) = $options = explode(',',$arg); + list($domain) = $options = explode(',',$arg); $domains = $GLOBALS['egw_domain']; if ($domain && $domain != 'all') @@ -295,7 +308,7 @@ function do_lang($arg) $options[0] = $domain; $arg = implode(',',$options); - $langs = _check_auth_config($arg,15); + $langs = _check_auth_config($arg,15,false); // false = leave eGW's charset, dont set ours!!! $GLOBALS['egw_setup']->translation->setup_translation_sql(); @@ -335,9 +348,10 @@ function do_lang($arg) * * @param string $arg [domain(default)],[user(admin)],password * @param int $stop see do_check() + * @param boolean $set_lang=true set our charset, overwriting the charset of the eGW installation, default true * @return array with unprocessed arguments from $arg */ -function _check_auth_config($arg,$stop=15) +function _check_auth_config($arg,$stop,$set_lang=true) { $options = explode(',',$arg); if (!($domain = array_shift($options))) $domain = 'default'; @@ -352,6 +366,9 @@ function _check_auth_config($arg,$stop=15) } } do_check($domain,$stop); // check if eGW is installed + + // reset charset for the output to the charset used by the OS + if ($set_lang) $GLOBALS['egw_setup']->system_charset = $GLOBALS['charset']; //echo "check_auth('$user','$password','{$GLOBALS['egw_domain'][$domain]['config_user']}','{$GLOBALS['egw_domain'][$domain]['config_passwd']}')\n"; if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_domain'][$domain]['config_user'], @@ -422,7 +439,7 @@ function do_check($domain='',$stop=0) { global $setup_info; static $header_checks=true; // output the header checks only once - + if ($stop && !is_array($stop)) $stop = array($stop); $versions =& $GLOBALS['egw_info']['server']['versions']; @@ -518,7 +535,7 @@ function do_check($domain='',$stop=0) echo lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver'])."\n"; $GLOBALS['egw_setup']->detection->check_config(); - if ($GLOBALS['egw_info']['setup']['config_errors'] && $stop != 15) + if ($GLOBALS['egw_info']['setup']['config_errors'] && !in_array(15,$stop)) { fail(15,lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors'])); } @@ -639,7 +656,7 @@ function do_header($create,&$arguments) continue; } - if (!isset($options[$arg])) fail(90,lang("Unknow option '%1' !!!",$arg)); + if (!isset($options[$arg])) fail(90,lang("Unknown option '%1' !!!",$arg)); $option = $options[$arg]; $values = !is_array($option) ? array($values) : explode(',',$values); @@ -734,7 +751,7 @@ function _set_value(&$arr,$index,$name,$value) */ function get_lang(&$charset) { - list($lang,$nation,$charset) = split("[_.]",strtolower($_SERVER['LANG'])); + @list($lang,$nation,$charset) = split("[_.]",strtolower($_SERVER['LANG'])); foreach(file('lang/languages') as $line) { From 208a3759287a394377468b836aa197f48fb0e0c7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 1 Jun 2006 03:48:06 +0000 Subject: [PATCH 030/176] fixed not shown images, if eGW is installed in the document root, with webserver_url empty --- phpgwapi/inc/class.html.inc.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index d0c414b63a..2ffca429cd 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -876,11 +876,17 @@ class html { $url = $name; // name may already contain absolut path } - if(!$GLOBALS['egw_info']['server']['webserver_url']) + if($GLOBALS['egw_info']['server']['webserver_url']) { - $base_path = "./"; + list(,$path) = explode($GLOBALS['egw_info']['server']['webserver_url'],$url); + $path = EGW_SERVER_ROOT.$path; } - if (!@is_readable($base_path . str_replace($GLOBALS['egw_info']['server']['webserver_url'],PHPGW_SERVER_ROOT,$url))) + else + { + $path = EGW_SERVER_ROOT.$url; + } + + if (!@is_readable($path)) { // if the image-name is a percentage, use a progressbar if (substr($name,-1) == '%' && is_numeric($percent = substr($name,0,-1))) From 5fa113916ec4cc786a7aeadda3f68a598feb3475 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 1 Jun 2006 03:53:07 +0000 Subject: [PATCH 031/176] fixed not working --webserver-url option, it even sets empty URL for eGW installed in the docroot now --- setup/setup-cli.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/setup-cli.php b/setup/setup-cli.php index 709fe50a60..45896a5727 100755 --- a/setup/setup-cli.php +++ b/setup/setup-cli.php @@ -137,9 +137,9 @@ function do_config($args) foreach(explode(',',array_shift($args)) as $n => $value) { - if ($value === '') continue; + if ($value === '' && is_array($config[$arg])) continue; - $name = $config[$arg][$n]; + $name = is_array($config[$arg]) || $n ? $config[$arg][$n] : $config[$arg]; if (is_array($name)) { if (!in_array($value,$name['allowed'])) fail(91,"'%1' is not allowed as %2. arguments of option %3 !!!",$value,1+$n,$arg); @@ -576,8 +576,8 @@ function do_header($create,&$arguments) $password = trim(fgets($f = fopen('php://stdin','rb'))); fclose($f); } - $options[0] = $user; - $options[1] = $password; + $options[0] = $password; + $options[1] = $user; $arguments[0] = implode(',',$options); if (!$GLOBALS['egw_setup']->check_auth($user,$password,$GLOBALS['egw_info']['server']['header_admin_user'], From 3648a0eb9e3877d216e711cff73be777886f20d5 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 1 Jun 2006 13:25:16 +0000 Subject: [PATCH 032/176] removed double encoding --- calendar/inc/class.boical.inc.php | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/calendar/inc/class.boical.inc.php b/calendar/inc/class.boical.inc.php index 5d21b8f507..794791e98f 100644 --- a/calendar/inc/class.boical.inc.php +++ b/calendar/inc/class.boical.inc.php @@ -376,21 +376,23 @@ $vcardData = array('recur_type' => 0); // lets see what we can get from the vcard - foreach($component->_attributes as $attributes) + foreach($component->_attributes as $attributes) { - $attributes['value'] = $GLOBALS['egw']->translation->convert($attributes['value'],'UTF-8'); - //echo "$attributes[name] = '$attributes[value]'
\n"; - - switch($attributes['name']) + switch($attributes['name']) { case 'AALARM': case 'DALARM': - if (preg_match('/.*Z$/',$attributes['value'],$matches)) - { + if (preg_match('/.*Z$/',$attributes['value'],$matches)) { $alarmTime = $vcal->_parseDateTime($attributes['value']); $alarms[$alarmTime] = array( 'time' => $alarmTime ); + } elseif (preg_match('/(........T......);;;$/',$attributes['value'],$matches)) { + #error_log(print_r($matches,true)); + $alarmTime = $vcal->_parseDateTime($matches[1]); + $alarms[$alarmTime] = array( + 'time' => $alarmTime + ); } break; case 'CLASS': @@ -620,11 +622,9 @@ { $event['participants'] = array($GLOBALS['egw_info']['user']['account_id'] => 'A'); } - #foreach($event as $key => $value) - #{ - # error_log("KEY: $key VALUE: $value"); - #} - #echo "event=";_debug_array($event);exit; + + #error_log('ALARMS'); + #error_log(print_r($alarms,true)); if (!($Ok = $this->update($event, TRUE))) { break; // stop with the first error @@ -755,9 +755,6 @@ // lets see what we can get from the vcard foreach($component->_attributes as $attributes) { - $attributes['value'] = $GLOBALS['egw']->translation->convert($attributes['value'],'UTF-8'); - //echo "$attributes[name] = '$attributes[value]'
\n"; - switch($attributes['name']) { case 'AALARM': @@ -1012,6 +1009,7 @@ unset($event['end']); foreach($event as $key => $value) { + error_log("$key => $value"); if (substr($key,0,6) != 'recur_') { $search['query']['cal_'.$key] = $value; } else { From 31d02fcbf530e2fd7e611039fc6301046c0c7399 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 1 Jun 2006 13:28:08 +0000 Subject: [PATCH 033/176] SyncML fixes --- infolog/inc/class.sifinfolog.inc.php | 20 +++++--------------- infolog/inc/class.vcalinfolog.inc.php | 2 +- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/infolog/inc/class.sifinfolog.inc.php b/infolog/inc/class.sifinfolog.inc.php index 165ff0b29f..38dc495189 100644 --- a/infolog/inc/class.sifinfolog.inc.php +++ b/infolog/inc/class.sifinfolog.inc.php @@ -184,7 +184,6 @@ } function addSIF($_sifData, $_id, $_sifType) { - if(!$egwData = $this->siftoegw($_sifData, $_sifType)) { return false; } @@ -258,18 +257,10 @@ break; } } - - $sifTask .= '1 - 1 - 0 - 0 - 4 - 0 - 20060320T230000Z - 1 - - 10'; - #error_log($sifTask); + + $sifTask .= '00'; + return base64_encode($sifTask); + /* return base64_encode(" 0 @@ -302,8 +293,7 @@ 10 - ");*/ - return base64_encode($sifTask); + "); */ } break; diff --git a/infolog/inc/class.vcalinfolog.inc.php b/infolog/inc/class.vcalinfolog.inc.php index 3118c93d26..8e4d3972cc 100644 --- a/infolog/inc/class.vcalinfolog.inc.php +++ b/infolog/inc/class.vcalinfolog.inc.php @@ -85,7 +85,7 @@ #print "

";
 			#print $vcal->exportvCalendar();
 			#print "
"; - + return $vcal->exportvCalendar(); } From fcbe2e5dd5a41b842681f24a5a6f711c457a4ed2 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 1 Jun 2006 13:38:37 +0000 Subject: [PATCH 034/176] SyncML fixes --- .../SyncML/Command/Sync/ContentSyncElement.php | 13 +++++++++++++ phpgwapi/inc/horde/Horde/SyncML/State_egw.php | 11 +++++++++-- phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php | 3 +++ phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php | 10 ++++++++-- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php b/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php index ffa14efe5d..517bbedb0a 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Command/Sync/ContentSyncElement.php @@ -56,6 +56,11 @@ class Horde_SyncML_Command_Sync_ContentSyncElement extends Horde_SyncML_Command_ $this->_contentType = $c; } + function setContentFormat($_format) + { + $this->_contentFormat = $_format; + } + function getContentType() { return $this->_contentType; @@ -116,6 +121,14 @@ class Horde_SyncML_Command_Sync_ContentSyncElement extends Horde_SyncML_Command_ $output->endElement($state->getURI(), 'LocURI'); $output->endElement($state->getURI(), 'Source'); } + + if(isset($this->_contentFormat)) { + $output->startElement($state->getURI(), 'Meta', $attrs); + $output->startElement($state->getURIMeta(), 'Format', $attrs); + $output->characters($this->_contentFormat); + $output->endElement($state->getURIMeta(), 'Format'); + $output->endElement($state->getURI(), 'Meta'); + } if ($this->_targetURI != null) { $output->startElement($state->getURI(), 'Target', $attrs); diff --git a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php index e1916ac19f..3bfc501d68 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/State_egw.php +++ b/phpgwapi/inc/horde/Horde/SyncML/State_egw.php @@ -309,18 +309,25 @@ class EGW_SyncML_State extends Horde_SyncML_State $mapID = $this->_locName . $this->_sourceURI . $type; + // delete all client id's + $where = array( + 'map_id' => $mapID, + 'map_locuid' => $locid, + ); + $db->delete('egw_contentmap', $where, __LINE__, __FILE__); + + // delete all egw id's $where = array( 'map_id' => $mapID, 'map_guid' => $guid, ); + $db->delete('egw_contentmap', $where, __LINE__, __FILE__); $data = $where + array( 'map_locuid' => $locid, 'map_timestamp' => $ts, 'map_expired' => 0, ); - - $db->delete('egw_contentmap', $where, __LINE__, __FILE__); $db->insert('egw_contentmap', $data, $where, __LINE__, __FILE__); #Horde::logMessage("SyncML: setUID $type, $locid, $guid, $ts $mapID", __FILE__, __LINE__, PEAR_LOG_DEBUG); diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php index 9798adc563..c048196a9d 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/SlowSync.php @@ -73,6 +73,9 @@ class Horde_SyncML_Sync_SlowSync extends Horde_SyncML_Sync_TwoWaySync { // can happen. #LK $cmd->setContent($state->convertServer2Client($c, $contentType)); $cmd->setContent($c); + if($hordeType == 'sifcalendar' || $hordeType == 'sifcontacts' || $hordeType == 'siftasks') { + $cmd->setContentFormat('b64'); + } $cmd->setContentType($contentType['ContentType']); $cmd->setSourceURI($guid); $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Add'); diff --git a/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php b/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php index 384a5c9b72..901cca881e 100644 --- a/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php +++ b/phpgwapi/inc/horde/Horde/SyncML/Sync/TwoWaySync.php @@ -99,11 +99,14 @@ class Horde_SyncML_Sync_TwoWaySync extends Horde_SyncML_Sync { $cmd->setSourceURI($guid); $cmd->setTargetURI($locid); $cmd->setContentType($contentType['ContentType']); + if($hordeType == 'sifcalendar' || $hordeType == 'sifcontacts' || $hordeType == 'siftasks') { + $cmd->setContentFormat('b64'); + } $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Replace'); $state->log('Server-Replace'); // return if we have to much data - if(++$counter >= MAX_ENTRIES && $hordeType != 'sifcalender' && $hordeType != 'sifcontacts' &&$hordeType != 'siftasks') { + if(++$counter >= MAX_ENTRIES && $hordeType != 'sifcalendar' && $hordeType != 'sifcontacts' && $hordeType != 'siftasks') { $state->setSyncStatus(SERVER_SYNC_DATA_PENDING); return $currentCmdID; } @@ -194,13 +197,16 @@ class Horde_SyncML_Sync_TwoWaySync extends Horde_SyncML_Sync { if (!is_a($c, 'PEAR_Error')) { // Item in history but not in database. Strange, but can happen. $cmd->setContent($c); + if($hordeType == 'sifcalendar' || $hordeType == 'sifcontacts' || $hordeType == 'siftasks') { + $cmd->setContentFormat('b64'); + } $cmd->setContentType($contentType['ContentType']); $cmd->setSourceURI($guid); $currentCmdID = $cmd->outputCommand($currentCmdID, $output, 'Add'); $state->log('Server-Add'); // return if we have to much data - if(++$counter >= MAX_ENTRIES && $hordeType != 'sifcalender' && $hordeType != 'sifcontacts' &&$hordeType != 'siftasks') { + if(++$counter >= MAX_ENTRIES && $hordeType != 'sifcalendar' && $hordeType != 'sifcontacts' &&$hordeType != 'siftasks') { $state->setSyncStatus(SERVER_SYNC_DATA_PENDING); return $currentCmdID; } From 3bbd54e12d200bfb1c0c22f9b169be395f56a17f Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 1 Jun 2006 16:27:49 +0000 Subject: [PATCH 035/176] fixed slowsync --- infolog/inc/class.vcalinfolog.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.vcalinfolog.inc.php b/infolog/inc/class.vcalinfolog.inc.php index 8e4d3972cc..ed19bf0e64 100644 --- a/infolog/inc/class.vcalinfolog.inc.php +++ b/infolog/inc/class.vcalinfolog.inc.php @@ -85,7 +85,7 @@ #print "
";
 			#print $vcal->exportvCalendar();
 			#print "
"; - + return $vcal->exportvCalendar(); } @@ -103,7 +103,7 @@ } function searchVTODO($_vcalData) { - if(!$egwData = $this->vtodotoegw($_calData)) { + if(!$egwData = $this->vtodotoegw($_vcalData)) { return false; } From 3660a8f6ad64f13dae1da9afb7db529a9710579b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 1 Jun 2006 20:04:05 +0000 Subject: [PATCH 036/176] fixed bug [ 1497590 ] syncml fails due to excessive session id length --> new version 1.2.102 for the upcomming bugfix release this weekend --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index 9b901af47e..86766479b6 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -14,7 +14,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'eGroupWare API'; - $setup_info['phpgwapi']['version'] = '1.3.005'; + $setup_info['phpgwapi']['version'] = '1.3.006'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -65,3 +65,4 @@ + diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index d48109d3e4..10e0b310a0 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -114,7 +114,7 @@ ), 'egw_access_log' => array( 'fd' => array( - 'sessionid' => array('type' => 'char','precision' => '32','nullable' => False), + 'sessionid' => array('type' => 'char','precision' => '128','nullable' => False), 'loginid' => array('type' => 'varchar','precision' => '64','nullable' => False), 'ip' => array('type' => 'varchar','precision' => '40','nullable' => False), 'li' => array('type' => 'int','precision' => '4','nullable' => False), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 2905c510fb..987fc98b1f 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -46,6 +46,13 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004'; } + $test[] = '1.2.102'; + function phpgwapi_upgrade1_2_102() + { + // 2. 1.2 bugfix-release: egw_accesslog.sessionid is varchar(128) + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.004'; + } + // updates in HEAD / 1.3 $test[] = '1.3.001'; function phpgwapi_upgrade1_3_001() @@ -115,4 +122,17 @@ return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.005'; } + + + $test[] = '1.3.005'; + function phpgwapi_upgrade1_3_005() + { + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_access_log','sessionid',array( + 'type' => 'char', + 'precision' => '128', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.006'; + } ?> From 366f1641831a75add07f232144bcf1ae24b2a783 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Jun 2006 19:38:08 +0000 Subject: [PATCH 037/176] - reworked display of events: + no more redundant information in header and body + header shows left start-time plus duration and right the icons + short events show title + in mozilla events are displayed with nice rounded corners --> IE display is broken at the moment :-( - added (next) Four day view - re-added "classic" 1.0 view with no fixed time intervals (4-day, week & month), configurable via prefs - restructured prefs to show notification stuff at the end --- calendar/inc/class.uical.inc.php | 7 +- calendar/inc/class.uiviews.inc.php | 243 +++++++++++++------- calendar/inc/hook_settings.inc.php | 6 +- calendar/setup/phpgw_ca.lang | 1 + calendar/setup/phpgw_de.lang | 2 + calendar/setup/phpgw_en.lang | 2 + calendar/setup/phpgw_es-es.lang | 1 + calendar/setup/phpgw_eu.lang | 1 + calendar/setup/phpgw_fr.lang | 1 + calendar/setup/phpgw_hu.lang | 1 + calendar/setup/phpgw_it.lang | 1 + calendar/setup/phpgw_lv.lang | 1 + calendar/setup/phpgw_nl.lang | 1 + calendar/setup/phpgw_no.lang | 1 + calendar/setup/phpgw_pt-br.lang | 1 + calendar/setup/phpgw_sl.lang | 1 + calendar/setup/phpgw_zh-tw.lang | 1 + calendar/templates/default/app.css | 35 ++- calendar/templates/default/event_widget.tpl | 52 ++--- 19 files changed, 239 insertions(+), 120 deletions(-) diff --git a/calendar/inc/class.uical.inc.php b/calendar/inc/class.uical.inc.php index f10b1cfcb9..4b78df4de3 100644 --- a/calendar/inc/class.uical.inc.php +++ b/calendar/inc/class.uical.inc.php @@ -516,6 +516,11 @@ class uical 'value' => 'menuaction=calendar.uiviews.day', 'selected' => $this->view == 'day', ), + array( + 'text' => lang('four days view'), + 'value' => 'menuaction=calendar.uiviews.day4', + 'selected' => $this->view == 'day4', + ), array( 'text' => lang('weekview with weekend'), 'value' => 'menuaction=calendar.uiviews.week&days=7', @@ -582,7 +587,7 @@ class uical } $link_vars['menuaction'] = $this->view_menuaction; // stay in the planner } - elseif ($this->view == 'listview') + elseif ($this->view == 'listview' || $view == 'day' && $this->view == 'day4') { $link_vars['menuaction'] = $this->view_menuaction; // stay in the listview } diff --git a/calendar/inc/class.uiviews.inc.php b/calendar/inc/class.uiviews.inc.php index 906accb25d..c41f558d44 100644 --- a/calendar/inc/class.uiviews.inc.php +++ b/calendar/inc/class.uiviews.inc.php @@ -26,47 +26,69 @@ class uiviews extends uical { var $public_functions = array( 'day' => True, + 'day4' => True, 'week' => True, 'month' => True, 'planner' => True, ); + /** - * @var $debug mixed integer level or string function- or widget-name + * integer level or string function- or widget-name + * + * @var mixed $debug */ var $debug=false; /** - * @var minimum width for an event + * minimum width for an event + * + * @var int $eventCol_min_width */ var $eventCol_min_width = 80; /** - * @var int $extraRows extra rows above and below the workday + * extra rows above and below the workday + * + * @var int $extraRows */ var $extraRows = 1; var $timeRow_width = 40; /** - * @var int $rowsToDisplay how many rows per day get displayed, gets set be the timeGridWidget + * how many rows per day get displayed, gets set be the timeGridWidget + * + * @var int $rowsToDisplay */ var $rowsToDisplay; /** - * @var int $rowHeight height in percent of one row, gets set be the timeGridWidget + * height in percent of one row, gets set be the timeGridWidget + * + * @var int $rowHeight */ var $rowHeight; /** - * @var array $search_params standard params for calling bocal::search for all views, set by the constructor + * standard params for calling bocal::search for all views, set by the constructor + * + * @var array $search_params */ var $search_params; /** - * @var boolean $use_time_grid=true should we use a time grid, - * can be set for week- and month-view to false by the cal_pref no_time_grid + * should we use a time grid, can be set for week- and month-view to false by the cal_pref no_time_grid + * + * @var boolean $use_time_grid=true */ var $use_time_grid=true; + + /** + * Can we display the whole day in a timeGrid of the size of the workday and just scroll to workday start + * + * @var boolean $scroll_to_wdstart; + */ + var $scroll_to_wdstart=false; /** * Constructor @@ -80,6 +102,7 @@ class uiviews extends uical $GLOBALS['egw_info']['flags']['nonavbar'] = False; $app_header = array( 'day' => lang('Dayview'), + '4day' => lang('Four days view'), 'week' => lang('Weekview'), 'month' => lang('Monthview'), 'planner' => lang('Group planner'), @@ -274,7 +297,7 @@ class uiviews extends uical $title = lang('Wk').' '.adodb_date('W',$week_start); $title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"'); - $content .= $this->timeGridWidget($week,60,200,'',$title); + $content .= $this->timeGridWidget($week,60,200,'',$title,0,$week_start+WEEK_s >= $this->last); } if (!$home) { @@ -313,6 +336,17 @@ class uiviews extends uical unset($last['raw']); // otherwise date2ts does not calc raw new, but uses it $last = $this->bo->date2ts($last); } + + /** + * Four days view, everythings done by the week-view code ... + * + * @param boolean $home=false if true return content suitable for home-page + * @return string + */ + function day4($home=false) + { + return $this->week(4,$home); + } /** * Displays the weekview, with 5 or 7 days @@ -322,7 +356,8 @@ class uiviews extends uical */ function week($days=0,$home=false) { - $this->use_time_grid = $this->cal_prefs['use_time_grid'] != 'day'; + $this->use_time_grid = $days != 4 && !in_array($this->cal_prefs['use_time_grid'],array('day','day4')) || + $days == 4 && $this->cal_prefs['use_time_grid'] != 'day'; if (!$days) { @@ -337,23 +372,31 @@ class uiviews extends uical } if ($this->debug > 0) $this->bo->debug_message('uiviews::week(days=%1) date=%2',True,$days,$this->date); - $wd_start = $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day); - if ($days == 5) // no weekend-days + if ($days == 4) // next 4 days view { - switch($this->cal_prefs['weekdaystarts']) + $wd_start = $this->first = $this->bo->date2ts($this->date); + $this->last = $this->first + $days * DAY_s - 1; + $GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Four days view').' '.$this->bo->long_date($this->first,$this->last); + } + else + { + $wd_start = $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day); + if ($days == 5) // no weekend-days { - case 'Saturday': - $this->first += DAY_s; - // fall through - case 'Sunday': - $this->first += DAY_s; - break; + switch($this->cal_prefs['weekdaystarts']) + { + case 'Saturday': + $this->first += DAY_s; + // fall through + case 'Sunday': + $this->first += DAY_s; + break; + } } + $this->last = $this->first + $days * DAY_s - 1; + $GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last); } //echo "

weekdaystarts='".$this->cal_prefs['weekdaystarts']."', get_weekday_start($this->year,$this->month,$this->day)=".date('l Y-m-d',$wd_start).", first=".date('l Y-m-d',$this->first)."

\n"; - $this->last = $this->first + $days * DAY_s - 1; - - $GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last); $search_params = array( 'start' => $this->first, @@ -410,8 +453,8 @@ class uiviews extends uical $users = $this->search_params['users']; if (!is_array($users)) $users = array($users); - // for more then 3 users, show all in one row - if (count($users) == 1 || count($users) > 3) + // for more then 5 users, show all in one row + if (count($users) == 1 || count($users) > 5) { $dayEvents =& $this->bo->search($this->search_params); $owner = 0; @@ -430,7 +473,8 @@ class uiviews extends uical $cols = array(); $cols[0] =& $this->timeGridWidget($dayEvents,$this->cal_prefs['interval'],450,'','',$owner); - if (($todos = $this->get_todos($todo_label)) !== false) + // only show todo's for a single user + if (count($users) == 1 && ($todos = $this->get_todos($todo_label)) !== false) { if ($GLOBALS['egw_info']['user']['apps']['infolog']) { @@ -546,6 +590,10 @@ class uiviews extends uical */ function time2pos($time) { + if ($this->scroll_to_wdstart) // we display the complete day - thought only workday is visible without scrolling + { + return $this->rowHeight * (1 + $this->extraRows + $time/$this->granularity_m); + } // time before workday => condensed in the first $this->extraRows rows if ($this->wd_start > 0 && $time < $this->wd_start) { @@ -599,17 +647,30 @@ class uiviews extends uical * @param string $indent='' string for correct indention * @param string $title='' title of the time-grid * @param int/array $owner=0 owner of the calendar (default 0 = $this->owner) or array with owner for each column + * @param boolean $last=true last timeGrid displayed, default true */ - function &timeGridWidget($daysEvents,$granularity_m=30,$height=400,$indent='',$title='',$owner=0) + function &timeGridWidget($daysEvents,$granularity_m=30,$height=400,$indent='',$title='',$owner=0,$last=true) { if ($this->debug > 1 || $this->debug==='timeGridWidget') $this->bo->debug_message('uiviews::timeGridWidget(events=%1,granularity_m=%2,height=%3,,title=%4)',True,$daysEvents,$granularity_m,$height,$title); + // determine if the browser supports scrollIntoView: IE4+, firefox1.0+ and safari2.0+ does + // then show all hours in a div of the size of the workday and scroll to the workday start + // still disabled, as things need to be re-aranged first, to that the column headers are not scrolled + $this->scroll_to_wdstart = false;/*$this->use_time_grid && ($this->html->user_agent == 'msie' || + $this->html->user_agent == 'mozilla' && $this->html->ua_version >= 5.0 || + $this->html->user_agent == 'safari' && $this->html->ua_version >= 2.0);*/ + + if ($this->scroll_to_wdstart) + { + $this->extraRows = 0; // no extra rows necessary + $overflow = 'overflow: scroll;'; + } $this->granularity_m = $granularity_m; $this->display_start = $this->wd_start - ($this->extraRows * $this->granularity_m); $this->display_end = $this->wd_end + ($this->extraRows * $this->granularity_m); - $wd_end = ($this->wd_end === 0 ? 1440 : $this->wd_end); - $totalDisplayMinutes = $wd_end - $this->wd_start; + if (!$this->wd_end) $this->wd_end = 1440; + $totalDisplayMinutes = $this->wd_end - $this->wd_start; $this->rowsToDisplay = ($totalDisplayMinutes/$granularity_m)+2+2*$this->extraRows; $this->rowHeight = round(100/$this->rowsToDisplay,1); @@ -618,7 +679,7 @@ class uiviews extends uical { $height = ($this->rowsToDisplay+1) * 12; } - $html = $indent.'
'."\n"; + $html = $indent.'
'."\n"; $html .= $indent."\t".'
'.$title."
\n"; @@ -629,19 +690,35 @@ class uiviews extends uical $add_links = count($daysEvents) == 1; // the hour rows - for($i=1; $i < $this->rowsToDisplay; $i++) + for($t = $this->scroll_to_wdstart ? 0 : $this->wd_start,$i = 1+$this->extraRows; + $t <= $this->wd_end || $this->scroll_to_wdstart && $t < 24*60; + $t += $this->granularity_m,++$i) { - $currentTime = $this->display_start + (($i-1) * $this->granularity_m); - if($this->wd_start <= $currentTime && $this->wd_end >= $currentTime) + $set_id = ''; + if ($t == $this->wd_start) { - $html .= $indent."\t".'
'."\n"; - $time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$currentTime/60),sprintf('%02d',$currentTime%60)); - if ($add_links) $time = $this->add_link($time,$this->date,(int) ($currentTime/60),$currentTime%60); - $html .= $indent."\t\t".'
'.$time."
\n"; - $html .= $indent."\t
\n"; // calTimeRow - $off = !$off; + list($id) = @each($daysEvents); + $id = 'wd_start_'.$id; + $set_id = ' id="'.$id.'"'; } + $html .= $indent."\t".''."\n"; + // show time for full hours, allways for 45min interval and at least on every 3 row + $time = ''; + static $show = array( + 5 => array(0,15,30,45), + 10 => array(0,30), + 15 => array(0,30), + 45 => array(0,15,30,45), + ); + if (!isset($show[$this->granularity_m]) ? $t % 60 == 0 : in_array($t % 60,$show[$this->granularity_m])) + { + $time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$t/60),sprintf('%02d',$t%60)); + } + if ($add_links) $time = $this->add_link($time,$this->date,(int) ($t/60),$t%60); + $html .= $indent."\t\t".'
'.$time."
\n"; + $html .= $indent."\t
\n"; // calTimeRow + $off = !$off; } } if (is_array($daysEvents) && count($daysEvents)) @@ -657,7 +734,7 @@ class uiviews extends uical // style="left: 50px; right: 0px;" $html .= $indent."\t".'
'."\n"; + '">
'."\n"; $dayCol_width = $dayCols_width / count($daysEvents); $n = 0; foreach($daysEvents as $day => $events) @@ -677,7 +754,16 @@ class uiviews extends uical $html .= $indent."\t
\n"; // calDayCols } $html .= $indent."
\n"; // calTimeGrid - + + if ($this->scroll_to_wdstart) + { + $html .= "\n"; + } return $html; } @@ -730,22 +816,6 @@ class uiviews extends uical $eventCols[$c][] = $event; } - if (count($eventCols)) - { - /* code to overlay the column, not used at the moment - $eventCol_dist = $eventCol_width = round($width / count($eventCols)); - $eventCol_min_width = 80; - if ($eventCol_width < $eventCol_min_width) - { - $eventCol_width = $eventCol_dist = $eventCol_min_width; - if (count($eventCols) > 1) - { - $eventCol_dist = round(($width - $eventCol_min_width) / (count($eventCols)-1)); - } - }*/ - $eventCol_dist = $eventCol_width = round(100 / count($eventCols)); - } - $html = $indent.'
'."\n"; @@ -771,31 +841,33 @@ class uiviews extends uical } $this->_day_class_holiday($day_ymd,$class,$holidays); // the weekday and date - $html .= $indent."\t".'
'. + $html .= $indent."\t".'
'. $title.(!$short_title && $holidays ? ': '.$holidays : '')."
\n"; if ($this->use_time_grid) { // adding divs to click on for each row / time-span - for($counter = 1; $counter < $this->rowsToDisplay; $counter++) + for($t = $this->scroll_to_wdstart ? 0 : $this->wd_start,$i = 1+$this->extraRows; + $t <= $this->wd_end || $this->scroll_to_wdstart && $t < 24*60; + $t += $this->granularity_m,++$i) { - //print "$counter - ". $counter*$this->rowHeight ."
"; $linkData = array( 'menuaction' =>'calendar.uiforms.edit', 'date' => $day_ymd, - 'hour' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))/60), - 'minute' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))%60), + 'hour' => floor($t / 60), + 'minute' => floor($t % 60), ); if ($owner) $linkData['owner'] = $owner; - $html .= $indent."\t".'
'."\n"; } } // displaying all event columns of the day foreach($eventCols as $n => $eventCol) { - $html .= $this->eventColWidget($eventCol,$n*$eventCol_dist,$eventCol_width,$indent."\t"); + $html .= $this->eventColWidget($eventCol,!$n ? 0 : 60-10*(count($eventCols)-$n), + count($eventCols) == 1 ? 100 : (!$n ? 80 : 50),$indent."\t"); } $html .= $indent."
\n"; // calDayCol @@ -911,11 +983,11 @@ class uiviews extends uical } else { - foreach(array($event['start_m'],$event['end_m']) as $minutes) - { - $timespan[] = $GLOBALS['egw']->common->formattime(sprintf('%02d',$minutes/60),sprintf('%02d',$minutes%60)); - } - $timespan = implode(' - ',$timespan); + $mins = $event['end_m'] - $event['start_m']; + if ($event['end_m'] == 24*60-1) ++$mins; + $timespan = $timespan2 = $GLOBALS['egw']->common->formattime(sprintf('%02d',$event['start_m']/60),sprintf('%02d',$event['start_m']%60)). + ' '.floor($mins/60).lang('h').($mins%60 ? $mins%60 : ''); + $timespan2 = str_replace(' ',' - '.$GLOBALS['egw']->common->formattime(sprintf('%02d',$event['end_m']/60),sprintf('%02d',$event['end_m']%60)).': ',$timespan); } $is_private = !$this->bo->check_perms(EGW_ACL_READ,$event); @@ -931,7 +1003,7 @@ class uiviews extends uical $border=1; $headerbgcolor = $color ? $color : '#808080'; // the body-colors (gradient) are calculated from the headercolor, which depends on the cat of an event - $bodybgcolor1 = $this->brighter($headerbgcolor,170); + $bodybgcolor1 = $this->brighter($headerbgcolor,$headerbgcolor == '#808080' ? 100 : 170); $bodybgcolor2 = $this->brighter($headerbgcolor,220); // seperate each participant types @@ -954,18 +1026,22 @@ class uiviews extends uical // as we only deal with percentual widht, we consider only the full dayview (1 colum) as NOT small $small = $this->view != 'day' || $width < 50; // $small = $width <= $small_trigger_width - + + $small_height = $this->use_time_grid && ( $event['end_m']-$event['start_m'] < 2*$this->granularity_m || + $event['end_m'] <= $this->wd_start || $event['start_m'] >= $this->wd_end); + $tpl->set_var(array( // event-content, some of it displays only if it really has content or is needed 'header_icons' => $small ? '' : implode("",$icons), 'body_icons' => $small ? implode("\n",$icons) : '', - 'icons' => implode("\n",$icons), - 'timespan' => $small ? str_replace(' ','',$timespan) : $timespan, - 'title' => !$is_private ? $this->html->htmlspecialchars($event['title']).$width : lang('private'), + 'icons' => implode('',$icons), + 'timespan' => $timespan, + 'title' => ($title = !$is_private ? $this->html->htmlspecialchars($event['title']) : lang('private')), + 'header' => $small_height ? $title : $timespan, 'description' => !$is_private ? nl2br($this->html->htmlspecialchars($event['description'])) : '', 'location' => !$is_private ? $this->add_nonempty($event['location'],lang('Location')) : '', 'participants' => $participants, - 'times' => !$event['multiday'] ? $this->add_nonempty($timespan,lang('Time')) : + 'times' => !$event['multiday'] ? $this->add_nonempty($timespan2,lang('Time')) : $this->add_nonempty($this->bo->format_date($event['start']),lang('Start')). $this->add_nonempty($this->bo->format_date($event['end']),lang('End')), 'multidaytimes' => !$event['multiday'] ? '' : @@ -983,11 +1059,13 @@ class uiviews extends uical 'border' => $border, 'bordercolor' => $headerbgcolor, 'headerbgcolor' => $headerbgcolor, - 'bodybackground' => 'url('.$GLOBALS['egw_info']['server']['webserver_url']. + 'bodybackground' => ($background = 'url('.$GLOBALS['egw_info']['server']['webserver_url']. '/calendar/inc/gradient.php?color1='.urlencode($bodybgcolor1).'&color2='.urlencode($bodybgcolor2). - '&width='.$width.') repeat-y '.$bodybgcolor2, + '&width='.$width.') repeat-y '.$bodybgcolor2), 'Small' => $small ? 'Small' : '', // to use in css class-names + 'indent' => $indent."\t", )); +/* not used at the moment foreach(array( 'upper_left'=>array('width'=>-$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor), 'upper_right'=>array('width'=>$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor), @@ -1001,6 +1079,7 @@ class uiviews extends uical (isset($data['color']) ? '&color='.urlencode($data['color']) : ''). (isset($data['border']) ? '&border='.urlencode($data['border']) : '')); } +*/ $tooltip = $tpl->fp('tooltip','event_tooltip'); $tpl->set_var('tooltip',$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0))); $html = $tpl->fp('out',$block); @@ -1021,7 +1100,7 @@ class uiviews extends uical $ie_fix = ''; if ($this->html->user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events { - $ie_fix = $this->html->image('calendar','transparent.gif','', + $ie_fix = $indent."\t".$this->html->image('calendar','transparent.gif','', $this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). ' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n"; } @@ -1031,10 +1110,12 @@ class uiviews extends uical } else { - $style = 'position: relative;'; + $style = 'position: relative; margin-top: 3px;'; } - return $indent.'
'."\n".$ie_fix.$html.$indent."
\n"; + return $indent.'
html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). + '>'."\n".$ie_fix.$html.$indent."
\n"; } function add_nonempty($content,$label,$one_per_line=False) diff --git a/calendar/inc/hook_settings.inc.php b/calendar/inc/hook_settings.inc.php index 3eefae9342..50015b322d 100644 --- a/calendar/inc/hook_settings.inc.php +++ b/calendar/inc/hook_settings.inc.php @@ -19,6 +19,7 @@ $default = array( 'day' => lang('Dayview'), + 'day4' => lang('Four days view'), 'week' => lang('Weekview'), 'month' => lang('Monthview'), 'planner_cat' => lang('Planner by category'), @@ -26,8 +27,9 @@ 'listview' => lang('Listview'), ); $grid_views = array( - '' => lang('Dayview').', '.lang('Weekview').' & '.lang('Monthview'), - 'day_week' => lang('Dayview').' & '.lang('Weekview'), + '' => lang('all'), + 'day_week' => lang('Dayview').', '.lang('Four days view').' & '.lang('Weekview'), + 'day4' => lang('Dayview').' & '.lang('Four days view'), 'day' => lang('Dayview'), ); /* Select list with number of day by week */ diff --git a/calendar/setup/phpgw_ca.lang b/calendar/setup/phpgw_ca.lang index c3574cd8d4..1c0d43c109 100644 --- a/calendar/setup/phpgw_ca.lang +++ b/calendar/setup/phpgw_ca.lang @@ -374,3 +374,4 @@ your meeting scheduled for %1 has been canceled calendar ca S'ha cancel your meeting that had been scheduled for %1 has been rescheduled to %2 calendar ca La vostra reunió programada per %1 ha estat reprogramada a %2 your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar ca Les vostres hores proposades de %1 - %2 estan en conflicte amb les següents entrades del calendari: +h calendar ca h diff --git a/calendar/setup/phpgw_de.lang b/calendar/setup/phpgw_de.lang index 544c87551e..aaa8512e3f 100644 --- a/calendar/setup/phpgw_de.lang +++ b/calendar/setup/phpgw_de.lang @@ -116,6 +116,7 @@ for which views should calendar show distinct lines with a fixed time interval. format of event updates calendar de Format der Benachrichtigungen forward half a month calendar de einen halben Monat weiter forward one month calendar de einen Monat weiter +four days view calendar de Vier-Tagesansicht freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar de Belegtzeiten: Unbekannter Benutzername '%1', falsches Passwort oder nicht verfügbar für nicht angemeldete Benutzer !!! freetime search calendar de Terminsuche fri calendar de Fr @@ -128,6 +129,7 @@ group invitation calendar de Gruppeneinladung group planner calendar de Gruppenplaner group public only calendar de Gruppen-Öffentlich groupmember(s) %1 not included, because you have no access. calendar de Gruppenmitglied(er) %1 nicht enthalten, da Sie keinen Zugriff haben. +h calendar de h here is your requested alarm. calendar de Hier ist ihr bestellter Alarm. high priority calendar de Hohe Priorität holiday calendar de Feiertag diff --git a/calendar/setup/phpgw_en.lang b/calendar/setup/phpgw_en.lang index faa59e3939..defd3c1ec4 100644 --- a/calendar/setup/phpgw_en.lang +++ b/calendar/setup/phpgw_en.lang @@ -116,6 +116,7 @@ for which views should calendar show distinct lines with a fixed time interval. format of event updates calendar en Format of event updates forward half a month calendar en forward half a month forward one month calendar en forward one month +four days view calendar en four days view freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar en freebusy: Unknow user '%1', wrong password or not availible to not loged in users !!! freetime search calendar en Freetime Search fri calendar en Fri @@ -128,6 +129,7 @@ group invitation calendar en Group invitation group planner calendar en Group planner group public only calendar en group public only groupmember(s) %1 not included, because you have no access. calendar en Groupmember(s) %1 not included, because you have no access. +h calendar en h here is your requested alarm. calendar en Here is your requested alarm. high priority calendar en high priority holiday calendar en Holiday diff --git a/calendar/setup/phpgw_es-es.lang b/calendar/setup/phpgw_es-es.lang index 0ac554d7be..51ce6a3288 100644 --- a/calendar/setup/phpgw_es-es.lang +++ b/calendar/setup/phpgw_es-es.lang @@ -308,3 +308,4 @@ you need to select an ical file first calendar es-es Necesita seleccionar antes you need to set either a day or a occurence !!! calendar es-es Debe indicar un día o una ocurrencia your meeting scheduled for %1 has been canceled calendar es-es Su reunión programada para %1 ha sido cancelada your meeting that had been scheduled for %1 has been rescheduled to %2 calendar es-es Su reunión programada para %1 ha sido reprogramada para %2 +h calendar es-es h diff --git a/calendar/setup/phpgw_eu.lang b/calendar/setup/phpgw_eu.lang index cc3b3b2b1e..832db3165a 100644 --- a/calendar/setup/phpgw_eu.lang +++ b/calendar/setup/phpgw_eu.lang @@ -267,3 +267,4 @@ you need to select an ical file first calendar eu Lehenago you need to set either a day or a occurence !!! calendar eu Egun bat edo ateraldi bat jarri behar duzu your meeting scheduled for %1 has been canceled calendar eu %1 programatutako bilera ezeztatu egin da your meeting that had been scheduled for %1 has been rescheduled to %2 calendar eu %1 programatutako bilera %2 programatu da +h calendar eu h diff --git a/calendar/setup/phpgw_fr.lang b/calendar/setup/phpgw_fr.lang index cf841f7a5d..d6e21624bf 100644 --- a/calendar/setup/phpgw_fr.lang +++ b/calendar/setup/phpgw_fr.lang @@ -414,3 +414,4 @@ you need to set either a day or a occurence !!! calendar fr Vous devez r your meeting scheduled for %1 has been canceled calendar fr Votre réunion planifiée pour %1 a été annulée your meeting that had been scheduled for %1 has been rescheduled to %2 calendar fr Votre réunion qui avait été planifiée pour %1 a été replanifiée pour %2 your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar fr L'heure que vous avez suggéré %1 - %2 entre en conflit avec les entrés suivantes du calendrier: +h calendar fr h diff --git a/calendar/setup/phpgw_hu.lang b/calendar/setup/phpgw_hu.lang index c2318d97da..992b58bf0c 100644 --- a/calendar/setup/phpgw_hu.lang +++ b/calendar/setup/phpgw_hu.lang @@ -233,3 +233,4 @@ you can either set a year or a occurence, not both !!! calendar hu Tudsz you can only set a year or a occurence !!! calendar hu Tudsz állítani csupán egy évet vagy egy esemény!!! you do not have permission to read this record! calendar hu Neked nincs jogosultságod olvasni ezt a bejegyzést! you have a meeting scheduled for %1 calendar hu Neked van egy ütemezett találkozód %1-el! +h calendar hu óra diff --git a/calendar/setup/phpgw_it.lang b/calendar/setup/phpgw_it.lang index 472cc66675..e2dc79a86e 100644 --- a/calendar/setup/phpgw_it.lang +++ b/calendar/setup/phpgw_it.lang @@ -301,3 +301,4 @@ you need to select an ical file first calendar it Devi prima selezionare un file you need to set either a day or a occurence !!! calendar it Impostare un giorno o una ricorrenza !!! your meeting scheduled for %1 has been canceled calendar it Il tuo meeting fissato per il %1 è stato cancellato your meeting that had been scheduled for %1 has been rescheduled to %2 calendar it Il tuo meeting fissato per il %1 è stato spostato al %2 +h calendar it h diff --git a/calendar/setup/phpgw_lv.lang b/calendar/setup/phpgw_lv.lang index 94d0e488b0..c181bb9f57 100644 --- a/calendar/setup/phpgw_lv.lang +++ b/calendar/setup/phpgw_lv.lang @@ -285,3 +285,4 @@ you need to set either a day or a occurence !!! calendar lv Tev jÄuzstÄda dien your meeting scheduled for %1 has been canceled calendar lv Tava ieplÄnotÄ tikÅ¡anÄs %1 ir atcelta your meeting that had been scheduled for %1 has been rescheduled to %2 calendar lv Tava ieplÄnotÄ tikÅ¡anÄs %1 tika pÄrcelta uz %2 your suggested time of %1 - %2 conflicts with the following existing calendar entries: calendar lv Tavs ieteiktais %1 - %2 laiks nonÄÄ· pretrunÄ ar sekojoÅ¡Ä«em kalendÄra ierakstiem: +h calendar lv h diff --git a/calendar/setup/phpgw_nl.lang b/calendar/setup/phpgw_nl.lang index e7a5a27791..44d06f2981 100644 --- a/calendar/setup/phpgw_nl.lang +++ b/calendar/setup/phpgw_nl.lang @@ -306,3 +306,4 @@ you need to select an ical file first calendar nl U moet eerst een iCal selecter you need to set either a day or a occurence !!! calendar nl U moet of een Dag of een Gebeurtenis instellen !!! your meeting scheduled for %1 has been canceled calendar nl U geplande vergadering voor %1 is geannuleerd. your meeting that had been scheduled for %1 has been rescheduled to %2 calendar nl Uw vergadering die stond gepland voor %1 is opnieuw ingepland naar %2 +h calendar nl h diff --git a/calendar/setup/phpgw_no.lang b/calendar/setup/phpgw_no.lang index ea826f3003..30ed93337d 100644 --- a/calendar/setup/phpgw_no.lang +++ b/calendar/setup/phpgw_no.lang @@ -306,3 +306,4 @@ you need to select an ical file first calendar no Du m you need to set either a day or a occurence !!! calendar no Du må enten sette en dag eller hendelse !!! your meeting scheduled for %1 has been canceled calendar no Møtet ditt planlagt for %1 har blitt kansellert your meeting that had been scheduled for %1 has been rescheduled to %2 calendar no Møtet ditt som var planlagt for %1 har blitt flyttet til %2 +h calendar no t diff --git a/calendar/setup/phpgw_pt-br.lang b/calendar/setup/phpgw_pt-br.lang index e4d7aed6a2..5001ad246f 100644 --- a/calendar/setup/phpgw_pt-br.lang +++ b/calendar/setup/phpgw_pt-br.lang @@ -308,3 +308,4 @@ you need to select an ical file first calendar pt-br Voc you need to set either a day or a occurence !!! calendar pt-br Você deve determinar um dia ou recorrência!!! your meeting scheduled for %1 has been canceled calendar pt-br Seu compromisso agendado para %1 foi cancelado your meeting that had been scheduled for %1 has been rescheduled to %2 calendar pt-br Seu compromisso agendado para %1 foi remarcado para %2 +h calendar pt-br h diff --git a/calendar/setup/phpgw_sl.lang b/calendar/setup/phpgw_sl.lang index 160407c6ba..7de43350a3 100644 --- a/calendar/setup/phpgw_sl.lang +++ b/calendar/setup/phpgw_sl.lang @@ -308,3 +308,4 @@ you need to select an ical file first calendar sl Najprej morate izbrati datotek you need to set either a day or a occurence !!! calendar sl Nastaviti morate dan ali pojavljanje! your meeting scheduled for %1 has been canceled calendar sl VaÅ¡ sestanek %1 je izbrisan your meeting that had been scheduled for %1 has been rescheduled to %2 calendar sl Sestanek za %1 je bil prestavljen na %2 +h calendar sl h diff --git a/calendar/setup/phpgw_zh-tw.lang b/calendar/setup/phpgw_zh-tw.lang index 3bde685597..15ed42543a 100644 --- a/calendar/setup/phpgw_zh-tw.lang +++ b/calendar/setup/phpgw_zh-tw.lang @@ -308,3 +308,4 @@ you need to select an ical file first calendar zh-tw 您必須先é¸æ“‡ä¸€å€‹ iC you need to set either a day or a occurence !!! calendar zh-tw æ‚¨å¿…é ˆè¨­å®šä¸€å€‹æ—¥æœŸæˆ–æ˜¯ä¸€å€‹æœŸé–“ï¼ your meeting scheduled for %1 has been canceled calendar zh-tw 您與%1的行程已經å–消了 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar zh-tw 您與%1的行程已經é‡æ–°å®‰æŽ’到%2 +h calendar zh-tw 時 diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index c3f529122b..b343500b15 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -187,21 +187,32 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of .calEvent,.calEventPrivate{ position: absolute; left: 0px; - width: 100%; + right: 0px; overflow: hidden; z-index: 20; + border-width: 1px; + border-style: solid; + border-radius: 6px; + -moz-border-radius: 6px; /* set via inline style on runtime: * top: depending on startime * height: depending on length - * background-color: depending on category + * border-color: depending on category + * background: depending on category (shade) */ } .calEvent:hover{ -/* background-color: #ffff80;*/ cursor: pointer; cursor: hand; } +.calEventTooltip{ + border-width: 1px; + border-style: solid; + border-radius: 6px; + -moz-border-radius: 6px; +} + .calAddEvent{ position: absolute; width: 100%; @@ -217,21 +228,37 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of /* header-row of the event */ .calEventHeader,.calEventHeaderSmall{ + position: relative; /* as the calEventIcons use postion: absolute! */ font-weight: bold; font-size: 9pt; - background-color: #0000ff; color: white; text-align: left; + left: 0px; + right: 0px; + padding-left: 2px; +/* set via inline style on runtime + * background-color: depending on category + */ } .calEventHeaderSmall{ font-size: 8pt; line-height: 10pt; } +.calEventIcons{ + position: absolute; + right: 0px; + top: 0px; +} +.calEventHeaderSmall .calEventIcons img{ height: 13px;} + /* body of the event */ .calEventBody,.calEventBodySmall{ padding: 0px 3px 0px; + left: 2px; + right: 2px; + height: 99%; } .calEventBodySmall{ diff --git a/calendar/templates/default/event_widget.tpl b/calendar/templates/default/event_widget.tpl index d7defe7a3e..fdfcf0257d 100644 --- a/calendar/templates/default/event_widget.tpl +++ b/calendar/templates/default/event_widget.tpl @@ -1,39 +1,27 @@ - - - - - - - - - -
- {icons} {timespan} -
- {title} -
+{indent}
+{indent} {header} +{indent}
{icons}
+{indent}
+{indent}
{title}
- - - - - - - -
- {icons} {timespan} -
-

- {title}
- {description}

-

{times} - {location} - {category} - {participants}

-
+
+
+ {timespan} +
{icons}
+
+
+

+ {title}
+ {description}

+

{times} + {location} + {category} + {participants}

+
+ From 7c55d3bdb3816c577f2f532413d01f7480ec2a22 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Jun 2006 23:36:43 +0000 Subject: [PATCH 038/176] - fixed for IE not working switch "use end date" in freetimesearch - using duration selectbox now in edit too (incl. "use end date" to give longer/other durations) --- calendar/inc/class.uiforms.inc.php | 50 +++++++++++++++---- calendar/setup/etemplates.inc.php | 21 ++++++-- calendar/templates/default/edit.xet | 20 +++++--- calendar/templates/default/freetimesearch.xet | 4 +- 4 files changed, 74 insertions(+), 21 deletions(-) diff --git a/calendar/inc/class.uiforms.inc.php b/calendar/inc/class.uiforms.inc.php index 2f2f4f2040..bc2e61b904 100644 --- a/calendar/inc/class.uiforms.inc.php +++ b/calendar/inc/class.uiforms.inc.php @@ -41,6 +41,13 @@ class uiforms extends uical 'import' => true, ); + /** + * Standard durations used in edit and freetime search + * + * @var array + */ + var $durations = array(); + /** * Constructor */ @@ -49,6 +56,11 @@ class uiforms extends uical $this->uical(true); // call the parent's constructor $this->link =& $this->bo->link; + + for ($n=15; $n <= 8*60; $n+=($n < 60 ? 15 : ($n < 240 ? 30 : 60))) + { + $this->durations[$n*60] = sprintf('%d:%02d',$n/60,$n%60); + } } /** @@ -183,6 +195,10 @@ class uiforms extends uical unset($content['alarm'][$id]); } } + if ($content['duration']) + { + $content['end'] = $content['start'] + $content['duration']; + } $event = $content; unset($event['new_alarm']); unset($event['alarm']['delete_alarm']); @@ -541,9 +557,10 @@ class uiforms extends uical $etpl =& CreateObject('etemplate.etemplate','calendar.edit'); $sel_options = array( - 'recur_type' => &$this->bo->recur_types, + 'recur_type' => &$this->bo->recur_types, 'accounts_status' => $this->bo->verbose_status, 'owner' => array(), + 'duration' => $this->durations, ); if (!is_array($event)) { @@ -595,6 +612,10 @@ class uiforms extends uical 'view' => $view, )); $content['participants'] = array(); + + $content['duration'] = $content['end'] - $content['start']; + if (isset($this->durations[$content['duration']])) $content['end'] = ''; + foreach($event['participant_types'] as $type => $participants) { $name = 'accounts'; @@ -683,6 +704,7 @@ class uiforms extends uical $readonlys['button[save]'] = $readonlys['button[apply]'] = $readonlys['freetime'] = true; $readonlys['link_to'] = $readonlys['customfields'] = true; + $readonlys['duration'] = true; if ($event['recur_type'] != MCAL_RECUR_NONE) { @@ -694,6 +716,14 @@ class uiforms extends uical } else { + if (!is_object($GLOBALS['egw']->js)) + { + $GLOBALS['egw']->js = CreateObject('phpgwapi.javascript'); + } + // We hide the enddate if one of our predefined durations fits + // the call to set_style_by_class has to be in onload, to make sure the function and the element is already created + $GLOBALS['egw']->js->set_onload("set_style_by_class('table','end_hide','visibility','".($content['duration'] && isset($sel_options['duration'][$content['duration']]) ? 'hidden' : 'visible')."');"); + $readonlys['button[copy]'] = $readonlys['button[vcal]'] = true; unset($preserv['participants']); // otherwise deleted participants are still reported $readonlys['recur_exception'] = !count($content['recur_exception']); // otherwise we get a delete button @@ -807,7 +837,11 @@ class uiforms extends uical if (!is_array($content)) { $edit_content = $etpl->process_values2url(); - + + if ($edit_content['duration']) + { + $edit_content['end'] = $edit_content['start'] + $edit_content['duration']; + } if ($edit_content['whole_day']) { $arr = $this->bo->date2array($edit_content['start']); @@ -881,6 +915,7 @@ class uiforms extends uical 'exec[start][i]' => (int) date('i',$start), 'exec[end][str]' => date($this->common_prefs['dateformat'],$end), 'exec[end][i]' => (int) date('i',$end), + 'exec[duration]' => $content['duration'], ); if ($this->common_prefs['timeformat'] == 12) { @@ -925,12 +960,6 @@ class uiforms extends uical } $content['freetime'] = $this->freetime($content['participants'],$content['start'],$content['start']+$content['search_window'],$content['duration'],$content['cal_id']); $content['freetime'] = $this->split_freetime_daywise($content['freetime'],$content['duration'],$content['weekdays'],$content['start_time'],$content['end_time'],$sel_options); - $sel_options['duration'][] = lang('use end date'); - for ($n=15; $n <= 8*60; $n+=($n < 60 ? 15 : ($n < 240 ? 30 : 60))) - { - $sel_options['duration'][$n*60] = sprintf('%d:%02d',$n/60,$n%60); - } - if ($content['duration'] <= 8*HOUR_s) $content['end'] = ''; //echo "
".print_r($content,true)."
\n"; $GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('freetime search'); @@ -941,10 +970,11 @@ class uiforms extends uical { $GLOBALS['egw']->js = CreateObject('phpgwapi.javascript'); } + $sel_options['duration'] = $this->durations; + if ($content['duration'] && isset($sel_options['duration'][$content['duration']])) $content['end'] = ''; // We hide the enddate if one of our predefined durations fits // the call to set_style_by_class has to be in onload, to make sure the function and the element is already created - $GLOBALS['egw']->js->set_onload("set_style_by_class('*','end_hide','visibility','".($content['duration'] && isset($sel_options['duration'][$content['duration']]) ? 'hidden' : 'visible')."');"); - $etpl->set_cell_attribute('duration','onchange',"set_style_by_class('*','end_hide','visibility',this.value == 0 ? 'visible' : 'hidden');"); + $GLOBALS['egw']->js->set_onload("set_style_by_class('table','end_hide','visibility','".($content['duration'] && isset($sel_options['duration'][$content['duration']]) ? 'hidden' : 'visible')."');"); $etpl->exec('calendar.uiforms.freetimesearch',$content,$sel_options,'',array( 'participants' => $content['participants'], diff --git a/calendar/setup/etemplates.inc.php b/calendar/setup/etemplates.inc.php index beb6df5657..9891fe6df9 100644 --- a/calendar/setup/etemplates.inc.php +++ b/calendar/setup/etemplates.inc.php @@ -1,7 +1,14 @@ 'calendar.edit','template' => '','lang' => '','g $templ_data[] = array('name' => 'calendar.edit','template' => '','lang' => '','group' => '0','version' => '1.0.1.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:7:{s:2:"h1";s:6:",!@msg";s:2:"c2";s:2:"th";s:1:"A";s:3:"100";s:2:"c4";s:3:"row";s:2:"h4";s:8:",!@owner";s:1:"B";s:3:"300";s:2:"h2";s:2:"28";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:5:"title";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:63:"General|Description|Participants|Recurrence|Custom|Links|Alarms";s:4:"name";s:63:"general|description|participants|recurrence|custom|links|alarms";s:4:"help";s:158:"Location, Start- and Endtimes, ...|Full description|Participants, Resources, ...|Repeating Event Information|Custom fields|Links, Attachments|Alarm management";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:8:"readonly";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:9:"date-time";s:5:"label";s:7:"Updated";s:4:"name";s:8:"modified";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:5:"label";s:2:"by";s:4:"name";s:8:"modifier";s:8:"readonly";s:1:"1";}}}i:5;a:3:{s:1:"A";a:11:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[edit]";s:5:"label";s:4:"Edit";s:4:"help";s:15:"Edit this event";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[exception]";s:5:"label";s:9:"Exception";s:4:"help";s:42:"Create an exception at this recuring event";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[copy]";s:5:"label";s:4:"Copy";s:4:"help";s:15:"Copy this event";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[vcal]";s:5:"label";s:6:"Export";s:4:"help";s:27:"Download this event as iCal";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:22:"saves the changes made";}i:6;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";s:4:"help";s:17:"apply the changes";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";s:4:"help";s:16:"Close the window";}i:8;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:11:"custom_mail";s:5:"label";s:21:"mail all participants";s:4:"help";s:59:"compose a mail to all participants after the event is saved";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"button[delete]";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:5:"align";s:5:"right";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1132776053',); +$templ_data[] = array('name' => 'calendar.edit','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:7:{s:2:"h1";s:6:",!@msg";s:2:"c2";s:2:"th";s:1:"A";s:3:"100";s:2:"c4";s:3:"row";s:2:"h4";s:8:",!@owner";s:1:"B";s:3:"300";s:2:"h2";s:2:"28";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:5:"title";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:63:"General|Description|Participants|Recurrence|Custom|Links|Alarms";s:4:"name";s:63:"general|description|participants|recurrence|custom|links|alarms";s:4:"help";s:158:"Location, Start- and Endtimes, ...|Full description|Participants, Resources, ...|Repeating Event Information|Custom fields|Links, Attachments|Alarm management";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:8:"readonly";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:9:"date-time";s:5:"label";s:7:"Updated";s:4:"name";s:8:"modified";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:5:"label";s:2:"by";s:4:"name";s:8:"modifier";s:8:"readonly";s:1:"1";}}}i:5;a:3:{s:1:"A";a:11:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[edit]";s:5:"label";s:4:"Edit";s:4:"help";s:15:"Edit this event";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[exception]";s:5:"label";s:9:"Exception";s:4:"help";s:42:"Create an exception at this recuring event";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[copy]";s:5:"label";s:4:"Copy";s:4:"help";s:15:"Copy this event";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[vcal]";s:5:"label";s:6:"Export";s:4:"help";s:27:"Download this event as iCal";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:22:"saves the changes made";}i:6;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";s:4:"help";s:17:"apply the changes";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";s:4:"help";s:16:"Close the window";}i:8;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:11:"custom_mail";s:5:"label";s:21:"mail all participants";s:4:"help";s:59:"compose a mail to all participants after the event is saved";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"button[delete]";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:5:"align";s:5:"right";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.end_hide { visibility: visible; white-space: nowrap; margin-left: 10px; }','modified' => '1149292820',); + $templ_data[] = array('name' => 'calendar.edit.alarms','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"h1";s:16:"20,@no_add_alarm";s:2:"c2";s:4:",top";s:2:"h2";s:8:",!@alarm";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"before the event";}s:1:"B";a:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";i:1;a:3:{s:4:"type";s:13:"select-number";s:4:"size";s:4:",0,7";s:4:"name";s:15:"new_alarm[days]";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,new_alarm[days]";s:5:"label";s:4:"days";}i:3;a:3:{s:4:"type";s:13:"select-number";s:4:"name";s:16:"new_alarm[hours]";s:4:"size";s:5:",0,23";}i:4;a:3:{s:4:"type";s:5:"label";s:4:"size";s:19:",,,new_alarm[hours]";s:5:"label";s:5:"hours";}i:5;a:3:{s:4:"type";s:13:"select-number";s:4:"name";s:15:"new_alarm[mins]";s:4:"size";s:7:",0,55,5";}i:6;a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,new_alarm[mins]";s:5:"label";s:7:"Minutes";}i:7;a:5:{s:4:"type";s:6:"select";s:4:"name";s:16:"new_alarm[owner]";s:7:"no_lang";s:1:"1";s:5:"label";s:3:"for";s:4:"help";s:31:"Select who should get the alarm";}i:8;a:3:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[add_alarm]";s:5:"label";s:9:"Add alarm";}}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Alarms";}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Time";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"before the event";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"All participants";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}}i:2;a:5:{s:1:"A";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:12:"${row}[time]";s:8:"readonly";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"name";s:14:"${row}[offset]";s:7:"no_lang";s:1:"1";}s:1:"C";a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:11:"${row}[all]";s:8:"readonly";s:1:"1";}s:1:"D";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";}s:1:"E";a:7:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:27:"delete_alarm[$row_cont[id]]";s:4:"help";s:17:"Delete this alarm";s:7:"onclick";s:36:"return confirm(\'Delete this alarm\');";}}}s:4:"rows";i:2;s:4:"cols";i:5;s:4:"name";s:5:"alarm";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:17:"100%,200,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,,,,auto','style' => '','modified' => '1118780740',); $templ_data[] = array('name' => 'calendar.edit.custom','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"name";s:12:"customfields";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:17:"100%,200,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,,,,auto','style' => '','modified' => '1118737582',); @@ -21,6 +30,8 @@ $templ_data[] = array('name' => 'calendar.edit.description','template' => '','la $templ_data[] = array('name' => 'calendar.edit.general','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:9:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c6";s:3:"row";s:2:"c5";s:3:"row";s:2:"c2";s:3:"row";s:2:"h4";s:2:"60";s:1:"B";s:3:"35%";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,start";s:5:"label";s:5:"Start";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"whole_day";s:5:"label";s:9:"whole day";s:4:"help";s:31:"Event will occupy the whole day";s:4:"size";s:11:",, ,disable";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:6:",,,end";s:5:"label";s:3:"End";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:6:"button";s:5:"label";s:15:"Freetime search";s:4:"name";s:8:"freetime";s:4:"help";s:88:"Find free timeslots where the selected participants are availible for the given timespan";s:7:"onclick";s:239:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.freetimesearch\')+values2url(this.form,\'start,end,participants,recur_type,whole_day\'),\'ft_search\',\'dependent=yes,width=700,height=500,scrollbars=yes,status=yes\'); return false;";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,location";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:8:"location";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,category";s:5:"label";s:8:"Category";}s:1:"B";a:4:{s:4:"type";s:10:"select-cat";s:4:"size";s:1:"3";s:4:"name";s:8:"category";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,priority";s:5:"label";s:8:"Priority";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:15:"select-priority";s:4:"name";s:8:"priority";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:12:"non blocking";s:4:"help";s:56:"A non blocking event will not conflict with other events";s:4:"name";s:12:"non_blocking";s:4:"size";s:11:",, ,disable";}s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:6;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,public";s:5:"label";s:7:"Private";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:3:"0,1";s:4:"name";s:6:"public";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:3;s:4:"size";s:8:"100%,200";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200','style' => '','modified' => '1118477982',); +$templ_data[] = array('name' => 'calendar.edit.general','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:9:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c6";s:3:"row";s:2:"c5";s:3:"row";s:2:"c2";s:3:"row";s:2:"h4";s:2:"60";s:1:"B";s:3:"50%";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,start";s:5:"label";s:5:"Start";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"whole_day";s:5:"label";s:9:"whole day";s:4:"help";s:31:"Event will occupy the whole day";s:4:"size";s:11:",, ,disable";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,duration";s:5:"label";s:8:"Duration";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:6:{s:4:"type";s:6:"select";s:4:"name";s:8:"duration";s:4:"size";s:12:"Use end date";s:7:"no_lang";s:1:"1";s:4:"help";s:23:"Duration of the meeting";s:8:"onchange";s:92:"set_style_by_class(\'table\',\'end_hide\',\'visibility\',this.value == \'\' ? \'visible\' : \'hidden\');";}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:6:"needed";s:1:"1";s:4:"span";s:9:",end_hide";}}s:1:"C";a:5:{s:4:"type";s:6:"button";s:5:"label";s:15:"Freetime search";s:4:"name";s:8:"freetime";s:4:"help";s:88:"Find free timeslots where the selected participants are availible for the given timespan";s:7:"onclick";s:248:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.freetimesearch\')+values2url(this.form,\'start,end,duration,participants,recur_type,whole_day\'),\'ft_search\',\'dependent=yes,width=700,height=500,scrollbars=yes,status=yes\'); return false;";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,location";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:8:"location";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,category";s:5:"label";s:8:"Category";}s:1:"B";a:4:{s:4:"type";s:10:"select-cat";s:4:"size";s:1:"3";s:4:"name";s:8:"category";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,priority";s:5:"label";s:8:"Priority";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:15:"select-priority";s:4:"name";s:8:"priority";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:12:"non blocking";s:4:"help";s:56:"A non blocking event will not conflict with other events";s:4:"name";s:12:"non_blocking";s:4:"size";s:11:",, ,disable";}s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:6;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,public";s:5:"label";s:7:"Private";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:3:"0,1";s:4:"name";s:6:"public";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:3;s:4:"size";s:8:"100%,200";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200','style' => '','modified' => '1118477982',); + $templ_data[] = array('name' => 'calendar.edit.links','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:7:{s:1:"A";s:2:"95";s:2:"h1";s:6:",@view";s:2:"h2";s:6:",@view";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:7:"link-to";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:17:"100%,200,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,,,,auto','style' => '','modified' => '1118758702',); $templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:2:{s:2:"c1";s:7:"row,top";s:1:"A";s:2:"95";}i:1;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:15:",,,participants";s:5:"label";s:12:"Participants";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:2:"14";s:4:"name";s:22:"participants[accounts]";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Resources";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:16:"resources_select";s:4:"size";s:2:"14";s:4:"name";s:23:"participants[resources]";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:16:"100%,200,,row_on";s:7:"options";a:3:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200,,row_on','style' => '','modified' => '1118481127',); @@ -44,6 +55,10 @@ $templ_data[] = array('name' => 'calendar.freetimesearch','template' => '','lang .redItalic { color: red; font-style: italic; } .end_hide { visibility: hidden; }','modified' => '1102850646',); +$templ_data[] = array('name' => 'calendar.freetimesearch','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:9:",size120b";s:5:"label";s:15:"Freetime Search";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Startdate / -time";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:4:"help";s:33:"Startdate and -time of the search";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Duration";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"duration";s:4:"help";s:23:"Duration of the meeting";s:8:"onchange";s:92:"set_style_by_class(\'table\',\'end_hide\',\'visibility\',this.value == \'\' ? \'visible\' : \'hidden\');";s:4:"size";s:12:"Use end date";}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:4:"help";s:57:"Enddate / -time of the meeting, eg. for more then one day";s:4:"span";s:9:",end_hide";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Timeframe";}s:1:"B";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:13:"date-houronly";s:4:"name";s:10:"start_time";s:4:"help";s:19:"Timeframe to search";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"til";}i:3;a:3:{s:4:"type";s:13:"date-houronly";s:4:"name";s:8:"end_time";s:4:"help";s:19:"Timeframe to search";}i:4;a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Weekdays";}i:5;a:4:{s:4:"type";s:10:"select-dow";s:4:"size";s:1:"3";s:4:"name";s:8:"weekdays";s:4:"help";s:25:"Weekdays to use in search";}}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"New search";s:4:"name";s:6:"search";s:4:"help";s:36:"new search with the above parameters";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"search_window";s:4:"help";s:34:"how far to search (from startdate)";}i:2;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"cancel";s:5:"label";s:6:"Cancel";s:4:"help";s:16:"Close the window";s:7:"onclick";s:15:"window.close();";}}}i:6;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:8:"freetime";s:4:"span";s:3:"all";s:4:"name";s:4:"rows";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:2;}}','size' => '','style' => '.size120b { text-size: 120%; font-weight: bold; } +.redItalic { color: red; font-style: italic; } +.end_hide { visibility: hidden; }','modified' => '1149297367',); + $templ_data[] = array('name' => 'calendar.freetimesearch.rows','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Date";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Time";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Select";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}}i:2;a:4:{s:1:"A";a:4:{s:4:"type";s:4:"date";s:4:"size";s:3:",16";s:4:"name";s:13:"${row}[start]";s:8:"readonly";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[start]";s:4:"help";s:13:"select a time";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Select";s:4:"name";s:12:"select[$row]";s:4:"help";s:41:"use the selected time and close the popup";}s:1:"D";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:11:"${row}[end]";s:8:"readonly";s:1:"1";}}}s:4:"rows";i:2;s:4:"cols";i:4;}}','size' => '','style' => '','modified' => '1097183756',); $templ_data[] = array('name' => 'calendar.import','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"iCal file";}s:1:"B";a:3:{s:4:"type";s:4:"file";s:4:"name";s:9:"ical_file";s:6:"needed";s:1:"1";}}i:3;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Import";s:4:"name";s:6:"import";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:5:"align";s:6:"center";s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1131469789',); diff --git a/calendar/templates/default/edit.xet b/calendar/templates/default/edit.xet index 35aa64695c..dfffeef116 100644 --- a/calendar/templates/default/edit.xet +++ b/calendar/templates/default/edit.xet @@ -1,11 +1,11 @@ -