Minor - add flash messages

1.10.x
Julio Montoya 9 years ago
parent b2b78125f4
commit 6a7f66efa4
  1. 6
      main/admin/course_category.php

@ -30,11 +30,13 @@ if (!empty($action)) {
$_configuration['enable_multiple_url_support_for_course_category']) $_configuration['enable_multiple_url_support_for_course_category'])
) { ) {
deleteNode($categoryId); deleteNode($categoryId);
Display::addFlash(Display::return_message(get_lang('Deleted')));
header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category)); header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
exit(); exit();
} }
} else { } else {
deleteNode($categoryId); deleteNode($categoryId);
Display::addFlash(Display::return_message(get_lang('Deleted')));
header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category)); header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
exit(); exit();
} }
@ -46,6 +48,8 @@ if (!empty($action)) {
$_POST['auth_course_child'], $_POST['auth_course_child'],
$category $category
); );
Display::addFlash(Display::return_message(get_lang('Created')));
} else { } else {
$ret = editNode( $ret = editNode(
$_POST['code'], $_POST['code'],
@ -53,6 +57,7 @@ if (!empty($action)) {
$_POST['auth_course_child'], $_POST['auth_course_child'],
$categoryId $categoryId
); );
Display::addFlash(Display::return_message(get_lang('Updated')));
} }
if ($ret) { if ($ret) {
$action = ''; $action = '';
@ -62,6 +67,7 @@ if (!empty($action)) {
} elseif ($action == 'moveUp') { } elseif ($action == 'moveUp') {
moveNodeUp($categoryId, $_GET['tree_pos'], $category); moveNodeUp($categoryId, $_GET['tree_pos'], $category);
header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category)); header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
Display::addFlash(Display::return_message(get_lang('Updated')));
exit(); exit();
} }
} }

Loading…
Cancel
Save