mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-55287_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
5d21ea9d3b
@ -95,7 +95,7 @@ if (empty($searchmanagererror)) {
|
||||
}
|
||||
|
||||
if (!empty($searchmanagererror)) {
|
||||
$errorstr = get_string($searchmanagererror->errorcode, $searchmanagererror->module);
|
||||
$errorstr = get_string($searchmanagererror->errorcode, $searchmanagererror->module, $searchmanagererror->a);
|
||||
echo $OUTPUT->notification($errorstr, \core\output\notification::NOTIFY_ERROR);
|
||||
} else {
|
||||
echo $OUTPUT->notification(get_string('indexinginfo', 'admin'), \core\output\notification::NOTIFY_INFO);
|
||||
|
@ -47,7 +47,8 @@ $string['documentsinindex'] = 'Documents in index';
|
||||
$string['duration'] = 'Duration';
|
||||
$string['emptydatabaseerror'] = 'Database table is not present, or contains no index records.';
|
||||
$string['enginenotfound'] = 'Engine {$a} not found.';
|
||||
$string['enginenotinstalled'] = '{$a} not installed.';
|
||||
$string['enginenotinstalled'] = 'Engine {$a} not installed.';
|
||||
$string['enginenotselected'] = 'You have not selected any search engine.';
|
||||
$string['engineserverstatus'] = 'The search engine is not available. Please contact your administrator.';
|
||||
$string['enteryoursearchquery'] = 'Enter your search query';
|
||||
$string['errors'] = 'Errors';
|
||||
|
@ -122,6 +122,10 @@ class manager {
|
||||
return static::$instance;
|
||||
}
|
||||
|
||||
if (empty($CFG->searchengine)) {
|
||||
throw new \core_search\engine_exception('enginenotselected', 'search');
|
||||
}
|
||||
|
||||
if (!$engine = static::search_engine_instance()) {
|
||||
throw new \core_search\engine_exception('enginenotfound', 'search', '', $CFG->searchengine);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user