Minor fixes after PR

1.10.x
Julio Montoya 10 years ago
parent c8b3d3402a
commit 398b75ce78
  1. 3
      main/forum/newthread.php
  2. 8
      main/forum/viewforum.php
  3. 5
      main/forum/viewthread_flat.inc.php

@ -137,7 +137,8 @@ if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Reso
$_SESSION['formelements'] = $_POST; $_SESSION['formelements'] = $_POST;
$_SESSION['origin'] = $_SERVER['REQUEST_URI']; $_SESSION['origin'] = $_SERVER['REQUEST_URI'];
$_SESSION['breadcrumbs'] = $interbreadcrumb; $_SESSION['breadcrumbs'] = $interbreadcrumb;
Header::location('../resourcelinker/resourcelinker.php'); header('Location: ../resourcelinker/resourcelinker.php');
exit;
} }
/* Header */ /* Header */

@ -406,12 +406,14 @@ if ($origin != 'learnpath'){
array( array(
'class' => 'title-forum') 'class' => 'title-forum')
); );
if (!empty($descriptionForum)) { if (!empty($descriptionForum)) {
$html .= Display::tag( $html .= Display::tag(
'p', 'p',
strip_tags($descriptionForum), strip_tags($descriptionForum),
array( array(
'class' => 'description') 'class' => 'description',
)
); );
} }
} }
@ -419,7 +421,6 @@ if ($origin != 'learnpath'){
$html .= '</div>'; $html .= '</div>';
echo $html; echo $html;
// Getting al the threads // Getting al the threads
$threads = get_threads($my_forum); $threads = get_threads($my_forum);
@ -427,14 +428,13 @@ $whatsnew_post_info = isset($_SESSION['whatsnew_post_info']) ? $_SESSION['whatsn
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
echo '<div class="forum_display">'; echo '<div class="forum_display">';
if (is_array($threads)) { if (is_array($threads)) {
$html = ''; $html = '';
$count = 1; $count = 1;
foreach ($threads as $row) { foreach ($threads as $row) {
// Thread who have no replies yet and the only post is invisible should not be displayed to students. // Thread who have no replies yet and the only post is invisible should not be displayed to students.
if (api_is_allowed_to_edit(false, true) OR if (api_is_allowed_to_edit(false, true) ||
!($row['thread_replies'] == '0' AND $row['visibility'] == '0') !($row['thread_replies'] == '0' AND $row['visibility'] == '0')
) { ) {

@ -7,7 +7,7 @@
* @package chamilo.forum * @package chamilo.forum
*/ */
//delete attachment file // Delete attachment file
if ((isset($_GET['action']) && if ((isset($_GET['action']) &&
$_GET['action'] == 'delete_attach') && $_GET['action'] == 'delete_attach') &&
isset($_GET['id_attach']) isset($_GET['id_attach'])
@ -29,7 +29,8 @@ if (isset($current_thread['thread_id'])) {
$clean_thread_id = intval($_GET['thread']); $clean_thread_id = intval($_GET['thread']);
$locked = api_resource_is_locked_by_gradebook( $locked = api_resource_is_locked_by_gradebook(
$clean_thread_id, LINK_FORUM_THREAD $clean_thread_id,
LINK_FORUM_THREAD
); );
$closedPost = null; $closedPost = null;

Loading…
Cancel
Save