Passed
Push — 1.10.x ( ae49b3...2758b3 )
by
unknown
63:51
created
main/forum/editthread.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4
-use ChamiloSession as Session;
5
-
6 4
 /**
7 5
  * Class ExerciseLib
8 6
  * shows a question and its answers
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 
47 47
 if (!empty($gradebook) && $gradebook == 'view') {
48
-    $interbreadcrumb[] = array (
48
+    $interbreadcrumb[] = array(
49 49
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
50 50
         'name' => get_lang('ToolGradebook')
51 51
     );
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     $interbreadcrumb[] = array('url' => '../group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
108 108
     $interbreadcrumb[] = array('url' => '../group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
109 109
     $interbreadcrumb[] = array('url' => 'viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => $currentForum['forum_title']);
110
-    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']),'name' => get_lang('EditThread'));
110
+    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => get_lang('EditThread'));
111 111
 } else {
112 112
     $interbreadcrumb[] = array('url' => 'index.php?'.$cidreq, 'name' => $nameTools);
113 113
     $interbreadcrumb[] = array('url' => 'viewforumcategory.php?'.$cidreq.'&forumcategory='.$currentForumCategory['cat_id'], 'name' => $currentForumCategory['cat_title']);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 echo '<div class="actions">';
157 157
 echo '<span style="float:right;">'.search_link().'</span>';
158 158
 echo '<a href="viewforum.php?forum='.intval($_GET['forum']).'&'.$cidreq.'">'.
159
-    Display::return_icon('back.png',get_lang('BackToForum'),'',ICON_SIZE_MEDIUM).'</a>';
159
+    Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
160 160
 echo '</div>';
161 161
 
162 162
 $threadData = getThreadInfo($threadId, $cId);
Please login to merge, or discard this patch.
main/forum/newthread.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4
-use ChamiloSession as Session;
5
-
6 4
 /**
7 5
  * Class ExerciseLib
8 6
  * shows a question and its answers
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
 /* Breadcrumbs */
56 56
 
