Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function actionThreadsReindexAll()
- {
- if ($this->isConfirmedPost())
- {
- $words = $this->_getChineseWordModel()->getAllWords();
- if(is_array($words) AND !empty($words))
- {
- $this->_assertPostOnly();
- return $this->_queueLoop('reindexall', 100, $words, 'chinese-words/threads-options', 'sedo_chinese_reindex_all_words');
- }
- else
- {
- return $this->responseRedirect(
- XenForo_ControllerResponse_Redirect::SUCCESS,
- XenForo_Link::buildAdminLink('chinese-words/threads-options'),
- new XenForo_Phrase('sedo_chinese_no_words_to_reindex')
- );
- }
- }
- $viewParams = array('cmd' => 'threads-reindex-all');
- return $this->responseView('Sedo_Chinese_ViewAdmin_ChineseThreads_Confirm', 'chinese_words_threads_confirm', $viewParams);
- }
- private function _reindexall($word)
- {
- $word = $this->_SedoChineseAddUpdateThread($word);
- $dw = XenForo_DataWriter::create('Sedo_Chinese_DataWriter_ChineseWords');
- $dw->setExistingData($word['word_id']);
- $dw->bulkSet($word);
- $dw->save();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement