summaryrefslogtreecommitdiff
path: root/modules/forum/forum.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r--modules/forum/forum.module10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 4d06b42c1..23232b85d 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -369,9 +369,9 @@ function _forum_topics_read($uid) {
}
function _forum_last_post($term) {
- $topic = db_fetch_object(db_query_range("SELECT n.nid, n.created AS timestamp, u.name AS name, u.uid AS uid FROM forum f, node n LEFT JOIN users u ON n.uid = u.uid WHERE f.tid = %d AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 ORDER BY timestamp DESC", $term, 0, 1));
+ $topic = db_fetch_object(db_query_range("SELECT n.nid, n.created AS timestamp, u.name AS name, u.uid AS uid FROM forum f LEFT JOIN node n ON n.nid = f.nid LEFT JOIN users u ON n.uid = u.uid WHERE f.tid = %d AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 ORDER BY timestamp DESC", $term, 0, 1));
- $reply = db_fetch_object(db_query_range("SELECT n.nid, c.timestamp, u.name AS name, u.uid AS uid FROM forum f, node n LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON c.uid = u.uid WHERE f.tid = %d AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 AND c.status = 0 ORDER BY c.timestamp DESC", $term, 0, 1));
+ $reply = db_fetch_object(db_query_range("SELECT n.nid, c.timestamp, u.name AS name, u.uid AS uid FROM forum f LEFT JOIN node n ON n.nid = f.nid LEFT JOIN comments c ON n.nid = c.nid LEFT JOIN users u ON c.uid = u.uid WHERE f.tid = %d AND n.nid = f.nid AND n.type = 'forum' AND n.status = 1 AND c.status = 0 ORDER BY c.timestamp DESC", $term, 0, 1));
$value = ($topic->timestamp > $reply->timestamp) ? $topic : $reply;
@@ -451,9 +451,9 @@ function _forum_message_taxonomy() {
function forum_page() {
global $sortby, $forum_per_page, $from, $user;
-
+
$op = $_POST["op"];
-
+
if (user_access("access content")) {
if (module_exist("taxonomy")) {
$tid = arg(1);
@@ -466,7 +466,7 @@ function forum_page() {
drupal_goto(url("node/view/$nid"));
}
}
-
+
if (empty($sortby)) {
$sortby = isset($user->sortby) ? $user->sortby : variable_get("forum_order",1);
}