aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2012-12-13 19:56:39 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2012-12-13 19:56:39 -0600
commitbec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0 (patch)
treeca5839c4c269ce37cc62ea1847fc7565707c7c9d
parentddd874ba76366cebe3cc30df6daa1974e29f34d1 (diff)
downloadforums-bec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0.tar
forums-bec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0.tar.gz
forums-bec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0.tar.bz2
forums-bec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0.tar.xz
forums-bec05a11f38cd57d7e7a6c7f64ecdb7351e24fc0.zip
[ticket/11103] Add constants for the tables
PHPBB3-11103
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/install/database_update.php14
2 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 68af41ab20..7a3c73e987 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -239,6 +239,7 @@ define('LOG_TABLE', $table_prefix . 'log');
define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts');
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
define('MODULES_TABLE', $table_prefix . 'modules');
+define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications');
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
define('POSTS_TABLE', $table_prefix . 'posts');
@@ -272,6 +273,7 @@ define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
define('USER_GROUP_TABLE', $table_prefix . 'user_group');
+define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications');
define('USERS_TABLE', $table_prefix . 'users');
define('WARNINGS_TABLE', $table_prefix . 'warnings');
define('WORDS_TABLE', $table_prefix . 'words');
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 4adce77c33..c605e0b0e9 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -93,6 +93,14 @@ if (!defined('LOGIN_ATTEMPT_TABLE'))
{
define('LOGIN_ATTEMPT_TABLE', $table_prefix . 'login_attempts');
}
+if (!defined('NOTIFICATIONS_TABLE'))
+{
+ define('NOTIFICATIONS_TABLE', $table_prefix . 'notifications');
+}
+if (!defined('USER_NOTIFICATIONS_TABLE'))
+{
+ define('USER_NOTIFICATIONS_TABLE', $table_prefix . 'user_notifications');
+}
if (!defined('EXT_TABLE'))
{
define('EXT_TABLE', $table_prefix . 'ext');
@@ -886,8 +894,6 @@ function _add_permission(auth_admin $auth_admin, phpbb_db_driver $db, $permissio
*****************************************************************************/
function database_update_info()
{
- global $table_prefix;
-
return array(
// Changes from 3.0.0 to the next version
'3.0.0' => array(
@@ -1173,7 +1179,7 @@ function database_update_info()
'ext_name' => array('UNIQUE', 'ext_name'),
),
),
- $table_prefix . 'notifications' => array(
+ NOTIFICATIONS_TABLE => array(
'COLUMNS' => array(
'notification_id' => array('UINT', NULL, 'auto_increment'),
'item_type' => array('VCHAR:255', ''),
@@ -1191,7 +1197,7 @@ function database_update_info()
'user' => array('INDEX', array('user_id', 'unread')),
),
),
- $table_prefix . 'user_notifications' => array(
+ USER_NOTIFICATIONS_TABLE => array(
'COLUMNS' => array(
'item_type' => array('VCHAR:255', ''),
'item_id' => array('UINT', 0),