57
-if (isset($_SESSION['gradebook'])){
57
+if (isset($_SESSION['gradebook'])) {
58 58
     $gradebook = Security::remove_XSS($_SESSION['gradebook']);
59 59
 }
60 60
 
61 61
 if (!empty($gradebook) && $gradebook == 'view') {
62
-    $interbreadcrumb[] = array (
62
+    $interbreadcrumb[] = array(
63 63
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
64 64
         'name' => get_lang('ToolGradebook')
65 65
     );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $interbreadcrumb[] = array('url' => '../group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
118 118
     $interbreadcrumb[] = array('url' => '../group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
119 119
     $interbreadcrumb[] = array('url' => 'viewforum.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => $current_forum['forum_title']);
120
-    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']),'name' => get_lang('NewTopic'));
120
+    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.intval($_GET['forum']), 'name' => get_lang('NewTopic'));
121 121
 } else {
122 122
     $interbreadcrumb[] = array('url' => 'index.php?'.$cidreq, 'name' => $nameTools);
123 123
     $interbreadcrumb[] = array('url' => 'viewforumcategory.php?'.$cidreq.'&forumcategory='.$current_forum_category['cat_id'], 'name' => $current_forum_category['cat_title']);
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 /* Resource Linker */
129 129
 
130 130
 if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Resources')) {
131
-    $_SESSION['formelements']	= $_POST;
132
-    $_SESSION['origin']			= $_SERVER['REQUEST_URI'];
133
-    $_SESSION['breadcrumbs']	= $interbreadcrumb;
131
+    $_SESSION['formelements'] = $_POST;
132
+    $_SESSION['origin'] = $_SERVER['REQUEST_URI'];
133
+    $_SESSION['breadcrumbs'] = $interbreadcrumb;
134 134
     header('Location: ../resourcelinker/resourcelinker.php');
135 135
     exit;
136 136
 }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 echo '<div class="actions">';
166 166
 echo '<span style="float:right;">'.search_link().'</span>';
167 167
 echo '<a href="viewforum.php?forum='.intval($_GET['forum']).'&'.$cidreq.'">'.
168
-    Display::return_icon('back.png',get_lang('BackToForum'),'',ICON_SIZE_MEDIUM).'</a>';
168
+    Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
169 169
 echo '</div>';
170 170
 
171 171
 // Set forum attachment data into $_SESSION
Please login to merge, or discard this patch.
main/forum/viewforum.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4
-use ChamiloSession as Session;
5
-
6 4
 /**
7 5
  * Class ExerciseLib
8 6
  * shows a question and its answers
Please login to merge, or discard this patch.
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // Including the global initialization file.
28 28
 require_once '../inc/global.inc.php';
29
-$current_course_tool  = TOOL_FORUM;
29
+$current_course_tool = TOOL_FORUM;
30 30
 
31 31
 // Notification for unauthorized people.
32 32
 api_protect_course_script(true);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     // Course
79 79
     if (
80
-        !api_is_allowed_to_edit(false, true) &&  //is a student
80
+        !api_is_allowed_to_edit(false, true) && //is a student
81 81
         (($current_forum_category && $current_forum_category['visibility'] == 0) ||
82 82
         $current_forum['visibility'] == 0 || !$user_has_access_in_group)
83 83
     ) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 } else {
87 87
     //Course
88 88
     if (
89
-        !api_is_allowed_to_edit(false, true) &&  //is a student
89
+        !api_is_allowed_to_edit(false, true) && //is a student
90 90
         (
91 91
             ($current_forum_category && $current_forum_category['visibility'] == 0) ||
92 92
             $current_forum['visibility'] == 0
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
 $my_action = isset($_GET['action']) ? $_GET['action'] : '';
103 103
 
104 104
 $gradebook = null;
105
-if (isset($_SESSION['gradebook'])){
105
+if (isset($_SESSION['gradebook'])) {
106 106
     $gradebook = $_SESSION['gradebook'];
107 107
 }
108 108
 
109 109
 if (!empty($gradebook) && $gradebook == 'view') {
110
-    $interbreadcrumb[] = array (
110
+    $interbreadcrumb[] = array(
111 111
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
112 112
         'name' => get_lang('ToolGradebook')
113 113
     );
@@ -117,25 +117,25 @@  discard block
 block discarded – undo
117 117
 
118 118
 if ($origin == 'group') {
119 119
     $interbreadcrumb[] = array(
120
-        'url' => api_get_path(WEB_CODE_PATH) . 'group/group.php?'.api_get_cidreq(),
120
+        'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
121 121
         'name' => get_lang('Groups')
122 122
     );
123 123
     $interbreadcrumb[] = array(
124
-        'url' => api_get_path(WEB_CODE_PATH) . 'group/group_space.php?' . api_get_cidreq(),
125
-        'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']
124
+        'url' => api_get_path(WEB_CODE_PATH).'group/group_space.php?'.api_get_cidreq(),
125
+        'name' => get_lang('GroupSpace').' '.$group_properties['name']
126 126
     );
127 127
     $interbreadcrumb[] = array(
128 128
         'url' => '#',
129
-        'name' => get_lang('Forum') . ' ' . Security::remove_XSS($current_forum['forum_title'])
129
+        'name' => get_lang('Forum').' '.Security::remove_XSS($current_forum['forum_title'])
130 130
     );
131 131
 } else {
132 132
     $interbreadcrumb[] = array(
133
-        'url' => $forumUrl . 'index.php?search=' . Security::remove_XSS($my_search),
133
+        'url' => $forumUrl.'index.php?search='.Security::remove_XSS($my_search),
134 134
         'name' => get_lang('ForumCategories')
135 135
     );
136 136
     $interbreadcrumb[] = array(
137
-        'url' => $forumUrl . 'viewforumcategory.php?forumcategory=' . $current_forum_category['cat_id']
138
-            . '&search=' . Security::remove_XSS(urlencode($my_search)),
137
+        'url' => $forumUrl.'viewforumcategory.php?forumcategory='.$current_forum_category['cat_id']
138
+            . '&search='.Security::remove_XSS(urlencode($my_search)),
139 139
         'name' => prepare4display($current_forum_category['cat_title'])
140 140
     );
141 141
     $interbreadcrumb[] = array(
@@ -243,25 +243,25 @@  discard block
 block discarded – undo
243 243
             break;
244 244
     }
245 245
 
246
-    $table_list = Display::page_subheader(get_lang('ThreadUsersList') . ': ' . get_name_thread_by_id($_GET['id']));
246
+    $table_list = Display::page_subheader(get_lang('ThreadUsersList').': '.get_name_thread_by_id($_GET['id']));
247 247
 
248 248
     if ($nrorow3 > 0 || $nrorow3 == -2) {
249
-        $url = 'cidReq=' . Security::remove_XSS($_GET['cidReq']) .
250
-            '&forum=' . Security::remove_XSS($my_forum) . '&action='
251
-            . Security::remove_XSS($_GET['action']) . '&content='
252
-            . Security::remove_XSS($_GET['content'], STUDENT) . '&id=' . intval($_GET['id']);
249
+        $url = 'cidReq='.Security::remove_XSS($_GET['cidReq']).
250
+            '&forum='.Security::remove_XSS($my_forum).'&action='
251
+            . Security::remove_XSS($_GET['action']).'&content='
252
+            . Security::remove_XSS($_GET['content'], STUDENT).'&id='.intval($_GET['id']);
253 253
         $tabs = array(
254 254
             array(
255 255
                 'content' =>  get_lang('AllStudents'),
256
-                'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=all'
256
+                'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=all'
257 257
             ),
258 258
             array(
259 259
                 'content' =>  get_lang('StudentsQualified'),
260
-                'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=qualify'
260
+                'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=qualify'
261 261
             ),
262 262
             array(
263 263
                 'content' =>  get_lang('StudentsNotQualified'),
264
-                'url' => $forumUrl . 'viewforum.php?' . $url . '&origin=' . $origin . '&list=notqualify'
264
+                'url' => $forumUrl.'viewforum.php?'.$url.'&origin='.$origin.'&list=notqualify'
265 265
             ),
266 266
         );
267 267
         $table_list .= Display::tabsOnlyLink($tabs, $active);
@@ -270,32 +270,32 @@  discard block
 block discarded – undo
270 270
         $table_list .= '<center><br /><table class="data_table" style="width:50%">';
271 271
         // The column headers (TODO: Make this sortable).
272 272
         $table_list .= '<tr >';
273
-        $table_list .= '<th height="24">' . get_lang('NamesAndLastNames') . '</th>';
273
+        $table_list .= '<th height="24">'.get_lang('NamesAndLastNames').'</th>';
274 274
 
275 275
         if ($listType == 'qualify') {
276
-            $table_list .= '<th>' . get_lang('Qualification') . '</th>';
276
+            $table_list .= '<th>'.get_lang('Qualification').'</th>';
277 277
         }
278 278
         if (api_is_allowed_to_edit(null, true)) {
279
-            $table_list .= '<th>' . get_lang('Qualify') . '</th>';
279
+            $table_list .= '<th>'.get_lang('Qualify').'</th>';
280 280
         }
281 281
         $table_list .= '</tr>';
282 282
         $max_qualify = showQualify('2', $userId, $_GET['id']);
283 283
         $counter_stdlist = 0;
284 284
 
285 285
         if (Database::num_rows($student_list) > 0) {
286
-            while ($row_student_list=Database::fetch_array($student_list)) {
286
+            while ($row_student_list = Database::fetch_array($student_list)) {
287 287
                 $userInfo = api_get_user_info($row_student_list['id']);
288 288
                 if ($counter_stdlist % 2 == 0) {
289 289
                     $class_stdlist = 'row_odd';
290 290
                 } else {
291 291
                     $class_stdlist = 'row_even';
292 292
                 }
293
-                $table_list .= '<tr class="' . $class_stdlist . '"><td>';
293
+                $table_list .= '<tr class="'.$class_stdlist.'"><td>';
294 294
                 $table_list .= UserManager::getUserProfileLink($userInfo);
295 295
 
296 296
                 $table_list .= '</td>';
297 297
                 if ($listType == 'qualify') {
298
-                    $table_list .= '<td>' . $row_student_list['qualify'] . '/' . $max_qualify . '</td>';
298
+                    $table_list .= '<td>'.$row_student_list['qualify'].'/'.$max_qualify.'</td>';
299 299
                 }
300 300
                 if (api_is_allowed_to_edit(null, true)) {
301 301
                     $current_qualify_thread = showQualify(
@@ -304,20 +304,20 @@  discard block
 block discarded – undo
304 304
                         $_GET['id']
305 305
                     );
306 306
                     $table_list .= '<td>
307
-                        <a href="' . $forumUrl . 'forumqualify.php?' . api_get_cidreq()
308
-                        . '&forum=' . Security::remove_XSS($my_forum) . '&thread='
309
-                        . Security::remove_XSS($_GET['id']) . '&user=' . $row_student_list['id']
310
-                        . '&user_id=' . $row_student_list['id'] . '&idtextqualify='
311
-                        . $current_qualify_thread . '&origin=' . $origin . '">'
312
-                        . Display::return_icon($icon_qualify, get_lang('Qualify')) . '</a></td></tr>';
307
+                        <a href="' . $forumUrl.'forumqualify.php?'.api_get_cidreq()
308
+                        . '&forum='.Security::remove_XSS($my_forum).'&thread='
309
+                        . Security::remove_XSS($_GET['id']).'&user='.$row_student_list['id']
310
+                        . '&user_id='.$row_student_list['id'].'&idtextqualify='
311
+                        . $current_qualify_thread.'&origin='.$origin.'">'
312
+                        . Display::return_icon($icon_qualify, get_lang('Qualify')).'</a></td></tr>';
313 313
                 }
314 314
                 $counter_stdlist++;
315 315
             }
316 316
         } else {
317 317
             if ($listType == 'qualify') {
318
-                $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotQualifiedLearners') . '</td></tr>';
318
+                $table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotQualifiedLearners').'</td></tr>';
319 319
             } else {
320
-                $table_list .= '<tr><td colspan="2">' . get_lang('ThereIsNotUnqualifiedLearners') . '</td></tr>';
320
+                $table_list .= '<tr><td colspan="2">'.get_lang('ThereIsNotUnqualifiedLearners').'</td></tr>';
321 321
             }
322 322
         }
323 323
 
@@ -343,14 +343,14 @@  discard block
 block discarded – undo
343 343
 echo '<div class="actions">';
344 344
 
345 345
 if ($origin != 'learnpath') {
346
-    if ($origin=='group') {
347
-        echo '<a href="' . api_get_path(WEB_CODE_PATH) . 'group/group_space.php?'
348
-            . api_get_cidreq() . '&gradebook=' . $gradebook . '">'
346
+    if ($origin == 'group') {
347
+        echo '<a href="'.api_get_path(WEB_CODE_PATH).'group/group_space.php?'
348
+            . api_get_cidreq().'&gradebook='.$gradebook.'">'
349 349
             . Display::return_icon('back.png', get_lang('BackTo')
350
-            . ' ' . get_lang('Groups'), '', ICON_SIZE_MEDIUM) . '</a>';
350
+            . ' '.get_lang('Groups'), '', ICON_SIZE_MEDIUM).'</a>';
351 351
     } else {
352 352
         echo '<span style="float:right;">'.search_link().'</span>';
353
-        echo '<a href="' . $forumUrl . 'index.php?' . api_get_cidreq() . '">'
353
+        echo '<a href="'.$forumUrl.'index.php?'.api_get_cidreq().'">'
354 354
             . Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM)
355 355
             . '</a>';
356 356
     }
@@ -368,14 +368,14 @@  discard block
 block discarded – undo
368 368
     if ($current_forum['locked'] <> 1 AND $current_forum['locked'] <> 1) {
369 369
         if (!api_is_anonymous() && !api_is_invitee()) {
370 370
             if ($my_forum == strval(intval($my_forum))) {
371
-                echo '<a href="' . $forumUrl . 'newthread.php?' . api_get_cidreq() . '&forum='
372
-                    . Security::remove_XSS($my_forum) . $origin_string . '">'
371
+                echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq().'&forum='
372
+                    . Security::remove_XSS($my_forum).$origin_string.'">'
373 373
                     . Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM)
374 374
                     . '</a>';
375 375
             } else {
376 376
                 $my_forum = strval(intval($my_forum));
377
-                echo '<a href="' . $forumUrl . 'newthread.php?' . api_get_cidreq()
378
-                    . '&forum=' . $my_forum . $origin_string . '">'
377
+                echo '<a href="'.$forumUrl.'newthread.php?'.api_get_cidreq()
378
+                    . '&forum='.$my_forum.$origin_string.'">'
379 379
                     . Display::return_icon('new_thread.png', get_lang('NewTopic'), '', ICON_SIZE_MEDIUM)
380 380
                     . '</a>';
381 381
             }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 if ($origin != 'learnpath') {
403 403
     $html .= Display::tag(
404 404
         'h3',
405
-        $iconForum .' '. $titleForum,
405
+        $iconForum.' '.$titleForum,
406 406
         array(
407 407
             'class' => 'title-forum')
408 408
     );
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
             }
445 445
 
446 446
             if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
447
-                $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
447
+                $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
448 448
             } else {
449 449
                 $newPost = '';
450 450
             }
@@ -454,12 +454,12 @@  discard block
 block discarded – undo
454 454
             }
455 455
 
456 456
             $name = api_get_person_name($row['firstname'], $row['lastname']);
457
-            $linkPostForum = '<a href="viewthread.php?' . api_get_cidreq() . '&forum=' . Security::remove_XSS($my_forum)
457
+            $linkPostForum = '<a href="viewthread.php?'.api_get_cidreq().'&forum='.Security::remove_XSS($my_forum)
458 458
                 . "&origin=$origin&thread={$row['thread_id']}$origin_string&search="
459
-                . Security::remove_XSS(urlencode($my_search)) . '">'
460
-                . $row['thread_title'] . '</a>';
459
+                . Security::remove_XSS(urlencode($my_search)).'">'
460
+                . $row['thread_title'].'</a>';
461 461
             $html = '';
462
-            $html .= '<div class="panel panel-default forum '.($row['thread_sticky']?'sticky':'').'">';
462
+            $html .= '<div class="panel panel-default forum '.($row['thread_sticky'] ? 'sticky' : '').'">';
463 463
             $html .= '<div class="panel-body">';
464 464
             $html .= '<div class="row">';
465 465
             $html .= '<div class="col-md-6">';
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                 );
492 492
             }
493 493
 
494
-            $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
494
+            $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>';
495 495
             $html .= '</div>';
496 496
             $html .= '<div class="col-md-10">';
497 497
             $html .= Display::tag(
@@ -501,8 +501,8 @@  discard block
 block discarded – undo
501 501
                     'class' => 'title'
502 502
                 )
503 503
             );
504
-            $html .= '<p>'. get_lang('By') .' ' .$authorName.'</p>';
505
-            $html .= '<p>' . api_convert_and_format_date($row['insert_date']) . '</p>';
504
+            $html .= '<p>'.get_lang('By').' '.$authorName.'</p>';
505
+            $html .= '<p>'.api_convert_and_format_date($row['insert_date']).'</p>';
506 506
             $html .= '</div>';
507 507
             $html .= '</div>';
508 508
 
@@ -511,13 +511,13 @@  discard block
 block discarded – undo
511 511
             $html .= '<div class="row">';
512 512
             $html .= '<div class="col-md-4">'
513 513
                 . Display::return_icon('post-forum.png', null, null, ICON_SIZE_SMALL)
514
-                . " {$row['thread_replies']} " . get_lang('Replies') . '<br>';
515
-            $html .=  Display::return_icon(
514
+                . " {$row['thread_replies']} ".get_lang('Replies').'<br>';
515
+            $html .= Display::return_icon(
516 516
                     'post-forum.png',
517 517
                     null,
518 518
                     null,
519 519
                     ICON_SIZE_SMALL
520
-                ) . ' ' . $row['thread_views'] . ' ' . get_lang('Views') . '<br>' . $newPost;
520
+                ).' '.$row['thread_views'].' '.get_lang('Views').'<br>'.$newPost;
521 521
             $html .= '</div>';
522 522
 
523 523
             $last_post_info = get_last_post_by_thread(
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
             if ($last_post_info) {
532 532
                 $poster_info = api_get_user_info($last_post_info['poster_id']);
533 533
                 $post_date = api_convert_and_format_date($last_post_info['post_date']);
534
-                $last_post = $post_date . '<br>' . get_lang('By') . ' ' . display_user_link(
534
+                $last_post = $post_date.'<br>'.get_lang('By').' '.display_user_link(
535 535
                     $last_post_info['poster_id'],
536 536
                     $poster_info['complete_name'],
537 537
                     '',
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 
542 542
             $html .= '<div class="col-md-5">'
543 543
                 . Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY)
544
-                . ' ' . $last_post;
544
+                . ' '.$last_post;
545 545
             $html .= '</div>';
546 546
             $html .= '<div class="col-md-3">';
547 547
             $cidreq = api_get_cidreq();
@@ -556,11 +556,11 @@  discard block
 block discarded – undo
556 556
                 if (api_is_allowed_to_edit(false, true) &&
557 557
                     !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)
558 558
                 ) {
559
-                    $iconsEdit .= '<a href="' . $forumUrl . 'editthread.php?' . $cidreq
560
-                        . '&forum=' . intval($my_forum) . '&thread='
559
+                    $iconsEdit .= '<a href="'.$forumUrl.'editthread.php?'.$cidreq
560
+                        . '&forum='.intval($my_forum).'&thread='
561 561
                         . intval($row['thread_id'])
562
-                        . '&id_attach=' . $id_attach . '">'
563
-                        . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
562
+                        . '&id_attach='.$id_attach.'">'
563
+                        . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
564 564
                     if (api_resource_is_locked_by_gradebook($row['thread_id'], LINK_FORUM_THREAD)) {
565 565
                         $iconsEdit .= Display::return_icon(
566 566
                             'delete_na.png',
@@ -569,13 +569,13 @@  discard block
 block discarded – undo
569 569
                             ICON_SIZE_SMALL
570 570
                         );
571 571
                     } else {
572
-                        $iconsEdit.= '<a href="' . api_get_self() . '?' . $cidreq . '&forum='
573
-                            . intval($my_forum) . '&action=delete&content=thread&id='
574
-                            . $row['thread_id'] . $origin_string
572
+                        $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
573
+                            . intval($my_forum).'&action=delete&content=thread&id='
574
+                            . $row['thread_id'].$origin_string
575 575
                             . "\" onclick=\"javascript:if(!confirm('"
576 576
                             . addslashes(api_htmlentities(get_lang('DeleteCompleteThread'), ENT_QUOTES))
577 577
                             . "')) return false;\">"
578
-                            . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) . '</a>';
578
+                            . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
579 579
                     }
580 580
 
581 581
                     $iconsEdit .= return_visible_invisible_icon(
@@ -598,9 +598,9 @@  discard block
 block discarded – undo
598 598
                             'gidReq' => api_get_group_id()
599 599
                         )
600 600
                     );
601
-                    $iconsEdit .= '<a href="viewforum.php?' . $cidreq . '&forum='
601
+                    $iconsEdit .= '<a href="viewforum.php?'.$cidreq.'&forum='
602 602
                         . intval($my_forum)
603
-                        . '&action=move&thread=' . $row['thread_id'] . $origin_string . '">'
603
+                        . '&action=move&thread='.$row['thread_id'].$origin_string.'">'
604 604
                         . Display::return_icon('move.png', get_lang('MoveThread'), array(), ICON_SIZE_SMALL)
605 605
                         . '</a>';
606 606
                 }
@@ -617,17 +617,17 @@  discard block
 block discarded – undo
617 617
             }
618 618
             $icon_liststd = 'user.png';
619 619
             if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
620
-                $iconsEdit .= '<a href="' . api_get_self() . '?' . $cidreq . '&forum='
620
+                $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
621 621
                     . Security::remove_XSS($my_forum)
622 622
                     . "&origin=$origin&action=notify&content=thread&id={$row['thread_id']}"
623
-                    . '">' . Display::return_icon($iconnotify, get_lang('NotifyMe')) . '</a>';
623
+                    . '">'.Display::return_icon($iconnotify, get_lang('NotifyMe')).'</a>';
624 624
             }
625 625
 
626 626
             if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') {
627
-                $iconsEdit .= '<a href="' . api_get_self() . '?' . $cidreq . '&forum='
627
+                $iconsEdit .= '<a href="'.api_get_self().'?'.$cidreq.'&forum='
628 628
                     . Security::remove_XSS($my_forum)
629 629
                     . "&origin=$origin&action=liststd&content=thread&id={$row['thread_id']}"
630
-                    . '">' . Display::return_icon($icon_liststd, get_lang('StudentList'), array(), ICON_SIZE_SMALL)
630
+                    . '">'.Display::return_icon($icon_liststd, get_lang('StudentList'), array(), ICON_SIZE_SMALL)
631 631
                     . '</a>';
632 632
             }
633 633
             $html .= $iconsEdit;
Please login to merge, or discard this patch.
main/forum/forumqualify.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
 /*
60 60
     Header and Breadcrumbs
61 61
 */
62
-if (isset($_SESSION['gradebook'])){
63
-    $gradebook=	$_SESSION['gradebook'];
62
+if (isset($_SESSION['gradebook'])) {
63
+    $gradebook = $_SESSION['gradebook'];
64 64
 }
65 65
 
66
-if (!empty($gradebook) && $gradebook=='view') {
67
-    $interbreadcrumb[]= array (
66
+if (!empty($gradebook) && $gradebook == 'view') {
67
+    $interbreadcrumb[] = array(
68 68
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
69 69
         'name' => get_lang('ToolGradebook')
70 70
     );
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             "name" => prepare4display($currentForum['forum_title'])
89 89
         );
90 90
         if ($message <> 'PostDeletedSpecial') {
91
-            $interbreadcrumb[]= array(
91
+            $interbreadcrumb[] = array(
92 92
                 "url" => "viewthread.php?forum=".intval($_GET['forum'])."&gradebook=".$gradebook."&thread=".intval($_GET['thread']),
93 93
                 "name" => prepare4display($currentThread['thread_title'])
94 94
             );
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
         );
120 120
 
121 121
         if ($message <> 'PostDeletedSpecial') {
122
-            if (isset($_GET['gradebook']) and $_GET['gradebook']=='view') {
123
-                $info_thread=get_thread_information($_GET['thread']);
122
+            if (isset($_GET['gradebook']) and $_GET['gradebook'] == 'view') {
123
+                $info_thread = get_thread_information($_GET['thread']);
124 124
                 $interbreadcrumb[] = array(
125 125
                     "url" => "viewthread.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&thread=".intval($_GET['thread']),
126 126
                     "name" => prepare4display($currentThread['thread_title'])
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
         }
135 135
         // the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
136
-        $interbreadcrumb[]=array("url" => "#","name" => get_lang('QualifyThread'));
136
+        $interbreadcrumb[] = array("url" => "#", "name" => get_lang('QualifyThread'));
137 137
         Display :: display_header('');
138 138
     }
139 139
 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 */
144 144
 $action = isset($_GET['action']) ? $_GET['action'] : '';
145 145
 
146
-if ($action =='delete' &&
146
+if ($action == 'delete' &&
147 147
     isset($_GET['content']) &&
148 148
     isset($_GET['id']) && api_is_allowed_to_edit(false, true)
149 149
 ) {
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
     if (isset($rows)) {
241 241
         $counter = 1;
242 242
         foreach ($rows as $row) {
243
-            if ($row['status']=='0') {
244
-                $style =" id = 'post".$post_en."' class=\"hide-me\" style=\"border:1px solid red; display:none; background-color:#F7F7F7; width:95%; margin: 0px 0px 4px 40px; \" ";
243
+            if ($row['status'] == '0') {
244
+                $style = " id = 'post".$post_en."' class=\"hide-me\" style=\"border:1px solid red; display:none; background-color:#F7F7F7; width:95%; margin: 0px 0px 4px 40px; \" ";
245 245
             } else {
246 246
                 $style = "";
247 247
                 $post_en = $row['post_parent_id'];
@@ -258,20 +258,20 @@  discard block
 block discarded – undo
258 258
 
259 259
             echo "<div ".$style."><table class=\"data_table\">";
260 260
 
261
-            if ($row['visible']=='0') {
262
-                $titleclass='forum_message_post_title_2_be_approved';
263
-                $messageclass='forum_message_post_text_2_be_approved';
264
-                $leftclass='forum_message_left_2_be_approved';
261
+            if ($row['visible'] == '0') {
262
+                $titleclass = 'forum_message_post_title_2_be_approved';
263
+                $messageclass = 'forum_message_post_text_2_be_approved';
264
+                $leftclass = 'forum_message_left_2_be_approved';
265 265
             } else {
266
-                $titleclass='forum_message_post_title';
267
-                $messageclass='forum_message_post_text';
268
-                $leftclass='forum_message_left';
266
+                $titleclass = 'forum_message_post_title';
267
+                $messageclass = 'forum_message_post_text';
268
+                $leftclass = 'forum_message_left';
269 269
             }
270 270
 
271 271
             echo "<tr>";
272 272
             echo "<td rowspan=\"3\" class=\"$leftclass\">";
273 273
 
274
-            echo '<br /><b>'.  api_convert_and_format_date($row['post_date'], DATE_TIME_FORMAT_LONG).'</b><br />';
274
+            echo '<br /><b>'.api_convert_and_format_date($row['post_date'], DATE_TIME_FORMAT_LONG).'</b><br />';
275 275
 
276 276
             echo "</td>";
277 277
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                 $realname = $attachment_list['path'];
293 293
                 $user_filename = $attachment_list['filename'];
294 294
 
295
-                echo Display::return_icon('attachment.gif',get_lang('Attachment'));
295
+                echo Display::return_icon('attachment.gif', get_lang('Attachment'));
296 296
                 echo '<a href="download.php?file=';
297 297
                 echo $realname;
298 298
                 echo ' "> '.$user_filename.' </a>';
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
 
312 312
     // Show past data
313 313
     if (api_is_allowed_to_edit() && $counter > 0) {
314
-        if (isset($_GET['gradebook'])){
315
-            $view_gradebook='&gradebook=view';
314
+        if (isset($_GET['gradebook'])) {
315
+            $view_gradebook = '&gradebook=view';
316 316
         }
317 317
         echo '<h4>'.get_lang('QualificationChangesHistory').'</h4>';
318 318
         if (isset($_GET['type']) && $_GET['type'] == 'false') {
@@ -342,12 +342,12 @@  discard block
 block discarded – undo
342 342
             );
343 343
             $table_list .= '</td></tr>';
344 344
         }
345
-        $table_list.= '</table>';
345
+        $table_list .= '</table>';
346 346
 
347 347
         echo $table_list;
348 348
     }
349 349
 }
350 350
 
351
-if ($origin!='learnpath') {
351
+if ($origin != 'learnpath') {
352 352
     Display :: display_footer();
353 353
 }
Please login to merge, or discard this patch.
main/forum/viewthread.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 require_once '../inc/global.inc.php';
10
-$current_course_tool  = TOOL_FORUM;
10
+$current_course_tool = TOOL_FORUM;
11 11
 
12 12
 $this_section = SECTION_COURSES;
13 13
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 // Are we in a lp ?
24 24
 $origin = '';
25 25
 if (isset($_GET['origin'])) {
26
-    $origin =  Security::remove_XSS($_GET['origin']);
26
+    $origin = Security::remove_XSS($_GET['origin']);
27 27
 }
28 28
 $my_search = null;
29 29
 $gradebook = null;
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
 // Note pcool: I tried to use only one sql statement (and function) for this,
37 37
 // but the problem is that the visibility of the forum AND forum category are stored in the item_property table.
38 38
 // Note: This has to be validated that it is an existing thread
39
-$current_thread	= get_thread_information($_GET['thread']);
39
+$current_thread = get_thread_information($_GET['thread']);
40 40
 // Note: This has to be validated that it is an existing forum.
41
-$current_forum	= get_forum_information($current_thread['forum_id']);
42
-$current_forum_category	= get_forumcategory_information($current_forum['forum_category']);
41
+$current_forum = get_forum_information($current_thread['forum_id']);
42
+$current_forum_category = get_forumcategory_information($current_forum['forum_category']);
43 43
 $whatsnew_post_info = isset($_SESSION['whatsnew_post_info']) ? $_SESSION['whatsnew_post_info'] : null;
44 44
 /* Header and Breadcrumbs */
45 45
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 }
50 50
 
51 51
 if (!empty($gradebook) && $gradebook == 'view') {
52
-    $interbreadcrumb[] = array (
53
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
52
+    $interbreadcrumb[] = array(
53
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
54 54
         'name' => get_lang('ToolGradebook')
55 55
     );
56 56
 }
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
         'name' => get_lang('Groups')
66 66
     );
67 67
     $interbreadcrumb[] = array(
68
-        'url' => '../group/group_space.php?' . api_get_cidreq(),
69
-        'name' => get_lang('GroupSpace') . ' ' . $group_properties['name']
68
+        'url' => '../group/group_space.php?'.api_get_cidreq(),
69
+        'name' => get_lang('GroupSpace').' '.$group_properties['name']
70 70
     );
71 71
     $interbreadcrumb[] = array(
72
-        'url' => 'viewforum.php?forum=' . intval($_GET['forum']) . '&' . api_get_cidreq()
73
-            . "&origin=$origin&search=" . Security::remove_XSS(urlencode($my_search)),
72
+        'url' => 'viewforum.php?forum='.intval($_GET['forum']).'&'.api_get_cidreq()
73
+            . "&origin=$origin&search=".Security::remove_XSS(urlencode($my_search)),
74 74
         'name' => Security::remove_XSS($current_forum['forum_title'])
75 75
     );
76 76
     $interbreadcrumb[] = array(
77
-        'url' => 'viewthread.php?forum=' . intval($_GET['forum']) . '&' . api_get_cidreq(). '&thread=' . intval($_GET['thread']),
77
+        'url' => 'viewthread.php?forum='.intval($_GET['forum']).'&'.api_get_cidreq().'&thread='.intval($_GET['thread']),
78 78
         'name' => Security::remove_XSS($current_thread['thread_title'])
79 79
     );
80 80
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $interbreadcrumb[] = array(
88 88
             'url' => 'index.php?'
89 89
                 . (isset($gradebook) ? "gradebook=$gradebook&" : '')
90
-                . 'search=' . Security::remove_XSS(urlencode($my_search)),
90
+                . 'search='.Security::remove_XSS(urlencode($my_search)),
91 91
             'name' => $nameTools
92 92
         );
93 93
         $interbreadcrumb[] = array(
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             'name' => Security::remove_XSS($current_forum_category['cat_title'])
99 99
         );
100 100
         $interbreadcrumb[] = array(
101
-            'url' => 'viewforum.php?forum=' . intval($_GET['forum'])
101
+            'url' => 'viewforum.php?forum='.intval($_GET['forum'])
102 102
                 . "&origin=$origin&search="
103 103
                 . Security::remove_XSS(urlencode($my_search)),
104 104
             'name' => Security::remove_XSS($current_forum['forum_title'])
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
     echo '<div class="actions">';
172 172
     echo '<span style="float:right;">'.search_link().'</span>';
173 173
     if ($origin != 'learnpath') {
174
-        echo '<a href="' . $forumUrl . 'viewforum.php?forum='
175
-            . intval($_GET['forum']) . '&' . api_get_cidreq() . '">'
176
-            . Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM) . '</a>';
174
+        echo '<a href="'.$forumUrl.'viewforum.php?forum='
175
+            . intval($_GET['forum']).'&'.api_get_cidreq().'">'
176
+            . Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
177 177
     }
178 178
     // The reply to thread link should only appear when the forum_category is
179 179
     // not locked AND the forum is not locked AND the thread is not locked.
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
         if ($_user['user_id'] OR ($current_forum['allow_anonymous'] == 1 && !$_user['user_id'])) {
190 190
             // reply link
191 191
             if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
192
-                echo '<a href="' . $forumUrl . 'reply.php?' . api_get_cidreq() . '&forum='
193
-                    . intval($_GET['forum']) . '&thread='
194
-                    . intval($_GET['thread']) . '&action=replythread">'
192
+                echo '<a href="'.$forumUrl.'reply.php?'.api_get_cidreq().'&forum='
193
+                    . intval($_GET['forum']).'&thread='
194
+                    . intval($_GET['thread']).'&action=replythread">'
195 195
                     . Display::return_icon('reply_thread.png', get_lang('ReplyToThread'), '', ICON_SIZE_MEDIUM)
196 196
                     . '</a>';
197 197
             }
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 
216 216
     // The different views of the thread.
217 217
     if ($origin != 'learnpath') {
218
-        $my_url = '<a href="' . $forumUrl . 'viewthread.php?' . api_get_cidreq() . '&' . api_get_cidreq()
219
-            . '&forum=' . intval($_GET['forum']) . '&thread=' . intval($_GET['thread'])
220
-            . '&search=' . Security::remove_XSS(urlencode($my_search));
221
-        echo $my_url . '&view=flat">'
218
+        $my_url = '<a href="'.$forumUrl.'viewthread.php?'.api_get_cidreq().'&'.api_get_cidreq()
219
+            . '&forum='.intval($_GET['forum']).'&thread='.intval($_GET['thread'])
220
+            . '&search='.Security::remove_XSS(urlencode($my_search));
221
+        echo $my_url.'&view=flat">'
222 222
             . Display::return_icon('forum_listview.png', get_lang('FlatView'), null, ICON_SIZE_MEDIUM)
223 223
             . '</a>';
224
-        echo $my_url . '&view=nested">'
224
+        echo $my_url.'&view=nested">'
225 225
             . Display::return_icon('forum_nestedview.png', get_lang('NestedView'), null, ICON_SIZE_MEDIUM)
226 226
             . '</a>';
227 227
     }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
     /* Display Forum Category and the Forum information */
233 233
 
234
-    if (!isset($_SESSION['view']))	{
234
+    if (!isset($_SESSION['view'])) {
235 235
         $viewMode = $current_forum['default_view'];
236 236
     } else {
237 237
         $viewMode = $_SESSION['view'];
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     }
248 248
 
249 249
     if (isset($_GET['msg']) && isset($_GET['type'])) {
250
-        switch($_GET['type']) {
250
+        switch ($_GET['type']) {
251 251
             case 'error':
252 252
                 Display::display_error_message($_GET['msg']);
253 253
                 break;
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         }
258 258
     }
259 259
 
260
-    if ($current_thread['thread_peer_qualify'] == 1 ) {
260
+    if ($current_thread['thread_peer_qualify'] == 1) {
261 261
         echo Display::return_message(get_lang('ForumThreadPeerScoringStudentComment'), 'info');
262 262
     }
263 263
 
Please login to merge, or discard this patch.
main/forum/reply.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 $origin = '';
32 32
 if (isset($_GET['origin'])) {
33
-    $origin =  Security::remove_XSS($_GET['origin']);
33
+    $origin = Security::remove_XSS($_GET['origin']);
34 34
     $origin_string = '&origin='.$origin;
35 35
 }
36 36
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 // We are getting all the information about the current forum and forum category.
45 45
 // Note pcool: I tried to use only one sql statement (and function) for this,
46 46
 // but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table.
47
-$current_thread	= get_thread_information($_GET['thread']); // Note: This has to be validated that it is an existing thread.
48
-$current_forum	= get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum.
47
+$current_thread = get_thread_information($_GET['thread']); // Note: This has to be validated that it is an existing thread.
48
+$current_forum = get_forum_information($current_thread['forum_id']); // Note: This has to be validated that it is an existing forum.
49 49
 $current_forum_category = get_forumcategory_information(Security::remove_XSS($current_forum['forum_category']));
50 50
 
51 51
 /* Is the user allowed here? */
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 /* Breadcrumbs */
81 81
 
82 82
 $gradebook = null;
83
-if (isset($_SESSION['gradebook'])){
83
+if (isset($_SESSION['gradebook'])) {
84 84
     $gradebook = Security::remove_XSS($_SESSION['gradebook']);
85 85
 }
86 86
 
87 87
 if (!empty($gradebook) && $gradebook == 'view') {
88
-    $interbreadcrumb[] = array (
88
+    $interbreadcrumb[] = array(
89 89
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
90 90
         'name' => get_lang('ToolGradebook')
91 91
     );
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 /* End new display forum */
189 189
 // The form for the reply
190 190
 $my_action   = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : '';
191
-$my_post     = isset($_GET['post']) ?   Security::remove_XSS($_GET['post']) : '';
191
+$my_post     = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : '';
192 192
 $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : '';
193 193
 $values = show_add_post_form(
194 194
     $current_forum,
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
     //@todo split the show_add_post_form function
203 203
     $origin = isset($_GET['origin']) && $_GET['origin'] === 'learnpath' ? 'learnpath' : null;
204 204
 
205
-    $url = 'viewthread.php?' . http_build_query([
205
+    $url = 'viewthread.php?'.http_build_query([
206 206
         'forum' => $current_thread['forum_id'],
207 207
         'gradebook' => $gradebook,
208 208
         'thread' => intval($_GET['thread']),
Please login to merge, or discard this patch.