diff options
-rw-r--r-- | phpBB/db/postgres_schema.sql | 3 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql index 216fe4c532..82c04133bc 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -182,10 +182,10 @@ CREATE INDEX _phpbb_forum_mods_index ON phpbb_forum_mods (forum_id, user_id); -------------------------------------------------------- */ CREATE TABLE phpbb_forums ( forum_id int4 DEFAULT nextval('phpbb_forums_id_seq'::text) NOT NULL, + cat_id int4, forum_name varchar(150), forum_desc text, forum_access int2, - cat_id int4, forum_order int4 DEFAULT '1' NOT NULL, forum_type int2, forum_posts int4 DEFAULT '0' NOT NULL, @@ -234,6 +234,7 @@ CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id); -------------------------------------------------------- */ CREATE TABLE phpbb_posts_text ( post_id int4 DEFAULT '0' NOT NULL, + post_subject varchar(255), post_text text, CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id) ); diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 56edebdacb..92e96903ad 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -136,7 +136,7 @@ else $join_sql_table = (!isset($post_id)) ? "" : "".POSTS_TABLE." p, ".POSTS_TABLE." p2,"; $join_sql = (!isset($post_id)) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id"; $count_sql = (!isset($post_id)) ? "" : ", COUNT(p2.post_id) AS prev_posts"; - $order_sql = (!isset($post_id)) ? "" : "GROUP BY fm.user_id, p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, u.username, u.user_id, fa.auth_read ORDER BY p.post_id ASC"; + $order_sql = (!isset($post_id)) ? "" : "GROUP BY fa.forum_id, fa.auth_view, fa.auth_post, fa.auth_reply, fa.auth_edit, fa.auth_delete, fa.auth_vote, fa.auth_votecreate, fm.user_id, p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, u.username, u.user_id, fa.auth_read ORDER BY p.post_id ASC"; $sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, f.forum_name, f.forum_id, u.username, u.user_id, fa.*".$count_sql." FROM $join_sql_table ".TOPICS_TABLE." t, ".FORUMS_TABLE." f, ".FORUM_MODS_TABLE." fm, ".USERS_TABLE." u, ".AUTH_FORUMS_TABLE." fa |