aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/install')
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php6
-rw-r--r--phpBB/install/database_update.php16
-rw-r--r--phpBB/install/schemas/firebird_schema.sql6
-rw-r--r--phpBB/install/schemas/mssql_schema.sql6
-rw-r--r--phpBB/install/schemas/mysql_40_schema.sql6
-rw-r--r--phpBB/install/schemas/mysql_41_schema.sql6
-rw-r--r--phpBB/install/schemas/oracle_schema.sql6
-rw-r--r--phpBB/install/schemas/postgres_schema.sql6
-rw-r--r--phpBB/install/schemas/sqlite_schema.sql6
10 files changed, 35 insertions, 31 deletions
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index 9edfc9fd13..09373d87c2 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -495,7 +495,7 @@ if (!$get_info)
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
array('topic_time', 'topics.topic_time', ''),
array('topic_views', 'topics.topic_views', ''),
- array('topic_posts', 'topics.topic_replies + 1', ''),
+ array('topic_posts_approved', 'topics.topic_replies + 1', ''),
array('topic_posts_unapproved', 0, ''),
array('topic_posts_softdeleted',0, ''),
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index e2cbda3eeb..a698f0ef13 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -243,8 +243,10 @@ function phpbb_insert_forums()
'forum_rules_options' => 7,
'forum_rules_uid' => '',
'forum_topics_per_page' => 0,
- 'forum_posts' => 0,
- 'forum_topics' => 0,
+ 'forum_posts_approved' => 0,
+ 'forum_posts_unapproved' => 0,
+ 'forum_posts_softdeleted' => 0,
+ 'forum_topics_approved' => 0,
'forum_topics_unapproved' => 0,
'forum_topics_softdeleted' => 0,
'forum_last_post_id' => 0,
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 7ae4335b64..8f87f84704 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -1100,8 +1100,10 @@ function database_update_info()
),
'add_columns' => array(
FORUMS_TABLE => array(
+ 'forum_posts_approved' => array('UINT', 0),
'forum_posts_unapproved' => array('UINT', 0),
'forum_posts_softdeleted' => array('UINT', 0),
+ 'forum_topics_approved' => array('UINT', 0),
'forum_topics_unapproved' => array('UINT', 0),
'forum_topics_softdeleted' => array('UINT', 0),
),
@@ -1131,7 +1133,7 @@ function database_update_info()
'topic_delete_time' => array('TIMESTAMP', 0),
'topic_delete_reason' => array('STEXT_UNI', ''),
'topic_delete_user' => array('UINT', 0),
- 'topic_posts' => array('UINT', 0),
+ 'topic_posts_approved' => array('UINT', 0),
'topic_posts_unapproved' => array('UINT', 0),
'topic_posts_softdeleted' => array('UINT', 0),
),
@@ -2756,13 +2758,13 @@ function change_database_data(&$no_updates, $version)
if ($db_tools->sql_column_exists(TOPICS_TABLE, 'topic_replies'))
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_posts = topic_replies + 1,
+ SET topic_posts_approved = topic_replies + 1,
topic_posts_unapproved = topic_replies_real - topic_replies
WHERE topic_visibility = ' . ITEM_APPROVED;
_sql($sql, $errored, $error_ary);
$sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_posts = 0,
+ SET topic_posts_approved = 0,
topic_posts_unapproved = (topic_replies_real - topic_replies) + 1
WHERE topic_visibility = ' . ITEM_UNAPPROVED;
_sql($sql, $errored, $error_ary);
@@ -2779,17 +2781,17 @@ function change_database_data(&$no_updates, $version)
if (!isset($update_forums[$forum_id]))
{
$update_forums[$forum_id] = array(
- 'forum_posts' => 0,
+ 'forum_posts_approved' => 0,
'forum_posts_unapproved' => 0,
- 'forum_topics' => 0,
+ 'forum_topics_approved' => 0,
'forum_topics_unapproved' => 0,
);
}
- $update_forums[$forum_id]['forum_posts'] += (int) $row['sum_posts'];
+ $update_forums[$forum_id]['forum_posts_approved'] += (int) $row['sum_posts'];
$update_forums[$forum_id]['forum_posts_unapproved'] += (int) $row['sum_posts_unapproved'];
- $update_forums[$forum_id][(($row['topic_visibility'] == ITEM_APPROVED) ? 'forum_topics' : 'forum_topics_unapproved')] += (int) $row['sum_topics'];
+ $update_forums[$forum_id][(($row['topic_visibility'] == ITEM_APPROVED) ? 'forum_topics_approved' : 'forum_topics_unapproved')] += (int) $row['sum_topics'];
}
$db->sql_freeresult($result);
diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql
index 87ad0c6480..331281562f 100644
--- a/phpBB/install/schemas/firebird_schema.sql
+++ b/phpBB/install/schemas/firebird_schema.sql
@@ -363,10 +363,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page INTEGER DEFAULT 0 NOT NULL,
forum_type INTEGER DEFAULT 0 NOT NULL,
forum_status INTEGER DEFAULT 0 NOT NULL,
- forum_posts INTEGER DEFAULT 0 NOT NULL,
+ forum_posts_approved INTEGER DEFAULT 0 NOT NULL,
forum_posts_unapproved INTEGER DEFAULT 0 NOT NULL,
forum_posts_softdeleted INTEGER DEFAULT 0 NOT NULL,
- forum_topics INTEGER DEFAULT 0 NOT NULL,
+ forum_topics_approved INTEGER DEFAULT 0 NOT NULL,
forum_topics_unapproved INTEGER DEFAULT 0 NOT NULL,
forum_topics_softdeleted INTEGER DEFAULT 0 NOT NULL,
forum_last_post_id INTEGER DEFAULT 0 NOT NULL,
@@ -1128,7 +1128,7 @@ CREATE TABLE phpbb_topics (
topic_time INTEGER DEFAULT 0 NOT NULL,
topic_time_limit INTEGER DEFAULT 0 NOT NULL,
topic_views INTEGER DEFAULT 0 NOT NULL,
- topic_posts INTEGER DEFAULT 0 NOT NULL,
+ topic_posts_approved INTEGER DEFAULT 0 NOT NULL,
topic_posts_unapproved INTEGER DEFAULT 0 NOT NULL,
topic_posts_softdeleted INTEGER DEFAULT 0 NOT NULL,
topic_status INTEGER DEFAULT 0 NOT NULL,
diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql
index c823533135..c3616803c9 100644
--- a/phpBB/install/schemas/mssql_schema.sql
+++ b/phpBB/install/schemas/mssql_schema.sql
@@ -442,10 +442,10 @@ CREATE TABLE [phpbb_forums] (
[forum_topics_per_page] [int] DEFAULT (0) NOT NULL ,
[forum_type] [int] DEFAULT (0) NOT NULL ,
[forum_status] [int] DEFAULT (0) NOT NULL ,
- [forum_posts] [int] DEFAULT (0) NOT NULL ,
+ [forum_posts_approved] [int] DEFAULT (0) NOT NULL ,
[forum_posts_unapproved] [int] DEFAULT (0) NOT NULL ,
[forum_posts_softdeleted] [int] DEFAULT (0) NOT NULL ,
- [forum_topics] [int] DEFAULT (0) NOT NULL ,
+ [forum_topics_approved] [int] DEFAULT (0) NOT NULL ,
[forum_topics_unapproved] [int] DEFAULT (0) NOT NULL ,
[forum_topics_softdeleted] [int] DEFAULT (0) NOT NULL ,
[forum_last_post_id] [int] DEFAULT (0) NOT NULL ,
@@ -1363,7 +1363,7 @@ CREATE TABLE [phpbb_topics] (
[topic_time] [int] DEFAULT (0) NOT NULL ,
[topic_time_limit] [int] DEFAULT (0) NOT NULL ,
[topic_views] [int] DEFAULT (0) NOT NULL ,
- [topic_posts] [int] DEFAULT (0) NOT NULL ,
+ [topic_posts_approved] [int] DEFAULT (0) NOT NULL ,
[topic_posts_unapproved] [int] DEFAULT (0) NOT NULL ,
[topic_posts_softdeleted] [int] DEFAULT (0) NOT NULL ,
[topic_status] [int] DEFAULT (0) NOT NULL ,
diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql
index b4545ed4ac..cdfc6b82c0 100644
--- a/phpBB/install/schemas/mysql_40_schema.sql
+++ b/phpBB/install/schemas/mysql_40_schema.sql
@@ -249,10 +249,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
- forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -790,7 +790,7 @@ CREATE TABLE phpbb_topics (
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql
index 9c53cab44e..633c8dbbc5 100644
--- a/phpBB/install/schemas/mysql_41_schema.sql
+++ b/phpBB/install/schemas/mysql_41_schema.sql
@@ -249,10 +249,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page tinyint(4) DEFAULT '0' NOT NULL,
forum_type tinyint(4) DEFAULT '0' NOT NULL,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
- forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ forum_topics_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
@@ -790,7 +790,7 @@ CREATE TABLE phpbb_topics (
topic_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_time_limit int(11) UNSIGNED DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
- topic_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
+ topic_posts_approved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_unapproved mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_posts_softdeleted mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql
index 3a4525734f..e757c9b69e 100644
--- a/phpBB/install/schemas/oracle_schema.sql
+++ b/phpBB/install/schemas/oracle_schema.sql
@@ -509,10 +509,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page number(4) DEFAULT '0' NOT NULL,
forum_type number(4) DEFAULT '0' NOT NULL,
forum_status number(4) DEFAULT '0' NOT NULL,
- forum_posts number(8) DEFAULT '0' NOT NULL,
+ forum_posts_approved number(8) DEFAULT '0' NOT NULL,
forum_posts_unapproved number(8) DEFAULT '0' NOT NULL,
forum_posts_softdeleted number(8) DEFAULT '0' NOT NULL,
- forum_topics number(8) DEFAULT '0' NOT NULL,
+ forum_topics_approved number(8) DEFAULT '0' NOT NULL,
forum_topics_unapproved number(8) DEFAULT '0' NOT NULL,
forum_topics_softdeleted number(8) DEFAULT '0' NOT NULL,
forum_last_post_id number(8) DEFAULT '0' NOT NULL,
@@ -1493,7 +1493,7 @@ CREATE TABLE phpbb_topics (
topic_time number(11) DEFAULT '0' NOT NULL,
topic_time_limit number(11) DEFAULT '0' NOT NULL,
topic_views number(8) DEFAULT '0' NOT NULL,
- topic_posts number(8) DEFAULT '0' NOT NULL,
+ topic_posts_approved number(8) DEFAULT '0' NOT NULL,
topic_posts_unapproved number(8) DEFAULT '0' NOT NULL,
topic_posts_softdeleted number(8) DEFAULT '0' NOT NULL,
topic_status number(3) DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql
index a8289940a9..0235c25267 100644
--- a/phpBB/install/schemas/postgres_schema.sql
+++ b/phpBB/install/schemas/postgres_schema.sql
@@ -385,10 +385,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page INT2 DEFAULT '0' NOT NULL,
forum_type INT2 DEFAULT '0' NOT NULL,
forum_status INT2 DEFAULT '0' NOT NULL,
- forum_posts INT4 DEFAULT '0' NOT NULL CHECK (forum_posts >= 0),
+ forum_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_approved >= 0),
forum_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_unapproved >= 0),
forum_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_posts_softdeleted >= 0),
- forum_topics INT4 DEFAULT '0' NOT NULL CHECK (forum_topics >= 0),
+ forum_topics_approved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_approved >= 0),
forum_topics_unapproved INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_unapproved >= 0),
forum_topics_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (forum_topics_softdeleted >= 0),
forum_last_post_id INT4 DEFAULT '0' NOT NULL CHECK (forum_last_post_id >= 0),
@@ -1028,7 +1028,7 @@ CREATE TABLE phpbb_topics (
topic_time INT4 DEFAULT '0' NOT NULL CHECK (topic_time >= 0),
topic_time_limit INT4 DEFAULT '0' NOT NULL CHECK (topic_time_limit >= 0),
topic_views INT4 DEFAULT '0' NOT NULL CHECK (topic_views >= 0),
- topic_posts INT4 DEFAULT '0' NOT NULL CHECK (topic_posts >= 0),
+ topic_posts_approved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_approved >= 0),
topic_posts_unapproved INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_unapproved >= 0),
topic_posts_softdeleted INT4 DEFAULT '0' NOT NULL CHECK (topic_posts_softdeleted >= 0),
topic_status INT2 DEFAULT '0' NOT NULL,
diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql
index 83d0d032b3..bd4b98eaf4 100644
--- a/phpBB/install/schemas/sqlite_schema.sql
+++ b/phpBB/install/schemas/sqlite_schema.sql
@@ -242,10 +242,10 @@ CREATE TABLE phpbb_forums (
forum_topics_per_page tinyint(4) NOT NULL DEFAULT '0',
forum_type tinyint(4) NOT NULL DEFAULT '0',
forum_status tinyint(4) NOT NULL DEFAULT '0',
- forum_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
- forum_topics INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ forum_topics_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_topics_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_topics_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
forum_last_post_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
@@ -765,7 +765,7 @@ CREATE TABLE phpbb_topics (
topic_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_time_limit INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_views INTEGER UNSIGNED NOT NULL DEFAULT '0',
- topic_posts INTEGER UNSIGNED NOT NULL DEFAULT '0',
+ topic_posts_approved INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_posts_unapproved INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_posts_softdeleted INTEGER UNSIGNED NOT NULL DEFAULT '0',
topic_status tinyint(3) NOT NULL DEFAULT '0',