mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
Merge branch 'MDL-64025-master' of https://github.com/christianwolters/moodle
This commit is contained in:
commit
648afe76f8
@ -96,6 +96,10 @@ class block_admin_bookmarks extends block_base {
|
||||
$contenturl = new moodle_url($temp->url);
|
||||
$contentlink = html_writer::link($contenturl, $temp->visiblename);
|
||||
$contents[] = html_writer::tag('li', $contentlink);
|
||||
} else if ($temp instanceof admin_category) {
|
||||
$contenturl = new moodle_url('/admin/category.php', array('category' => $bookmark));
|
||||
$contentlink = html_writer::link($contenturl, $temp->visiblename);
|
||||
$contents[] = html_writer::tag('li', $contentlink);
|
||||
}
|
||||
}
|
||||
$this->content->text = html_writer::tag('ol', implode('', $contents), array('class' => 'list'));
|
||||
|
@ -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 {
|
||||
|
@ -54,6 +54,8 @@ if ($section = optional_param('section', '', PARAM_SAFEDIR) and confirm_sesskey(
|
||||
redirect($temp->url, get_string('bookmarkdeleted','admin'));
|
||||
} elseif ($temp instanceof admin_settingpage) {
|
||||
redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section);
|
||||
} else if ($temp instanceof admin_category) {
|
||||
redirect($CFG->wwwroot . '/' . $CFG->admin . '/category.php?category=' . $section);
|
||||
} else {
|
||||
redirect($CFG->wwwroot);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user