MDL-55287 search: Custom error message if solr extension is not installed

Correcting engine is not installed lang string as well.
This commit is contained in:
David Monllao
2016-07-27 13:57:15 +08:00
parent 379ca98642
commit e240a6132d
3 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -9741,7 +9741,11 @@ class admin_setting_searchsetupinfo extends admin_setting {
array('href' => $url));
// Check the engine status.
$searchengine = \core_search\manager::search_engine_instance();
$serverstatus = $searchengine->is_server_ready();
try {
$serverstatus = $searchengine->is_server_ready();
} catch (\moodle_exception $e) {
$serverstatus = $e->getMessage();
}
if ($serverstatus === true) {
$status = html_writer::tag('span', get_string('yes'), array('class' => 'statusok'));
} else {