Minor - format code

pull/2487/head
jmontoyaa 8 years ago
parent f64e37b5ed
commit 483e46fc8b
  1. 14
      main/forum/forumqualify.php
  2. 7
      main/forum/iframe_thread.php
  3. 2
      main/forum/viewforum.php
  4. 1
      main/forum/viewthread_nested.inc.php

@ -104,6 +104,8 @@ if (!empty($gradebook) && $gradebook == 'view') {
);
}
$search = isset($_GET['search']) ? Security::remove_XSS(urlencode($_GET['search'])) : '';
if ($origin == 'learnpath') {
Display::display_reduced_header();
} else {
@ -118,12 +120,12 @@ if ($origin == 'learnpath') {
"name" => get_lang('GroupSpace').' ('.$group_properties['name'].')'
);
$interbreadcrumb[] = array(
"url" => "viewforum.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&search=".Security::remove_XSS(urlencode($_GET['search'])),
"url" => "viewforum.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&search=".$search,
"name" => prepare4display($currentForum['forum_title'])
);
if ($message <> 'PostDeletedSpecial') {
$interbreadcrumb[] = array(
"url" => "viewthread.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&gradebook=".$gradebook."&thread=".intval($_GET['thread']),
"url" => "viewthread.php?".api_get_cidreq()."&forum=".intval($_GET['forum'])."&thread=".intval($_GET['thread']),
"name" => prepare4display($currentThread['thread_title'])
);
}
@ -137,7 +139,6 @@ if ($origin == 'learnpath') {
Display::display_header('');
api_display_tool_title($nameTools);
} else {
$search = isset($_GET['search']) ? Security::remove_XSS(urlencode($_GET['search'])) : '';
$info_thread = get_thread_information($currentForum['forum_id'], $_GET['thread']);
$interbreadcrumb[] = array(
"url" => "index.php?".api_get_cidreq()."&search=".$search,
@ -294,7 +295,6 @@ if (isset($rows)) {
// The check if there is an attachment
$attachment_list = get_attachment($row['post_id']);
if (!empty($attachment_list)) {
echo '<tr ><td height="50%">';
$realname = $attachment_list['path'];
@ -344,9 +344,9 @@ if (api_is_allowed_to_edit() && $counter > 0) {
$table_list .= '<tr><td>'.$userInfo['complete_name'].'</td>';
$table_list .= '<td>'.$historyList[$i]['qualify'].'</td>';
$table_list .= '<td>'.api_convert_and_format_date(
$historyList[$i]['qualify_time'],
DATE_TIME_FORMAT_LONG
);
$historyList[$i]['qualify_time'],
DATE_TIME_FORMAT_LONG
);
$table_list .= '</td></tr>';
}
$table_list .= '</table>';

@ -63,11 +63,12 @@ $course_id = api_get_course_int_id();
// Note pcool: I tried to use only one sql statement (and function) for this,
// but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table.
$sql = "SELECT * FROM $table_posts posts, $table_users users
$sql = "SELECT * FROM $table_posts posts
INNER JOIN $table_users users
ON (posts.poster_id = users.user_id)
WHERE
posts.c_id = $course_id AND
posts.thread_id='".$current_thread['thread_id']."' AND
posts.poster_id=users.user_id
posts.thread_id='".$current_thread['thread_id']."'
ORDER BY posts.post_id ASC";
$result = Database::query($sql);

@ -611,7 +611,7 @@ if (is_array($threads)) {
}
$iconnotify = 'notification_mail_na.png';
if (is_array(
isset($_SESSION['forum_notification']['thread']) ? $_SESSION['forum_notification']['thread'] : null
isset($_SESSION['forum_notification']['thread']) ? $_SESSION['forum_notification']['thread'] : null
)
) {
if (in_array($row['thread_id'], $_SESSION['forum_notification']['thread'])) {

@ -22,7 +22,6 @@ if (isset($_GET['action']) &&
// Decide whether we show the latest post first
$sortDirection = isset($_GET['posts_order']) && $_GET['posts_order'] === 'desc' ? 'DESC' : ($origin != 'learnpath' ? 'ASC' : 'DESC');
$posts = getPosts($current_forum, $_GET['thread'], $sortDirection, true);
$count = 0;
$clean_forum_id = intval($_GET['forum']);

Loading…
Cancel
Save