|
@@ -125,13 +125,6 @@ $htmlHeadXtra[] = <<<JS
|
|
|
</script>
|
|
|
JS;
|
|
|
|
|
|
-
|
|
|
-if ($origin == 'learnpath') {
|
|
|
- Display::display_reduced_header();
|
|
|
-} else {
|
|
|
- Display::display_header();
|
|
|
-}
|
|
|
-
|
|
|
/* Is the user allowed here? */
|
|
|
|
|
|
// The user is not allowed here if
|
|
@@ -146,7 +139,7 @@ if (!api_is_allowed_to_edit(null, true) &&
|
|
|
(($current_forum_category && $current_forum_category['visibility'] == 0) ||
|
|
|
$current_forum['visibility'] == 0)
|
|
|
) {
|
|
|
- api_not_allowed();
|
|
|
+ api_not_allowed(true);
|
|
|
}
|
|
|
|
|
|
if (!api_is_allowed_to_edit(null, true) &&
|
|
@@ -156,11 +149,11 @@ if (!api_is_allowed_to_edit(null, true) &&
|
|
|
$current_thread['locked'] <> 0
|
|
|
)
|
|
|
) {
|
|
|
- api_not_allowed();
|
|
|
+ api_not_allowed(true);
|
|
|
}
|
|
|
|
|
|
if (!$_user['user_id'] && $current_forum['allow_anonymous'] == 0) {
|
|
|
- api_not_allowed();
|
|
|
+ api_not_allowed(true);
|
|
|
}
|
|
|
|
|
|
$group_id = api_get_group_id();
|
|
@@ -169,7 +162,13 @@ if (!api_is_allowed_to_edit(null, true) &&
|
|
|
$current_forum['allow_edit'] == 0 &&
|
|
|
!GroupManager::is_tutor_of_group(api_get_user_id(), $group_properties['iid'])
|
|
|
) {
|
|
|
- api_not_allowed();
|
|
|
+ api_not_allowed(true);
|
|
|
+}
|
|
|
+
|
|
|
+if ($origin == 'learnpath') {
|
|
|
+ Display::display_reduced_header();
|
|
|
+} else {
|
|
|
+ Display::display_header();
|
|
|
}
|
|
|
|
|
|
// Action links
|