aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-05-31 20:06:23 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-05-31 20:06:23 +0000
commit09e7aef1205423d9e438859deb85b24a7c5d1cb0 (patch)
treee05b7be1d42e63009fdaaac580fd6805fefbda2c /phpBB
parent3ed50ce0b7665fcd6a2a80d1f5bc6630089382d5 (diff)
downloadforums-09e7aef1205423d9e438859deb85b24a7c5d1cb0.tar
forums-09e7aef1205423d9e438859deb85b24a7c5d1cb0.tar.gz
forums-09e7aef1205423d9e438859deb85b24a7c5d1cb0.tar.bz2
forums-09e7aef1205423d9e438859deb85b24a7c5d1cb0.tar.xz
forums-09e7aef1205423d9e438859deb85b24a7c5d1cb0.zip
Added post subject to postgres schema. Updated viewtopic query to include group by for the auth forums table when linking after posting
git-svn-id: file:///svn/phpbb/trunk@389 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/db/postgres_schema.sql3
-rw-r--r--phpBB/viewtopic.php2
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