Commit 79dff83d authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4421 (Fix Guest Comcode Page search)

parent 9d3ea13a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ class Hook_search_comcode_pages extends FieldsSearchHook
                break;
        }

        $sq = build_search_submitter_clauses('p_submitter', $author_id, $author);
        $sq = build_search_submitter_clauses('q.p_submitter', $author_id, $author);
        if (is_null($sq)) {
            return array();
        } else {
@@ -131,7 +131,7 @@ class Hook_search_comcode_pages extends FieldsSearchHook

        if ((!has_privilege(get_member(), 'see_unvalidated')) && (addon_installed('unvalidated'))) {
            $where_clause .= ' AND ';
            $where_clause .= 'p_validated=1';
            $where_clause .= 'q.p_validated=1';
        }

        require_lang('zones');
+2 −2
Original line number Diff line number Diff line
@@ -265,7 +265,7 @@ class Hook_search_comcode_pages extends FieldsSearchHook
            $key_transfer_map = array('the_zone' => 'i_zone_name', 'the_page' => 'i_page_name');
            $rows = $engine->get_search_rows($db, $index_table, $db->get_table_prefix() . $table, $key_transfer_map, $where_clause, $extra_join_clause, $content, $boolean_search, $only_search_meta, $only_titles, $max, $start, $remapped_orderer, $direction);
        } else {
            $sq = build_search_submitter_clauses('p_submitter', $author_id, $author);
            $sq = build_search_submitter_clauses('q.p_submitter', $author_id, $author);
            if (is_null($sq)) {
                return array();
            } else {
@@ -283,7 +283,7 @@ class Hook_search_comcode_pages extends FieldsSearchHook

            if ((!has_privilege(get_member(), 'see_unvalidated')) && (addon_installed('unvalidated'))) {
                $where_clause .= ' AND ';
                $where_clause .= 'p_validated=1';
                $where_clause .= 'q.p_validated=1';
            }

            $g_or = _get_where_clause_groups(get_member(), false);