diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-11-09 08:48:41 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2012-11-09 08:48:41 -0600 |
commit | 6c8c54d4d2575cd40fe873cd2108b031ae5830a6 (patch) | |
tree | e2360204a3d9ac191f198e113170a9d26a224a70 /phpBB/install | |
parent | 6a0f6833e61532d28d7bebcc8ad0ec2b2b722e19 (diff) | |
download | forums-6c8c54d4d2575cd40fe873cd2108b031ae5830a6.tar forums-6c8c54d4d2575cd40fe873cd2108b031ae5830a6.tar.gz forums-6c8c54d4d2575cd40fe873cd2108b031ae5830a6.tar.bz2 forums-6c8c54d4d2575cd40fe873cd2108b031ae5830a6.tar.xz forums-6c8c54d4d2575cd40fe873cd2108b031ae5830a6.zip |
[ticket/11103] Inject table prefix to notifications system instead of constants
PHPBB3-11103
Diffstat (limited to 'phpBB/install')
-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'], |