MDL-17458 $CFG->rolesactive cleanup + other cleanup in upgrade code

This commit is contained in:
skodak
2009-01-15 22:09:57 +00:00
parent 0361508976
commit 18818abf4c
6 changed files with 20 additions and 65 deletions
-6
View File
@@ -1594,9 +1594,6 @@ class admin_externalpage implements part_of_admin_tree {
*/
public function check_access() {
global $CFG;
if (empty($CFG->rolesactive)) {
return true; // no access check before site is fully set up
}
$context = empty($this->context) ? get_context_instance(CONTEXT_SYSTEM) : $this->context;
foreach($this->req_capability as $cap) {
if (is_valid_capability($cap) and has_capability($cap, $context)) {
@@ -1745,9 +1742,6 @@ class admin_settingpage implements part_of_admin_tree {
// see admin_externalpage
public function check_access() {
global $CFG;
if (empty($CFG->rolesactive)) {
return true; // no access check before site is fully set up
}
$context = empty($this->context) ? get_context_instance(CONTEXT_SYSTEM) : $this->context;
foreach($this->req_capability as $cap) {
if (is_valid_capability($cap) and has_capability($cap, $context)) {