diff options
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r-- | phpBB/install/database_update.php | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 94a4749313..9e884b0a37 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -110,14 +110,6 @@ if (!defined('EXT_TABLE')) { define('EXT_TABLE', $table_prefix . 'ext'); } -if (!defined('NOTIFICATIONS_TABLE')) -{ - define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications'); -} -if (!defined('USER_NOTIFICATIONS_TABLE')) -{ - define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications'); -} $phpbb_container = new ContainerBuilder(); $loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/../config')); @@ -1125,7 +1117,7 @@ function database_update_info() 'ext_name' => array('UNIQUE', 'ext_name'), ), ), - NOTIFICATIONS_TABLE => array( + $table_prefix . 'notifications' => array( 'COLUMNS' => array( 'notification_id' => array('UINT', NULL, 'auto_increment'), 'item_type' => array('VCHAR:255', ''), @@ -1148,7 +1140,7 @@ function database_update_info() 'is_enabled' => array('INDEX', 'is_enabled'), ), ), - USER_NOTIFICATIONS_TABLE => array( + $table_prefix . 'user_notifications' => array( 'COLUMNS' => array( 'item_type' => array('VCHAR:255', ''), 'item_id' => array('UINT', 0), @@ -2791,7 +2783,7 @@ function change_database_data(&$no_updates, $version) $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { - _sql('INSERT INTO ' . USER_NOTIFICATIONS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + _sql('INSERT INTO ' . $table_prefix . 'user_notifications ' . $db->sql_build_array('INSERT', array( 'item_type' => $convert_data['item_type'], 'item_id' => 0, 'user_id' => $row['user_id'], @@ -2800,7 +2792,7 @@ function change_database_data(&$no_updates, $version) if ($row['user_notify_type'] == NOTIFY_EMAIL || $row['user_notify_type'] == NOTIFY_BOTH) { - _sql('INSERT INTO ' . USER_NOTIFICATIONS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + _sql('INSERT INTO ' . $table_prefix . 'user_notifications ' . $db->sql_build_array('INSERT', array( 'item_type' => $convert_data['item_type'], 'item_id' => 0, 'user_id' => $row['user_id'], @@ -2810,7 +2802,7 @@ function change_database_data(&$no_updates, $version) if ($row['user_notify_type'] == NOTIFY_IM || $row['user_notify_type'] == NOTIFY_BOTH) { - _sql('INSERT INTO ' . USER_NOTIFICATIONS_TABLE . ' ' . $db->sql_build_array('INSERT', array( + _sql('INSERT INTO ' . $table_prefix . 'user_notifications ' . $db->sql_build_array('INSERT', array( 'item_type' => $convert_data['item_type'], 'item_id' => 0, 'user_id' => $row['user_id'], |