Created
December 10, 2019 11:56
-
-
Save danielneis/4113cae86ca5ac817b7f8315d8d308da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/search/index.php b/search/index.php | |
index 936dfbc7a70..088251c1c69 100644 | |
--- a/search/index.php | |
+++ b/search/index.php | |
@@ -66,6 +66,10 @@ if (\core_search\manager::is_global_search_enabled() === false) { | |
$search = \core_search\manager::instance(true); | |
+if (strpos($q, 'admin:') === 0) { | |
+ redirect(new moodle_url('/admin/search.php', ['query' => trim(substr($q, 6))])); | |
+} | |
+ | |
// Set up custom data for form. | |
$customdata = ['searchengine' => $search->get_engine()->get_plugin_name()]; | |
if ($contextid) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment