Minor fixes after PR

1.10.x
Julio Montoya 10 years ago
parent c8b3d3402a
commit 398b75ce78
  1. 3
      main/forum/newthread.php
  2. 12
      main/forum/viewforum.php
  3. 7
      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['origin'] = $_SERVER['REQUEST_URI'];
$_SESSION['breadcrumbs'] = $interbreadcrumb;
Header::location('../resourcelinker/resourcelinker.php');
header('Location: ../resourcelinker/resourcelinker.php');
exit;
}
/* Header */

@ -399,19 +399,21 @@ $iconForum = Display::return_icon(
$html = '';
$html .= '<div class="topic-forum">';
// The current forum
if ($origin != 'learnpath'){
if ($origin != 'learnpath') {
$html .= Display::tag(
'h3',
$iconForum .' '. $titleForum,
array(
'class' => 'title-forum')
);
if(!empty($descriptionForum)){
if (!empty($descriptionForum)) {
$html .= Display::tag(
'p',
strip_tags($descriptionForum),
array(
'class' => 'description')
'class' => 'description',
)
);
}
}
@ -419,7 +421,6 @@ if ($origin != 'learnpath'){
$html .= '</div>';
echo $html;
// Getting al the threads
$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();
echo '<div class="forum_display">';
if (is_array($threads)) {
$html = '';
$count = 1;
foreach ($threads as $row) {
// 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')
) {

@ -7,7 +7,7 @@
* @package chamilo.forum
*/
//delete attachment file
// Delete attachment file
if ((isset($_GET['action']) &&
$_GET['action'] == 'delete_attach') &&
isset($_GET['id_attach'])
@ -29,7 +29,8 @@ if (isset($current_thread['thread_id'])) {
$clean_thread_id = intval($_GET['thread']);
$locked = api_resource_is_locked_by_gradebook(
$clean_thread_id, LINK_FORUM_THREAD
$clean_thread_id,
LINK_FORUM_THREAD
);
$closedPost = null;
@ -308,7 +309,7 @@ if (isset($current_thread['thread_id'])) {
$html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
}
}
$html .= '</div>';
$html .= '<div class="col-md-5 text-right">';
$html .= $buttonReply . ' ' . $buttonQuote;

Loading…
Cancel
Save