MDL-55356 core_search: API to check if indexing enabled
New function \core_search\manager::is_indexing_enabled(), analagous to existing is_global_search_enabled(). This replaces existing duplicated code, ready for more use in following commits.
This commit is contained in:
@@ -49,8 +49,7 @@ class search_optimize_task extends scheduled_task {
|
||||
* Throw exceptions on errors (the job will be retried).
|
||||
*/
|
||||
public function execute() {
|
||||
if (!\core_search\manager::is_global_search_enabled() &&
|
||||
!get_config('core', 'searchindexwhendisabled')) {
|
||||
if (!\core_search\manager::is_indexing_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user