aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search/fulltext_native.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/search/fulltext_native.php')
-rw-r--r--phpBB/includes/search/fulltext_native.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 96b3f02ec6..c7e7a451e4 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -414,7 +414,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param array $m_approve_fid_sql specifies which types of posts the user can view
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids if the author should be ignored during the search the array is empty
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -451,7 +451,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+// @TODO implode(',', $m_approve_fid_ary),
implode(',', $author_ary),
$author_name,
)));
@@ -628,7 +628,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
$sql_where[] = '(' . implode(' OR ', $is_null_joins) . ')';
}
- if (!sizeof($m_approve_fid_ary))
+/* if (!sizeof($m_approve_fid_ary))
{
$sql_where[] = 'p.post_approved = 1';
}
@@ -636,6 +636,8 @@ class phpbb_search_fulltext_native extends phpbb_search_base
{
$sql_where[] = '(p.post_approved = 1 OR ' . $this->db->sql_in_set('p.forum_id', $m_approve_fid_ary, true) . ')';
}
+*/
+ $sql_where[] = $m_approve_fid_sql;
if ($topic_id)
{
@@ -808,7 +810,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* @param string $sort_dir is either a or d representing ASC and DESC
* @param string $sort_days specifies the maximum amount of days a post may be old
* @param array $ex_fid_ary specifies an array of forum ids which should not be searched
- * @param array $m_approve_fid_ary specifies an array of forum ids in which the searcher is allowed to view unapproved posts
+ * @param array $m_approve_fid_sql specifies which posts a user can view, based on permissions
* @param int $topic_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
* @param array $author_ary an array of author ids
* @param string $author_name specifies the author match, when ANONYMOUS is also a search-match
@@ -836,7 +838,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
$sort_key,
$topic_id,
implode(',', $ex_fid_ary),
- implode(',', $m_approve_fid_ary),
+// @TODO implode(',', $m_approve_fid_ary),
implode(',', $author_ary),
$author_name,
)));
@@ -886,7 +888,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
break;
}
- if (!sizeof($m_approve_fid_ary))
+/* if (!sizeof($m_approve_fid_ary))
{
$m_approve_fid_sql = ' AND p.post_approved = 1';
}
@@ -898,6 +900,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
{
$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;