aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-03-19 22:25:43 +0000
committerNils Adermann <naderman@naderman.de>2006-03-19 22:25:43 +0000
commitcbbc1d2a4532bde2b612a9757f828e0416e668e2 (patch)
treebc72bc244514b2121f6b963b65d732df9478061c /phpBB/search.php
parent7dda2cd9bfeb04fc778f96af312a6889e919f409 (diff)
downloadforums-cbbc1d2a4532bde2b612a9757f828e0416e668e2.tar
forums-cbbc1d2a4532bde2b612a9757f828e0416e668e2.tar.gz
forums-cbbc1d2a4532bde2b612a9757f828e0416e668e2.tar.bz2
forums-cbbc1d2a4532bde2b612a9757f828e0416e668e2.tar.xz
forums-cbbc1d2a4532bde2b612a9757f828e0416e668e2.zip
- Bug 1104: fixed a typo ($necoding => $encoding)
- Bug 1139: active_topics now has a button to submit the "Display posts from previous <time>" form - active_topics doesn't return NULL rows anymore - fix a padding bug in the search forum listing git-svn-id: file:///svn/phpbb/trunk@5674 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 13d64a7230..034bd38572 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -263,9 +263,10 @@ if ($keywords || $author || $search_id)
$last_post_time = (time() - ($sort_days * 24 * 3600));
$sql = 'SELECT DISTINCT t.topic_id
- FROM ' . POSTS_TABLE . ' p
- LEFT JOIN ' . TOPICS_TABLE . " t ON (t.topic_approved = 1 AND p.topic_id = t.topic_id)
+ FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . " t
WHERE p.post_time > $last_post_time
+ AND t.topic_approved = 1
+ AND p.topic_id = t.topic_id
$m_approve_fid_sql
" . ((sizeof($ex_fid_ary)) ? ' AND p.forum_id NOT IN (' . implode(',', $ex_fid_ary) . ')' : '') . '
ORDER BY t.topic_last_post_time DESC';
@@ -736,7 +737,14 @@ while ($row = $db->sql_fetchrow($result))
}
else if ($row['left_id'] > $right + 1)
{
- $padding = $pad_store[$row['parent_id']];
+ if (isset($pad_store[$row['parent_id']]))
+ {
+ $padding = $pad_store[$row['parent_id']];
+ }
+ else
+ {
+ continue;
+ }
}
$right = $row['right_id'];