CRM (customer-relation-management) type app using Addressbook providing + Todo List, Notes and Phonelog. InfoLog is orininaly based on eGroupWare\'s + old ToDo-List and has the features of all 3 mentioned applications plus fully working ACL + (including Add+Private attributes, add for to addreplys/subtasks).
+Responsibility for a task (ToDo) or a phonecall can be delegated to an other + user. All entries can be linked to addressbook entries, projects and/or calendar events. + This allows you to log all activity of a contact/address or project. + The entries may be viewed or added from InfoLog direct or from within + the contact/address, project or calendar view.
+Other documents / files can be linked to InfoLog entries and are store in the VFS + (eGroupWare\'s virtual file system).
'; +$setup_info['infolog']['note'] = + 'There is a CSV import filter (in the admin-section) to import existing data. + It allows to interactivly assign fields, customize the values with regular + expressions and direct calls to php-functions (e.g. to link the phone calls + (again) to the addressbook entrys).
+More information about InfoLog and the current development-status can be found on the + InfoLog page on our Website.
'; + +/* The hooks this app includes, needed for hooks registration */ +$setup_info['infolog']['hooks']['preferences'] = 'infolog_hooks::all_hooks'; +$setup_info['infolog']['hooks']['settings'] = 'infolog_hooks::settings'; +$setup_info['infolog']['hooks']['verify_settings'] = 'infolog_hooks::verify_settings'; +$setup_info['infolog']['hooks']['admin'] = 'infolog_hooks::all_hooks'; +$setup_info['infolog']['hooks']['not_enum_group_acls'] = 'infolog_hooks::not_enum_group_acls'; +$setup_info['infolog']['hooks']['deleteaccount'] = 'infolog.infolog_so.change_delete_owner'; +$setup_info['infolog']['hooks'][] = 'home'; +$setup_info['infolog']['hooks']['addressbook_view'] = 'infolog.infolog_ui.hook_view'; +$setup_info['infolog']['hooks']['projects_view'] = 'infolog.infolog_ui.hook_view'; +$setup_info['infolog']['hooks']['calendar_view'] = 'infolog.infolog_ui.hook_view'; +$setup_info['infolog']['hooks']['infolog'] = 'infolog.infolog_ui.hook_view'; +$setup_info['infolog']['hooks']['calendar_include_events'] = 'infolog.infolog_bo.cal_to_include'; +$setup_info['infolog']['hooks']['calendar_include_todos'] = 'infolog.infolog_bo.cal_to_include'; +$setup_info['infolog']['hooks']['sidebox_menu'] = 'infolog_hooks::all_hooks'; +$setup_info['infolog']['hooks']['search_link'] = 'infolog_hooks::search_link'; +$setup_info['infolog']['hooks']['pm_custom_app_icons'] = 'infolog.infolog_bo.pm_icons'; + +/* Dependencies for this app to work */ +$setup_info['infolog']['depends'][] = array( + 'appname' => 'phpgwapi', + 'versions' => Array('1.7','1.8','1.9') +); +$setup_info['infolog']['depends'][] = array( + 'appname' => 'etemplate', + 'versions' => Array('1.7','1.8','1.9') +); diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php new file mode 100644 index 0000000000..9ae0ac29c6 --- /dev/null +++ b/infolog/setup/tables_update.inc.php @@ -0,0 +1,636 @@ + + * @package infolog + * @subpackage setup + * @copyright (c) 2003-10 by Ralf Beckerinfolog_upgrade0_9_15_002
\n"; + $insert = 'INSERT INTO phpgw_links (link_app1,link_id1,link_app2,link_id2,link_remark,link_lastmod,link_owner) '; + $select = "SELECT 'infolog',info_id,'addressbook',info_addr_id,info_from,info_datemodified,info_owner FROM phpgw_infolog WHERE info_addr_id != 0"; + //echo "copying address-links: $insert.$select
\n"; + $GLOBALS['egw_setup']->oProc->query($insert.$select); + $select = "SELECT 'infolog',info_id,'projects',info_proj_id,'',info_datemodified,info_owner FROM phpgw_infolog WHERE info_proj_id != 0"; + //echo "copying projects-links: $insert.$select
\n"; + $GLOBALS['egw_setup']->oProc->query($insert.$select); + $select = "SELECT 'infolog',info_id,'calendar',info_event_id,'',info_datemodified,info_owner FROM phpgw_infolog WHERE info_event_id != 0"; + //echo "copying calendar-links: $insert.$select
\n"; + $GLOBALS['egw_setup']->oProc->query($insert.$select); + + $GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array( + 'fd' => array( + 'info_id' => array('type' => 'auto','nullable' => False), + 'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False), + 'info_proj_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_des' => array('type' => 'text','nullable' => True), + 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'), + 'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'), + 'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'), + 'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not'), + 'info_event_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False) + ), + 'pk' => array('info_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + ),'info_addr_id'); + $GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array( + 'fd' => array( + 'info_id' => array('type' => 'auto','nullable' => False), + 'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False), + 'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_des' => array('type' => 'text','nullable' => True), + 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'), + 'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'), + 'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'), + 'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not'), + 'info_event_id' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False) + ), + 'pk' => array('info_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + ),'info_proj_id'); + $GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array( + 'fd' => array( + 'info_id' => array('type' => 'auto','nullable' => False), + 'info_type' => array('type' => 'varchar','precision' => '255','default' => 'task','nullable' => False), + 'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True), + 'info_des' => array('type' => 'text','nullable' => True), + 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_responsible' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'), + 'info_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_startdate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_enddate' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_id_parent' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_pri' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'normal'), + 'info_time' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_bill_cat' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False), + 'info_status' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'done'), + 'info_confirm' => array('type' => 'varchar','precision' => '255','nullable' => True,'default' => 'not') + ), + 'pk' => array('info_id'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + ),'info_event_id'); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.003'; +} + + +function infolog_upgrade0_9_15_003() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array( + 'type' => 'varchar', + 'precision' => '10', + 'nullable' => False, + 'default' => 'task' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_pri',array( + 'type' => 'varchar', + 'precision' => '10', + 'nullable' => True, + 'default' => 'normal' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array( + 'type' => 'varchar', + 'precision' => '10', + 'nullable' => True, + 'default' => 'done' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_confirm',array( + 'type' => 'varchar', + 'precision' => '10', + 'nullable' => True, + 'default' => 'not' + )); + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_modifier',array( + 'type' => 'int', + 'precision' => '4', + 'nullable' => False, + 'default' => '0' + )); + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_link_id',array( + 'type' => 'int', + 'precision' => '4', + 'nullable' => False, + 'default' => '0' + )); + + // ORDER BY link_app2 DESC gives addressbook the highes precedens, use ASC for projects + $GLOBALS['egw_setup']->oProc->query("SELECT link_id,link_id1 FROM phpgw_links WHERE link_app1='infolog' ORDER BY link_app2 DESC"); + $links = array(); + while ($GLOBALS['egw_setup']->oProc->next_record()) + { + $links[$GLOBALS['egw_setup']->oProc->f(1)] = $GLOBALS['egw_setup']->oProc->f(0); + } + reset($links); + while (list($info_id,$link_id) = each($links)) + { + $GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_link_id=$link_id WHERE info_id=$info_id"); + } + + return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.004'; +} + + +function infolog_upgrade0_9_15_004() +{ + // this update correctes wrong escapes of ' and " in the past + // + $db2 = $GLOBALS['egw_setup']->db; // we need a 2. result-set + + $to_correct = array('info_from','info_subject','info_des'); + foreach ($to_correct as $col) + { + $GLOBALS['egw_setup']->oProc->query("SELECT info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'"); + while ($GLOBALS['egw_setup']->oProc->next_record()) + { + $db2->query("UPDATE phpgw_infolog SET $col='".$db2->db_addslashes(stripslashes($GLOBALS['egw_setup']->oProc->f($col))). + "' WHERE info_id=".$GLOBALS['egw_setup']->oProc->f('info_id')); + } + } + + return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.005'; +} + + +function infolog_upgrade0_9_15_005() +{ + $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_infolog_extra',array( + 'fd' => array( + 'info_id' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False), + 'info_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '') + ), + 'pk' => array('info_id','info_extra_name'), + 'fk' => array(), + 'ix' => array(), + 'uc' => array() + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.006'; +} + + +// the following series of updates add some indices, to speedup the selects +function infolog_upgrade0_9_15_006() +{ + $GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_links',array( + 'fd' => array( + 'link_id' => array('type' => 'auto','nullable' => False), + 'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False), + 'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False), + 'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False), + 'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False), + 'link_remark' => array('type' => 'varchar','precision' => '50'), + 'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False), + 'link_owner' => array('type' => 'int','precision' => '4','nullable' => False) + ), + 'pk' => array('link_id'), + 'fk' => array(), + 'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')), + 'uc' => array() + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.007'; +} + + +function infolog_upgrade0_9_15_007() +{ + $GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_infolog',array( + 'fd' => array( + 'info_id' => array('type' => 'auto','nullable' => False), + 'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'), + 'info_from' => array('type' => 'varchar','precision' => '64'), + 'info_addr' => array('type' => 'varchar','precision' => '64'), + 'info_subject' => array('type' => 'varchar','precision' => '64'), + 'info_des' => array('type' => 'text'), + 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'), + 'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_startdate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_enddate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_pri' => array('type' => 'varchar','precision' => '10','default' => 'normal'), + 'info_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_bill_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_status' => array('type' => 'varchar','precision' => '10','default' => 'done'), + 'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'), + 'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0') + ), + 'pk' => array('info_id'), + 'fk' => array(), + 'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')), + 'uc' => array() + )); + + // we dont need to do update 0.9.15.008, as UpdateSequenze is called now by RefreshTable + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0'; +} + + +function infolog_upgrade0_9_15_008() +{ + // update the sequenzes for refreshed tables (postgres only) + $GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_infolog','info_id'); + $GLOBALS['egw_setup']->oProc->UpdateSequence('phpgw_links','link_id'); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0'; +} + + +function infolog_upgrade1_0_0() +{ + // longer columns to cope with multibyte charsets + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_type',array( + 'type' => 'varchar', + 'precision' => '40', + 'nullable' => False, + 'default' => 'task' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_from',array( + 'type' => 'varchar', + 'precision' => '255' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_addr',array( + 'type' => 'varchar', + 'precision' => '255' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_subject',array( + 'type' => 'varchar', + 'precision' => '255' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_status',array( + 'type' => 'varchar', + 'precision' => '40', + 'default' => 'done' + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0.001'; +} + + +function infolog_upgrade1_0_0_001() +{ + $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_time','info_planned_time'); + $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_infolog','info_bill_cat','info_used_time'); + // timestamps have to be 8byte ints + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_datemodified',array( + 'type' => 'int', + 'precision' => '8', + 'nullable' => False + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_startdate',array( + 'type' => 'int', + 'precision' => '8', + 'nullable' => False, + 'default' => '0' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_infolog','info_enddate',array( + 'type' => 'int', + 'precision' => '8', + 'nullable' => False, + 'default' => '0' + )); + + // setting numerical priority 3=urgent, 2=high, 1=normal, 0= + $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_infolog','info_priority',array( + 'type' => 'int', + 'precision' => '2', + 'default' => '1' + )); + $GLOBALS['egw_setup']->oProc->query("UPDATE phpgw_infolog SET info_priority=(CASE WHEN info_pri='urgent' THEN 3 WHEN info_pri='high' THEN 2 WHEN info_pri='low' THEN 0 ELSE 1 END)",__LINE__,__FILE__); + + $GLOBALS['egw_setup']->oProc->DropColumn('phpgw_infolog',array( + 'fd' => array( + 'info_id' => array('type' => 'auto','nullable' => False), + 'info_type' => array('type' => 'varchar','precision' => '40','nullable' => False,'default' => 'task'), + 'info_from' => array('type' => 'varchar','precision' => '255'), + 'info_addr' => array('type' => 'varchar','precision' => '255'), + 'info_subject' => array('type' => 'varchar','precision' => '255'), + 'info_des' => array('type' => 'text'), + 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), + 'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'), + 'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_datemodified' => array('type' => 'int','precision' => '8','nullable' => False), + 'info_startdate' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'info_enddate' => array('type' => 'int','precision' => '8','nullable' => False,'default' => '0'), + 'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_planned_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_used_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_status' => array('type' => 'varchar','precision' => '40','default' => 'done'), + 'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'), + 'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), + 'info_priority' => array('type' => 'int','precision' => '2','default' => '1') + ), + 'pk' => array('info_id'), + 'fk' => array(), + 'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')), + 'uc' => array() + ),'info_pri'); + + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog','egw_infolog'); + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_infolog_extra','egw_infolog_extra'); + // only rename links table, if it has not been moved into the API and therefor been already renamed by the API update + if ($GLOBALS['egw_setup']->oProc->GetTableDefinition('phpgw_links')) + { + $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_links','egw_links'); + } + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.001'; +} + + +function infolog_upgrade1_0_1_001() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog','info_responsible',array( + 'type' => 'varchar', + 'precision' => '255', + 'nullable' => False, + 'default' => '0' + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.1.002'; +} + + +function infolog_upgrade1_0_1_002() +{ + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2'; +} + + +function infolog_upgrade1_2() +{ + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','pl_id',array( + 'type' => 'int', + 'precision' => '4' + )); + + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_price',array( + 'type' => 'float', + 'precision' => '8' + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.001'; +} + + +function infolog_upgrade1_2_001() +{ + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_percent',array( + 'type' => 'int', + 'precision' => '2', + 'default' => '0' + )); + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_datecompleted',array( + 'type' => 'int', + 'precision' => '8' + )); + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_location',array( + 'type' => 'varchar', + 'precision' => '255' + )); + + // all not explicit named stati have the default percent 0 + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=10 WHERE info_status='ongoing'",__LINE__,__FILE__); + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=50 WHERE info_status='will-call'",__LINE__,__FILE__); + + for($p = 0; $p <= 90; $p += 10) + { + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_percent=$p,info_status='".(!$p ? 'not-started' : 'ongoing'). + "' WHERE info_status = '$p%'",__LINE__,__FILE__); + } + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_datecompleted=info_datemodified,info_percent=100 WHERE info_status IN ('done','billed','100%')",__LINE__,__FILE__); + + // remove the percentages from the custom stati, if they exist + $config =& CreateObject('phpgwapi.config','infolog'); + $config->read_repository(); + if (is_array($config->config_data['status']['task'])) + { + $config->config_data['status']['task'] = array_diff($config->config_data['status']['task'], + array('0%','10%','20%','30%','40%','50%','60%','70%','80%','90%','100%')); + $config->save_repository(); + } + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.002'; +} + + +function infolog_upgrade1_2_002() +{ + // change the phone-status: call --> not-started, will-call --> ongoing to be able to sync them + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='not-started' WHERE info_status='call'",__LINE__,__FILE__); + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_status='ongoing' WHERE info_status='will-call'",__LINE__,__FILE__); + + // remove the call and will-call from the custom stati, if they exist + $config =& CreateObject('phpgwapi.config','infolog'); + $config->read_repository(); + if (is_array($config->config_data['status']['phone'])) + { + unset($config->config_data['status']['phone']['call']); + unset($config->config_data['status']['phone']['will-call']); + + $config->save_repository(); + } + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.003'; +} + + +function infolog_upgrade1_2_003() +{ + // fix wrong info_responsible='' --> '0' + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_infolog SET info_responsible='0' WHERE info_responsible=''",__LINE__,__FILE__); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.2.004'; +} + + +function infolog_upgrade1_2_004() +{ + // column to save if from contains a custom text + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_custom_from',array( + 'type' => 'int', + 'precision' => '1', + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.3.001'; +} + + +function infolog_upgrade1_3_001() +{ + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.4'; +} + + +function infolog_upgrade1_4() +{ + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_uid',array( + 'type' => 'varchar', + 'precision' => '255' + )); + $GLOBALS['egw_setup']->db->query("SELECT config_value FROM egw_config WHERE config_app='phpgwapi' AND config_name='install_id'",__LINE__,__FILE__); + $install_id = $GLOBALS['egw_setup']->db->next_record() ? $GLOBALS['egw_setup']->db->f(0) : md5(time()); + $GLOBALS['egw_setup']->db->query('UPDATE egw_infolog SET info_uid='.$GLOBALS['egw_setup']->db->concat("'infolog-'",'info_id',"'-$install_id'"),__LINE__,__FILE__); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.001'; +} + + +/** + * Fix missing info_from values, caused by a (fixed) bug + * + * @return string version + */ +function infolog_upgrade1_5_001() +{ + foreach($GLOBALS['egw_setup']->db->select('egw_infolog','info_id,info_link_id,org_name,adr_one_locality,n_family,n_given',array( + 'info_from' => '', + 'info_link_id > 0', + ),__LINE__,__FILE__,false,'','infolog',0, + " JOIN egw_links ON info_link_id=link_id AND link_app2='addressbook'". + " JOIN egw_addressbook ON contact_id=link_id2") as $row) + { + $from = ($row['org_name'] ? $row['org_name'].', '.$row['adr_one_locality'].': ' : ''). + $row['n_family'].($row['n_given'] ? ', '.$row['n_given'] : ''); + $GLOBALS['egw_setup']->db->update('egw_infolog',array('info_from' => $from), + array('info_id' => $row['info_id']),__LINE__,__FILE__,'infolog'); + } + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.002'; +} + + +/** + * make customfield names varchar(64) and values text + * + * @return string version + */ +function infolog_upgrade1_5_002() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra','info_extra_name',array( + 'type' => 'varchar', + 'precision' => '64', + 'nullable' => False + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_infolog_extra','info_extra_value',array( + 'type' => 'text', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.003'; +} + + +/** + * Add re-planned time column + * + * @return string version + */ +function infolog_upgrade1_5_003() +{ + $GLOBALS['egw_setup']->oProc->AddColumn('egw_infolog','info_replanned_time',array( + 'type' => 'int', + 'precision' => '4', + 'nullable' => False, + 'default' => '0' + )); + + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.5.004'; +} + + +/** + * 1.6 release + * + * @return string + */ +function infolog_upgrade1_5_004() +{ + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.6'; +} + + +function infolog_upgrade1_6() +{ + return $GLOBALS['setup_info']['infolog']['currentver'] = '1.8'; +} diff --git a/notifications/setup/setup.inc.php b/notifications/setup/setup.inc.php new file mode 100644 index 0000000000..225e7c480b --- /dev/null +++ b/notifications/setup/setup.inc.php @@ -0,0 +1,51 @@ + + * @version $Id$ + */ + +if (!defined('NOTIFICATION_APP')) +{ + define('NOTIFICATION_APP','notifications'); +} + +$setup_info[NOTIFICATION_APP]['name'] = NOTIFICATION_APP; +$setup_info[NOTIFICATION_APP]['version'] = '1.8'; +$setup_info[NOTIFICATION_APP]['app_order'] = 1; +$setup_info[NOTIFICATION_APP]['tables'] = array('egw_notificationpopup'); +$setup_info[NOTIFICATION_APP]['enable'] = 2; + +$setup_info[NOTIFICATION_APP]['author'] = 'Cornelius Weiss'; +$setup_info[NOTIFICATION_APP]['maintainer'] = array( + 'name' => 'eGroupware coreteam', + 'email' => 'egroupware-developers@lists.sf.net' +); +$setup_info[NOTIFICATION_APP]['license'] = 'GPL'; +$setup_info[NOTIFICATION_APP]['description'] = +'Instant notification of users via various channels.'; + +/* The hooks this app includes, needed for hooks registration */ +$setup_info[NOTIFICATION_APP]['hooks'][] = 'after_navbar'; +$setup_info[NOTIFICATION_APP]['hooks'][] = 'preferences'; +$setup_info[NOTIFICATION_APP]['hooks'][] = 'settings'; +$setup_info[NOTIFICATION_APP]['hooks'][] = 'admin'; +//$setup_info[NOTIFICATION_APP]['hooks']['settings'] = NOTIFICATION_APP.'.ts_admin_prefs_sidebox_hooks.settings'; +//$setup_info[NOTIFICATION_APP]['hooks']['admin'] = NOTIFICATION_APP.'.ts_admin_prefs_sidebox_hooks.all_hooks'; +//$setup_info[NOTIFICATION_APP]['hooks']['sidebox_menu'] = NOTIFICATION_APP.'.ts_admin_prefs_sidebox_hooks.all_hooks'; +//$setup_info[NOTIFICATION_APP]['hooks']['search_link'] = NOTIFICATION_APP.'.bonotification.search_link'; + +/* Dependencies for this app to work */ +$setup_info[NOTIFICATION_APP]['depends'][] = array( + 'appname' => 'phpgwapi', + 'versions' => Array('1.7','1.8','1.9') +); +$setup_info[NOTIFICATION_APP]['depends'][] = array( + 'appname' => 'etemplate', + 'versions' => Array('1.7','1.8','1.9') +); + diff --git a/notifications/setup/tables_update.inc.php b/notifications/setup/tables_update.inc.php new file mode 100644 index 0000000000..b7671597d8 --- /dev/null +++ b/notifications/setup/tables_update.inc.php @@ -0,0 +1,40 @@ +oProc->AlterColumn('egw_notificationpopup','account_id',array( + 'type' => 'int', + 'precision' => '20', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['notifications']['currentver'] = '0.6'; +} + + +function notifications_upgrade0_6() +{ + return $GLOBALS['setup_info']['notifications']['currentver'] = '1.4'; +} + + +function notifications_upgrade1_4() +{ + return $GLOBALS['setup_info']['notifications']['currentver'] = '1.6'; +} + + +function notifications_upgrade1_6() +{ + return $GLOBALS['setup_info']['notifications']['currentver'] = '1.8'; +} diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php new file mode 100755 index 0000000000..802560ce2a --- /dev/null +++ b/phpgwapi/setup/setup.inc.php @@ -0,0 +1,79 @@ + 'eGroupWare coreteam', + 'email' => 'egroupware-developers@lists.sourceforge.net', +); + +/* The tables this app creates */ +$setup_info['phpgwapi']['tables'][] = 'egw_config'; +$setup_info['phpgwapi']['tables'][] = 'egw_applications'; +$setup_info['phpgwapi']['tables'][] = 'egw_acl'; +$setup_info['phpgwapi']['tables'][] = 'egw_accounts'; +$setup_info['phpgwapi']['tables'][] = 'egw_preferences'; +$setup_info['phpgwapi']['tables'][] = 'egw_sessions'; +$setup_info['phpgwapi']['tables'][] = 'egw_app_sessions'; +$setup_info['phpgwapi']['tables'][] = 'egw_access_log'; +$setup_info['phpgwapi']['tables'][] = 'egw_hooks'; +$setup_info['phpgwapi']['tables'][] = 'egw_languages'; +$setup_info['phpgwapi']['tables'][] = 'egw_lang'; +$setup_info['phpgwapi']['tables'][] = 'egw_nextid'; +$setup_info['phpgwapi']['tables'][] = 'egw_categories'; +$setup_info['phpgwapi']['tables'][] = 'egw_log'; +$setup_info['phpgwapi']['tables'][] = 'egw_log_msg'; +$setup_info['phpgwapi']['tables'][] = 'egw_interserv'; +$setup_info['phpgwapi']['tables'][] = 'egw_vfs'; +$setup_info['phpgwapi']['tables'][] = 'egw_history_log'; +$setup_info['phpgwapi']['tables'][] = 'egw_async'; +$setup_info['phpgwapi']['tables'][] = 'egw_api_content_history'; +$setup_info['phpgwapi']['tables'][] = 'egw_links'; +$setup_info['phpgwapi']['tables'][] = 'egw_addressbook'; +$setup_info['phpgwapi']['tables'][] = 'egw_addressbook_extra'; +$setup_info['phpgwapi']['tables'][] = 'egw_addressbook_lists'; +$setup_info['phpgwapi']['tables'][] = 'egw_addressbook2list'; +$setup_info['phpgwapi']['tables'][] = 'egw_sqlfs'; +$setup_info['phpgwapi']['tables'][] = 'egw_index_keywords'; +$setup_info['phpgwapi']['tables'][] = 'egw_index'; +$setup_info['phpgwapi']['tables'][] = 'egw_cat2entry'; +$setup_info['phpgwapi']['tables'][] = 'egw_locks'; +$setup_info['phpgwapi']['tables'][] = 'egw_sqlfs_props'; + +// hooks used by vfs_home_hooks to manage user- and group-directories for the new stream based VFS +$setup_info['phpgwapi']['hooks']['addaccount'] = 'phpgwapi.vfs_home_hooks.addAccount'; +$setup_info['phpgwapi']['hooks']['deleteaccount'] = 'phpgwapi.vfs_home_hooks.deleteAccount'; +$setup_info['phpgwapi']['hooks']['editaccount'] = 'phpgwapi.vfs_home_hooks.editAccount'; +$setup_info['phpgwapi']['hooks']['addgroup'] = 'phpgwapi.vfs_home_hooks.addGroup'; +$setup_info['phpgwapi']['hooks']['deletegroup'] = 'phpgwapi.vfs_home_hooks.deleteGroup'; +$setup_info['phpgwapi']['hooks']['editgroup'] = 'phpgwapi.vfs_home_hooks.editGroup'; + +/* CalDAV/CardDAV/GroupDAV app */ +$setup_info['groupdav']['name'] = 'groupdav'; +$setup_info['groupdav']['version'] = '1.8'; +$setup_info['groupdav']['enable'] = 2; +$setup_info['groupdav']['app_order'] = 1; +$setup_info['groupdav']['icon'] = 'groupdav'; +$setup_info['groupdav']['icon_app'] = 'phpgwapi'; +$setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = array( + 'name' => 'Ralf Becker', + 'email' => 'RalfBecker@outdoor-training.de' +); +$setup_info['groupdav']['license'] = 'GPL'; + + diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php new file mode 100644 index 0000000000..b61397c823 --- /dev/null +++ b/phpgwapi/setup/tables_update.inc.php @@ -0,0 +1,69 @@ + 1.8 + * + * @link http://www.egroupware.org + * @package api + * @subpackage setup + * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License + * @version $Id$ + */ + +/* Include older eGroupWare update support */ +include('tables_update_0_9_9.inc.php'); +include('tables_update_0_9_10.inc.php'); +include('tables_update_0_9_12.inc.php'); +include('tables_update_0_9_14.inc.php'); +include('tables_update_1_0.inc.php'); +include('tables_update_1_2.inc.php'); +include('tables_update_1_4.inc.php'); + +/** + * Update from the stable 1.6 branch to the new devel branch 1.7.xxx + */ +function phpgwapi_upgrade1_6_001() +{ + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.7.001'; +} + +function phpgwapi_upgrade1_6_002() +{ + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.7.001'; +} + +function phpgwapi_upgrade1_6_003() +{ + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.7.001'; +} + +function phpgwapi_upgrade1_7_001() +{ + $GLOBALS['egw_setup']->oProc->AddColumn('egw_sqlfs','fs_link',array( + 'type' => 'varchar', + 'precision' => '255' + )); + // moving symlinks from fs_content to fs_link + $GLOBALS['egw_setup']->oProc->query("UPDATE egw_sqlfs SET fs_link=fs_content,fs_content=NULL WHERE fs_mime='application/x-symlink'",__LINE__,__FILE__); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.7.002'; +} + + +function phpgwapi_upgrade1_7_002() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_sqlfs','fs_mime',array( + 'type' => 'varchar', + 'precision' => '96', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.7.003'; +} + + +function phpgwapi_upgrade1_7_003() +{ + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.8.001'; +} diff --git a/phpgwapi/templates/default/images/logo.png b/phpgwapi/templates/default/images/logo.png new file mode 100644 index 0000000000..57646bd137 Binary files /dev/null and b/phpgwapi/templates/default/images/logo.png differ diff --git a/preferences/setup/setup.inc.php b/preferences/setup/setup.inc.php new file mode 100755 index 0000000000..499335a051 --- /dev/null +++ b/preferences/setup/setup.inc.php @@ -0,0 +1,30 @@ + 'phpgwapi', + 'versions' => Array('1.7','1.8','1.9') +); diff --git a/resources/setup/setup.inc.php b/resources/setup/setup.inc.php new file mode 100755 index 0000000000..c37c018071 --- /dev/null +++ b/resources/setup/setup.inc.php @@ -0,0 +1,46 @@ + + * @author Lukas Weiss