diff options
Diffstat (limited to 'phpBB/includes/search/fulltext_sphinx.php')
| -rw-r--r-- | phpBB/includes/search/fulltext_sphinx.php | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php index 288c0b5940..ad9854071d 100644 --- a/phpBB/includes/search/fulltext_sphinx.php +++ b/phpBB/includes/search/fulltext_sphinx.php @@ -340,7 +340,7 @@ class phpbb_search_fulltext_sphinx  	* @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	string		$post_visibility	specifies which types of posts the user can view in which forums  	* @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 @@ -349,7 +349,7 @@ class phpbb_search_fulltext_sphinx  	* @param	int			$per_page			number of ids each page is supposed to contain  	* @return	boolean|int						total number of results  	*/ -	public function keyword_search($type, $fields, $terms, $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 keyword_search($type, $fields, $terms, $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 keywords? No posts.  		if (!strlen($this->search_query) && !sizeof($author_ary)) @@ -466,6 +466,8 @@ class phpbb_search_fulltext_sphinx  		if (sizeof($ex_fid_ary))  		{ +			//@todo: Limit using $post_visibility +  			// All forums that a user is allowed to access  			$fid_ary = array_unique(array_intersect(array_keys($this->auth->acl_getf('f_read', true)), array_keys($this->auth->acl_getf('f_search', true))));  			// All forums that the user wants to and can search in @@ -541,7 +543,7 @@ class phpbb_search_fulltext_sphinx  	* @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	string		$post_visibility	specifies which types of posts the user can view in which forums  	* @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 @@ -550,14 +552,14 @@ class phpbb_search_fulltext_sphinx  	* @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)  	{  		$this->search_query = '';  		$this->sphinx->SetMatchMode(SPH_MATCH_FULLSCAN);  		$fields = ($firstpost_only) ? 'firstpost' : 'all';  		$terms = 'all'; -		return $this->keyword_search($type, $fields, $terms, $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); +		return $this->keyword_search($type, $fields, $terms, $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);  	}  	/**  | 
