mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
Merge branch 'MDL-59039-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
afabbd110e
13 changed files with 302 additions and 36 deletions
|
@ -46,12 +46,13 @@ class search_index_task extends scheduled_task {
|
|||
* Throw exceptions on errors (the job will be retried).
|
||||
*/
|
||||
public function execute() {
|
||||
if (!\core_search\manager::is_global_search_enabled()) {
|
||||
if (!\core_search\manager::is_global_search_enabled() &&
|
||||
!get_config('core', 'searchindexwhendisabled')) {
|
||||
return;
|
||||
}
|
||||
$globalsearch = \core_search\manager::instance();
|
||||
|
||||
// Indexing database records for modules + rich documents of forum.
|
||||
$globalsearch->index();
|
||||
$globalsearch->index(false, get_config('core', 'searchindextime'), new \text_progress_trace());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ 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()) {
|
||||
if (!\core_search\manager::is_global_search_enabled() &&
|
||||
!get_config('core', 'searchindexwhendisabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue