diff --git a/infolog/setup/setup.inc.php b/infolog/setup/setup.inc.php index 691736976d..32a48ab4b3 100755 --- a/infolog/setup/setup.inc.php +++ b/infolog/setup/setup.inc.php @@ -12,8 +12,7 @@ /* $Id$ */ $setup_info['infolog']['name'] = 'infolog'; - $setup_info['infolog']['title'] = 'InfoLog'; // still needed to run in 0.9.14/6 - $setup_info['infolog']['version'] = '0.9.15.004'; + $setup_info['infolog']['version'] = '0.9.15.005'; $setup_info['infolog']['app_order'] = 4; $setup_info['infolog']['tables'] = array('phpgw_infolog','phpgw_links'); $setup_info['infolog']['enable'] = 1; @@ -43,7 +42,9 @@ 'Their 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).'; + (again) to the addressbook entrys).
+ More information about InfoLog and the current development-status can be found on the + InfoLog page in our Wiki.'; /* The hooks this app includes, needed for hooks registration */ $setup_info['infolog']['hooks'][] = 'preferences'; @@ -60,10 +61,10 @@ /* Dependencies for this app to work */ $setup_info['infolog']['depends'][] = array( 'appname' => 'phpgwapi', - 'versions' => Array('0.9.13','0.9.14','0.9.15') + 'versions' => Array('0.9.13','0.9.14','0.9.15','0.9.16') ); $setup_info['infolog']['depends'][] = array( 'appname' => 'etemplate', - 'versions' => Array('0.9.15') + 'versions' => Array('0.9.15','0.9.16') ); ?> diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php index 05a7d464b8..7954ebaf3a 100644 --- a/infolog/setup/tables_update.inc.php +++ b/infolog/setup/tables_update.inc.php @@ -57,16 +57,16 @@ $test[] = '0.9.15.002'; function infolog_upgrade0_9_15_002() { - echo "
infolog_upgrade0_9_15_002
\n"; + //echo "infolog_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"; + //echo "copying address-links: $insert.$select
\n"; $GLOBALS['phpgw_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"; + //echo "copying projects-links: $insert.$select
\n"; $GLOBALS['phpgw_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"; + //echo "copying calendar-links: $insert.$select
\n"; $GLOBALS['phpgw_setup']->oProc->query($insert.$select); $GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_infolog',array( @@ -216,4 +216,26 @@ $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.004'; return $GLOBALS['setup_info']['infolog']['currentver']; } + + $test[] = '0.9.15.004'; + function infolog_upgrade0_9_15_004() + { + // this update correctes wrong escapes of ' and " in the past + // + $db2 = $GLOBALS['phpgw_setup']->db; // we need a 2. result-set + + $to_correct = array('info_from','info_subject','info_des'); + foreach ($to_correct as $col) + { + $GLOBALS['phpgw_setup']->oProc->query("SELECT info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'"); + while ($GLOBALS['phpgw_setup']->oProc->next_record()) + { + $db2->query("UPDATE phpgw_infolog SET $col='".$db2->db_addslashes(stripslashes($GLOBALS['phpgw_setup']->oProc->f($col))). + "' WHERE info_id=".$GLOBALS['phpgw_setup']->oProc->f('info_id')); + } + } + + $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.005'; + return $GLOBALS['setup_info']['infolog']['currentver']; + } ?>