From 23c21cb37268ea6af05ad7245d4ed4a8854c87c0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 14 Apr 2011 05:55:55 +0000 Subject: [PATCH] - no need to run RefreshTable (only necessary if multicolumn index got changed) - emptying notification table, as it can contain thousands of old, not delivered entries --- notifications/setup/setup.inc.php | 6 +----- notifications/setup/tables_update.inc.php | 17 +++++++---------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/notifications/setup/setup.inc.php b/notifications/setup/setup.inc.php index 3b38ee194d..66b3388380 100644 --- a/notifications/setup/setup.inc.php +++ b/notifications/setup/setup.inc.php @@ -15,7 +15,7 @@ if (!defined('NOTIFICATION_APP')) } $setup_info[NOTIFICATION_APP]['name'] = NOTIFICATION_APP; -$setup_info[NOTIFICATION_APP]['version'] = '1.9.001'; +$setup_info[NOTIFICATION_APP]['version'] = '1.9.002'; $setup_info[NOTIFICATION_APP]['app_order'] = 1; $setup_info[NOTIFICATION_APP]['tables'] = array('egw_notificationpopup'); $setup_info[NOTIFICATION_APP]['enable'] = 2; @@ -35,10 +35,6 @@ $setup_info[NOTIFICATION_APP]['hooks'][] = 'preferences'; $setup_info[NOTIFICATION_APP]['hooks'][] = 'settings'; $setup_info[NOTIFICATION_APP]['hooks'][] = 'admin'; $setup_info[NOTIFICATION_APP]['hooks']['deleteaccount'] = 'notifications.notifications.deleteaccount'; -//$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( diff --git a/notifications/setup/tables_update.inc.php b/notifications/setup/tables_update.inc.php index bae5094f89..9ff2f826ee 100644 --- a/notifications/setup/tables_update.inc.php +++ b/notifications/setup/tables_update.inc.php @@ -51,17 +51,14 @@ function notifications_upgrade1_8() 'ix' => array('account_id'), 'uc' => array() ),'session_id'); - $GLOBALS['egw_setup']->oProc->RefreshTable('egw_notificationpopup',array( - 'fd' => array( - 'account_id' => array('type' => 'int','precision' => '20','nullable' => False), - 'message' => array('type' => 'longtext') - ), - 'pk' => array(), - 'fk' => array(), - 'ix' => array('account_id'), - 'uc' => array() - )); return $GLOBALS['setup_info']['notifications']['currentver'] = '1.9.001'; } +function notifications_upgrade1_9_001() +{ + // empty notificationpopup table, as it can contain thousands of old entries, not delivered before + $GLOBALS['egw_setup']->db->query('DELETE FROM egw_notificationpopup'); + + return $GLOBALS['setup_info']['notifications']['currentver'] = '1.9.002'; +}