MDL-64025 admin_bookmarks: Enable bookmarking of admin categories
This commit is contained in:
@@ -46,7 +46,7 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
|
||||
|
||||
$temp = $adminroot->locate($section);
|
||||
|
||||
if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage) {
|
||||
if ($temp instanceof admin_settingpage || $temp instanceof admin_externalpage || $temp instanceof admin_category) {
|
||||
$bookmarks[] = $section;
|
||||
$bookmarks = implode(',', $bookmarks);
|
||||
set_user_preference('admin_bookmarks', $bookmarks);
|
||||
@@ -61,6 +61,10 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
|
||||
|
||||
} elseif ($temp instanceof admin_externalpage) {
|
||||
redirect($temp->url);
|
||||
|
||||
} else if ($temp instanceof admin_category) {
|
||||
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user