MDL-8765 user preference usage cleanup

This commit is contained in:
skodak
2007-03-06 10:45:49 +00:00
parent 06565ec739
commit f2d042c4c3
6 changed files with 15 additions and 19 deletions
+4 -4
View File
@@ -8,9 +8,9 @@ require_login();
if ($section = optional_param('section', '', PARAM_ALPHAEXT) and confirm_sesskey()) {
if (isset($USER->preference['admin_bookmarks'])) {
if (get_user_preferences('admin_bookmarks')) {
$bookmarks = explode(',', $USER->preference['admin_bookmarks']);
$bookmarks = explode(',', get_user_preferences('admin_bookmarks'));
$key = array_search($section, $bookmarks);
@@ -28,9 +28,9 @@ if ($section = optional_param('section', '', PARAM_ALPHAEXT) and confirm_sesskey
if (is_a($temp, 'admin_externalpage')) {
redirect($temp->url, get_string('bookmarkdeleted','admin'));
} elseif (is_a($temp, 'admin_settingpage')) {
redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section, get_string('bookmarkdeleted','admin'), 1);
redirect($CFG->wwwroot . '/' . $CFG->admin . '/settings.php?section=' . $section);
} else {
redirect($CFG->wwwroot, get_string('bookmarkdeleted', 'admin'),1);
redirect($CFG->wwwroot);
}
die;