mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-14978 removed obsoleted isadmin()
This commit is contained in:
parent
72f563b91c
commit
e3c7f155d8
23 changed files with 432 additions and 263 deletions
|
@ -31,7 +31,7 @@
|
|||
error(get_string('globalsearchdisabled', 'search'));
|
||||
}
|
||||
|
||||
if (!isadmin()) {
|
||||
if (!has_capability('moodle/site:doanything', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
error(get_string('beadmin', 'search'), "$CFG->wwwroot/login/index.php");
|
||||
} //if
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue