Add api_get_cidreq, fix blog layout

pull/2487/head
jmontoyaa 7 years ago
parent 3e970ef9b8
commit 96e3d8dd13
  1. 2
      main/course_progress/thematic_advance.php
  2. 4
      main/course_progress/thematic_controller.php
  3. 5
      main/inc/lib/blog.lib.php

@ -217,6 +217,8 @@ if ($action === 'thematic_advance_add' || $action === 'thematic_advance_edit') {
'thematic_id' => $values['thematic_id']
]);
Display::addFlash(Display::return_message(get_lang('Updated')));
header('Location: '.api_get_path(WEB_CODE_PATH).$redirectUrlParams);
exit;
}

@ -68,6 +68,7 @@ class ThematicController
$action = 'thematic_details';
$thematic_id = null;
}
Display::addFlash(Display::return_message(get_lang('Updated')));
}
} else {
$error = true;
@ -94,6 +95,7 @@ class ThematicController
if (api_is_allowed_to_edit(null, true)) {
$thematic_ids = $_POST['id'];
$thematic->delete($thematic_ids);
Display::addFlash(Display::return_message(get_lang('Deleted')));
}
$action = 'thematic_details';
}
@ -103,6 +105,7 @@ class ThematicController
if (isset($thematic_id)) {
if (api_is_allowed_to_edit(null, true)) {
$thematic->delete($thematic_id);
Display::addFlash(Display::return_message(get_lang('Deleted')));
}
$thematic_id = null;
$action = 'thematic_details';
@ -543,6 +546,7 @@ class ThematicController
if (api_is_allowed_to_edit(null, true)) {
$thematic->thematic_advance_destroy($thematic_advance_id);
}
Display::addFlash(Display::return_message(get_lang('Deleted')));
header('Location: index.php');
exit;
}

@ -2598,14 +2598,19 @@ class Blog
* The blog admin can thus select what a certain user can do in the current blog
*
* @param int $blog_id
* @return string
*/
public static function displayUserRightsForm($blog_id)
{
ob_start();
echo '<legend>'.get_lang('RightsManager').'</legend>';
echo '<br />';
// Integration of patricks permissions system.
require_once api_get_path(SYS_CODE_PATH).'permissions/blog_permissions.inc.php';
$content = ob_get_contents();
ob_get_clean();
return $content;
}
/**

Loading…
Cancel
Save