Commit 4ae9c8fc by pupi1985

Move the cache calculation away from the basic search plugin

parent 1a34ee2a
...@@ -124,6 +124,7 @@ function qa_update_counts_for_q($postid) ...@@ -124,6 +124,7 @@ function qa_update_counts_for_q($postid)
qa_db_unaqcount_update(); qa_db_unaqcount_update();
qa_db_unselqcount_update(); qa_db_unselqcount_update();
qa_db_unupaqcount_update(); qa_db_unupaqcount_update();
qa_db_tagcount_update();
} }
......
...@@ -106,6 +106,9 @@ function qa_question_set_content($oldquestion, $title, $content, $format, $text, ...@@ -106,6 +106,9 @@ function qa_question_set_content($oldquestion, $title, $content, $format, $text,
} elseif ($oldquestion['type'] == 'Q') { // not hidden or queued } elseif ($oldquestion['type'] == 'Q') { // not hidden or queued
qa_post_index($oldquestion['postid'], 'Q', $oldquestion['postid'], $oldquestion['parentid'], $title, $content, $format, $text, $tagstring, $oldquestion['categoryid']); qa_post_index($oldquestion['postid'], 'Q', $oldquestion['postid'], $oldquestion['parentid'], $title, $content, $format, $text, $tagstring, $oldquestion['categoryid']);
if ($tagschanged) {
qa_db_tagcount_update();
}
} }
$eventparams = array( $eventparams = array(
......
...@@ -68,7 +68,6 @@ class qa_search_basic ...@@ -68,7 +68,6 @@ class qa_search_basic
qa_db_word_contentcount_update(array_keys($contentwordidcounts)); qa_db_word_contentcount_update(array_keys($contentwordidcounts));
qa_db_word_tagwordcount_update($tagwordids); qa_db_word_tagwordcount_update($tagwordids);
qa_db_word_tagcount_update($wholetagids); qa_db_word_tagcount_update($wholetagids);
qa_db_tagcount_update();
} }
public function unindex_post($postid) public function unindex_post($postid)
...@@ -90,7 +89,6 @@ class qa_search_basic ...@@ -90,7 +89,6 @@ class qa_search_basic
$wholetagids = qa_db_posttags_get_post_wordids($postid); $wholetagids = qa_db_posttags_get_post_wordids($postid);
qa_db_posttags_delete_post($postid); qa_db_posttags_delete_post($postid);
qa_db_word_tagcount_update($wholetagids); qa_db_word_tagcount_update($wholetagids);
qa_db_tagcount_update();
} }
public function move_post($postid, $categoryid) public function move_post($postid, $categoryid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment