本文整理汇总了PHP中Indexer::deleteAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Indexer::deleteAll方法的具体用法?PHP Indexer::deleteAll怎么用?PHP Indexer::deleteAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Indexer
的用法示例。
在下文中一共展示了Indexer::deleteAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
}
$scheduleIndexing = false;
// indexing was previously off, but now set to on, need to schedule re-indexing
if (!get_config('enable_indexing') && $enable_indexing) {
$scheduleIndexing = true;
Database::get()->query("DELETE FROM idx_queue");
Database::get()->queryFunc("SELECT id FROM course", function($r) {
Database::get()->query("INSERT INTO idx_queue (course_id) VALUES (?d)", $r->id);
});
}
// indexing was previously on, but now set to off, need to empty it
if (get_config('enable_indexing') && !$enable_indexing) {
require_once 'modules/search/indexer.class.php';
Indexer::deleteAll();
}
// update table `config`
foreach ($config_vars as $varname => $what) {
set_config($varname, $GLOBALS[$varname]);
}
// Display result message
Session::flash('scheduleIndexing', $scheduleIndexing);
Session::Messages($langFileUpdatedSuccess, 'alert-success');
redirect_to_home_page('modules/admin/eclassconf.php');
} // end of if($submit)
else {
// Display config.php edit form