mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
|
@ -514,7 +514,7 @@ function has_any_capability($capabilities, $context, $userid=NULL, $doanything=t
|
|||
* - moodle/site:doanything
|
||||
*
|
||||
* @param int $userid
|
||||
* @returns bool $isadmin
|
||||
* @returns bool true is user can administer server settings
|
||||
*/
|
||||
function is_siteadmin($userid) {
|
||||
global $CFG, $DB;
|
||||
|
@ -532,8 +532,7 @@ function is_siteadmin($userid) {
|
|||
HAVING SUM(rc.permission) > 0";
|
||||
$params = array($userid, 'moodle/site:config', 'moodle/legacy:admin', 'moodle/site:doanything');
|
||||
|
||||
$isadmin = $DB->record_exists_sql($sql, $params);
|
||||
return $isadmin;
|
||||
return $DB->record_exists_sql($sql, $params);
|
||||
}
|
||||
|
||||
function get_course_from_path ($path) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue