aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search/fulltext_native.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-08-30 19:47:16 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-30 19:47:16 +0200
commit5b54ec2d64009eae17a7bfc12975caef03f7bec0 (patch)
tree516739d087aa2a9beec93ca0a0799d9f34dfc363 /phpBB/includes/search/fulltext_native.php
parent1c043254c00023a5fe17b1131fa605ca11d823a0 (diff)
downloadforums-5b54ec2d64009eae17a7bfc12975caef03f7bec0.tar
forums-5b54ec2d64009eae17a7bfc12975caef03f7bec0.tar.gz
forums-5b54ec2d64009eae17a7bfc12975caef03f7bec0.tar.bz2
forums-5b54ec2d64009eae17a7bfc12975caef03f7bec0.tar.xz
forums-5b54ec2d64009eae17a7bfc12975caef03f7bec0.zip
[feature/soft-delete] Try to fix search.php
at least it's running now, but the performance is not very good. PHPBB3-9657
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
-rw-r--r--phpBB/includes/search/fulltext_native.php26
1 files changed, 6 insertions, 20 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index c7e7a451e4..e7fb4bd105 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -819,7 +819,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* @param int $per_page number of ids each page is supposed to contain
* @return boolean|int total number of results
*/
- public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
+ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $post_visibility, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page)
{
// No author? No posts.
if (!sizeof($author_ary))
@@ -838,7 +838,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
-// @TODO implode(',', $m_approve_fid_ary),
+ $post_visibility,
implode(',', $author_ary),
$author_name,
)));
@@ -888,20 +888,6 @@ class phpbb_search_fulltext_native extends phpbb_search_base
break;
}
-/* if (!sizeof($m_approve_fid_ary))
- {
- $m_approve_fid_sql = ' AND p.post_approved = 1';
- }
- else if ($m_approve_fid_ary == array(-1))
- {
- $m_approve_fid_sql = '';
- }
- else
- {
- $m_approve_fid_sql = ' AND (p.post_approved = 1 OR ' . $this->db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
- }
-*/
-
$select = ($type == 'posts') ? 'p.post_id' : 't.topic_id';
$is_mysql = false;
@@ -924,7 +910,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
$sql_time";
}
@@ -944,7 +930,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
AND t.topic_id = p.topic_id
$sql_time" . (($this->db->sql_layer == 'sqlite') ? ')' : '');
@@ -970,7 +956,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
$sql_sort_join
$sql_time
@@ -984,7 +970,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
WHERE $sql_author
$sql_topic_id
$sql_firstpost
- $m_approve_fid_sql
+ $post_visibility
$sql_fora
AND t.topic_id = p.topic_id
$sql_sort_join