Passed
Push — 1.10.x ( aae6b1...e5a590 )
by Yannick
131:05 queued 81:36
created
main/forum/iframe_thread.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     echo "<tr>";
82 82
     echo "<td rowspan=\"2\" class=\"forum_message_left\">";
83 83
     $username = api_htmlentities(sprintf(get_lang('LoginX'), $row['username']), ENT_QUOTES);
84
-    if ($row['user_id']=='0') {
84
+    if ($row['user_id'] == '0') {
85 85
         $name = $row['poster_name'];
86 86
     } else {
87 87
         $name = api_get_person_name($row['firstname'], $row['lastname']);
Please login to merge, or discard this patch.
main/forum/viewforumcategory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -500,7 +500,7 @@
 block discarded – undo
500 500
                 $html .= '</div>';
501 501
                 $html .= '</div></div>';
502 502
             }
503
-           echo $html;
503
+            echo $html;
504 504
         }
505 505
     }
506 506
     if (count($forum_list) == 0) {
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
 $origin = '';
53 53
 
54 54
 if (isset($_GET['origin'])) {
55
-    $origin =  Security::remove_XSS($_GET['origin']);
55
+    $origin = Security::remove_XSS($_GET['origin']);
56 56
 }
57 57
 
58 58
 /* Header and Breadcrumbs */
59 59
 $gradebook = null;
60 60
 if (isset($_SESSION['gradebook'])) {
61
-    $gradebook=	$_SESSION['gradebook'];
61
+    $gradebook = $_SESSION['gradebook'];
62 62
 }
63 63
 
64 64
 if (!empty($gradebook) && $gradebook == 'view') {
65
-    $interbreadcrumb[] = array (
65
+    $interbreadcrumb[] = array(
66 66
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
67 67
         'name' => get_lang('ToolGradebook')
68 68
     );
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
 
73 73
 $current_forum_category = get_forum_categories($_GET['forumcategory']);
74 74
 $interbreadcrumb[] = array(
75
-    'url' => 'index.php?gradebook=' . $gradebook . '&search='
75
+    'url' => 'index.php?gradebook='.$gradebook.'&search='
76 76
         . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')),
77 77
     'name' => get_lang('Forum')
78 78
 );
79 79
 
80 80
 if (!empty($_GET['action']) && !empty($_GET['content'])) {
81
-    if ($_GET['action']=='add' && $_GET['content']=='forum' ) {
81
+    if ($_GET['action'] == 'add' && $_GET['content'] == 'forum') {
82 82
         $interbreadcrumb[] = array(
83 83
             'url' => 'viewforumcategory.php?forumcategory='
84
-                . $current_forum_category['cat_id'] . '&origin=' . $origin,
84
+                . $current_forum_category['cat_id'].'&origin='.$origin,
85 85
             'name' => $current_forum_category['cat_title']
86 86
         );
87 87
         $interbreadcrumb[] = array(
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     );
97 97
 }
98 98
 
99
-if ($origin=='learnpath') {
99
+if ($origin == 'learnpath') {
100 100
     Display::display_reduced_header();
101 101
 } else {
102 102
     Display::display_header(null);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 // then the user is not allowed here.
112 112
 if (
113 113
     !api_is_allowed_to_edit(false, true) AND
114
-    ( $current_forum_category && $current_forum_category['visibility'] == 0)
114
+    ($current_forum_category && $current_forum_category['visibility'] == 0)
115 115
 ) {
116 116
     api_not_allowed();
117 117
 }
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 $html .= '<div class="actions">';
122 122
 $html .= '<a href="index.php?gradebook='.$gradebook.'&'.api_get_cidreq().'">'.
123 123
     Display::return_icon('back.png', get_lang('BackToForumOverview'), '', ICON_SIZE_MEDIUM).'</a>';
124
-if (api_is_allowed_to_edit(false,true)) {
125
-    $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
126
-        . $current_forum_category['cat_id'] . '&action=add&content=forum"> '
127
-        . Display::return_icon('new_forum.png', get_lang('AddForum'), '', ICON_SIZE_MEDIUM) . '</a>';
124
+if (api_is_allowed_to_edit(false, true)) {
125
+    $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
126
+        . $current_forum_category['cat_id'].'&action=add&content=forum"> '
127
+        . Display::return_icon('new_forum.png', get_lang('AddForum'), '', ICON_SIZE_MEDIUM).'</a>';
128 128
 }
129 129
 $html .= search_link();
130 130
 $html .= '</div>';
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     $forum_categories_list = '';
185 185
     $forumId = $forum_category['cat_id'];
186 186
     $forumTitle = $forum_category['cat_title'];
187
-    $linkForumCategory = 'viewforumcategory.php?' . api_get_cidreq() . '&forumcategory=' . strval(intval($forumId));
187
+    $linkForumCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.strval(intval($forumId));
188 188
     $descriptionCategory = $forum_category['cat_comment'];
189 189
     $icoCategory = Display::return_icon(
190 190
         'forum_blue.png',
@@ -195,16 +195,16 @@  discard block
 block discarded – undo
195 195
 
196 196
     if (api_is_allowed_to_edit(false, true) && !($forum_category['session_id'] == 0 && $sessionId != 0)) {
197 197
 
198
-        $iconsEdit = '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
199
-            . Security::remove_XSS($_GET['forumcategory']) . '&action=edit&content=forumcategory&id='
200
-            . '' . $forumId . '">'
201
-            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
202
-        $iconsEdit .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
198
+        $iconsEdit = '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
199
+            . Security::remove_XSS($_GET['forumcategory']).'&action=edit&content=forumcategory&id='
200
+            . ''.$forumId.'">'
201
+            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
202
+        $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
203 203
             . Security::remove_XSS($_GET['forumcategory'])
204
-            . '&action=delete&content=forumcategory&id=' . $forumId
204
+            . '&action=delete&content=forumcategory&id='.$forumId
205 205
             . "\" onclick=\"javascript:if(!confirm('"
206 206
             . addslashes(api_htmlentities(get_lang('DeleteForumCategory'), ENT_QUOTES))
207
-            . "')) return false;\">" . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
207
+            . "')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
208 208
             . '</a>';
209 209
         $iconsEdit .= return_visible_invisible_icon(
210 210
             'forumcategory', $forum_category['cat_id'],
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     );
245 245
 
246 246
 
247
-    if ($descriptionCategory != '' && trim($descriptionCategory)!= '&nbsp;')
247
+    if ($descriptionCategory != '' && trim($descriptionCategory) != '&nbsp;')
248 248
     {
249 249
         $html .= '<div class="forum-description">'.$descriptionCategory.'</div>';
250 250
     }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             // SHOULD WE SHOW THIS PARTICULAR FORUM
285 285
             // you are teacher => show forum
286 286
 
287
-            if (api_is_allowed_to_edit(false,true)) {
287
+            if (api_is_allowed_to_edit(false, true)) {
288 288
                 //echo 'teacher';
289 289
                 $show_forum = true;
290 290
             } else {
@@ -351,9 +351,9 @@  discard block
 block discarded – undo
351 351
                         ? $all_groups[$forum['forum_of_group']]['id']
352 352
                         : null;
353 353
                     $group_title = api_substr($my_all_groups_forum_name, 0, 30);
354
-                    $forum_title_group_addition = ' (<a href="../group/group_space.php?' . api_get_cidreq()
355
-                        . '&gidReq=' . $my_all_groups_forum_id . '" class="forum_group_link">'
356
-                        . get_lang('GoTo') . ' ' . $group_title . '</a>)';
354
+                    $forum_title_group_addition = ' (<a href="../group/group_space.php?'.api_get_cidreq()
355
+                        . '&gidReq='.$my_all_groups_forum_id.'" class="forum_group_link">'
356
+                        . get_lang('GoTo').' '.$group_title.'</a>)';
357 357
                 } else {
358 358
                     $forum_title_group_addition = '';
359 359
                 }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
                 $html .= '<div class="row">';
372 372
                 $html .= '<div class="col-md-6">';
373 373
                 $html .= '<div class="col-md-3">';
374
-                $html .= '<div class="number-post">'.$forum_image .'<p>' . $my_number_threads . ' ' . get_lang('ForumThreads') . '</p></div>';
374
+                $html .= '<div class="number-post">'.$forum_image.'<p>'.$my_number_threads.' '.get_lang('ForumThreads').'</p></div>';
375 375
                 $html .= '</div>';
376 376
 
377 377
                 $html .= '<div class="col-md-9">';
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                     'a',
387 387
                     $forum['forum_title'].$session_displayed,
388 388
                     array(
389
-                        'href' => 'viewforum.php?' . api_get_cidreq()
389
+                        'href' => 'viewforum.php?'.api_get_cidreq()
390 390
                             . "&gidReq={$forum['forum_of_group']}&forum={$forum['forum_id']}&origin=$origin&search="
391 391
                             . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')),
392 392
                         'class' => return_visible_invisible($forum['visibility'])
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
                 );
395 395
                 $html .= Display::tag(
396 396
                     'h3',
397
-                    $linkForum . ' ' . $forum_title_group_addition,
397
+                    $linkForum.' '.$forum_title_group_addition,
398 398
                     array(
399 399
                         'class' => 'title'
400 400
                     )
@@ -410,19 +410,19 @@  discard block
 block discarded – undo
410 410
                 $html .= '</div>';
411 411
                 $html .= '<div class="col-md-6">';
412 412
 
413
-                $iconEmpty='';
413
+                $iconEmpty = '';
414 414
 
415 415
                 // The number of topics and posts.
416 416
                 if ($forum['forum_of_group'] !== '0') {
417 417
                     $newPost = '';
418 418
                     if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
419
-                        $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
419
+                        $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
420 420
                     } else {
421 421
                         $newPost = $iconEmpty;
422 422
                     }
423 423
                 } else {
424 424
                     if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
425
-                        $newPost = ' ' . Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
425
+                        $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
426 426
                     } else {
427 427
                         $newPost = $iconEmpty;
428 428
                     }
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 
431 431
                 $html .= '<div class="row">';
432 432
                 $html .= '<div class="col-md-2">';
433
-                $html .= $newPost . '</div>';
433
+                $html .= $newPost.'</div>';
434 434
 
435 435
                 // the last post in the forum
436 436
                 if ($forum['last_poster_name'] != '') {
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
                 }
443 443
                 $html .= '<div class="col-md-6">';
444 444
                 if (!empty($forum['last_post_id'])) {
445
-                    $html .= Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY) . ' ';
445
+                    $html .= Display::return_icon('post-item.png', null, null, ICON_SIZE_TINY).' ';
446 446
                     $html .= api_convert_and_format_date($forum['last_post_date'])
447
-                        . ' ' . get_lang('By') . ' '
447
+                        . ' '.get_lang('By').' '
448 448
                         . display_user_link($poster_id, $name);
449 449
                 }
450 450
                 $html .= '</div>';
@@ -454,13 +454,13 @@  discard block
 block discarded – undo
454 454
                     api_is_allowed_to_edit(false, true) &&
455 455
                     !($forum['session_id'] == 0 && $sessionId != 0)
456 456
                 ) {
457
-                    $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
457
+                    $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
458 458
                         . Security::remove_XSS($_GET['forumcategory'])
459
-                        . '&action=edit&content=forum&id=' . $forum['forum_id'] . '">'
460
-                        . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
461
-                    $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
459
+                        . '&action=edit&content=forum&id='.$forum['forum_id'].'">'
460
+                        . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
461
+                    $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
462 462
                         . Security::remove_XSS($_GET['forumcategory'])
463
-                        . '&action=delete&content=forum&id=' . $forum['forum_id']
463
+                        . '&action=delete&content=forum&id='.$forum['forum_id']
464 464
                         . "\" onclick=\"javascript:if(!confirm('"
465 465
                         . addslashes(api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES))
466 466
                         . "')) return false;\">"
@@ -484,15 +484,15 @@  discard block
 block discarded – undo
484 484
                 $iconnotify = 'notification_mail_na.png';
485 485
 
486 486
                 if (is_array(isset($_SESSION['forum_notification']['forum']) ? $_SESSION['forum_notification']['forum'] : null)) {
487
-                    if (in_array($forum['forum_id'],$_SESSION['forum_notification']['forum'])) {
487
+                    if (in_array($forum['forum_id'], $_SESSION['forum_notification']['forum'])) {
488 488
                         $iconnotify = 'notification_mail.png';
489 489
                     }
490 490
                 }
491 491
 
492 492
                 if (!api_is_anonymous()) {
493
-                    $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&forumcategory='
494
-                        . Security::remove_XSS($_GET['forumcategory']) . '&action=notify&content=forum&id='
495
-                        . $forum['forum_id'] . '">' . Display::return_icon($iconnotify, get_lang('NotifyMe')) . '</a>';
493
+                    $html .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&forumcategory='
494
+                        . Security::remove_XSS($_GET['forumcategory']).'&action=notify&content=forum&id='
495
+                        . $forum['forum_id'].'">'.Display::return_icon($iconnotify, get_lang('NotifyMe')).'</a>';
496 496
                 }
497 497
                 $html .= '</div>';
498 498
                 $html .= '</div>';
Please login to merge, or discard this patch.
main/forum/reply.php 1 patch
Spacing   +8 added lines, -8 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,19 +80,19 @@  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
     );
92 92
 }
93 93
 
94 94
 if ($origin == 'group') {
95
-    $_clean['toolgroup'] = (int)$_SESSION['toolgroup'];
95
+    $_clean['toolgroup'] = (int) $_SESSION['toolgroup'];
96 96
     $group_properties  = GroupManager :: get_group_properties($_clean['toolgroup']);
97 97
     $interbreadcrumb[] = array(
98 98
         'url' => '../group/group.php?'.api_get_cidreq(),
@@ -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.
main/forum/editpost.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
 
143 143
 if (!api_is_allowed_to_edit(null, true) &&
144 144
     (
145
-        ($current_forum_category && $current_forum_category['locked'] <> 0 ) ||
145
+        ($current_forum_category && $current_forum_category['locked'] <> 0) ||
146 146
         $current_forum['locked'] <> 0 ||
147 147
         $current_thread['locked'] <> 0
148 148
     )
Please login to merge, or discard this patch.
main/forum/viewpost.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * @package chamilo.forum
5
- */
4
+     * @package chamilo.forum
5
+     */
6 6
 
7 7
 require_once '../inc/global.inc.php';
8 8
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // Are we in a lp ?
29 29
 $origin = '';
30 30
 if (isset($_GET['origin'])) {
31
-    $origin =  Security::remove_XSS($_GET['origin']);
31
+    $origin = Security::remove_XSS($_GET['origin']);
32 32
 }
33 33
 
34 34
 /* MAIN DISPLAY SECTION */
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 
46 46
 /* Header and Breadcrumbs */
47 47
 
48
-if (isset($_SESSION['gradebook'])){
48
+if (isset($_SESSION['gradebook'])) {
49 49
     $gradebook = $_SESSION['gradebook'];
50 50
 }
51 51
 
52 52
 if (!empty($gradebook) && $gradebook == 'view') {
53
-    $interbreadcrumb[] = array (
53
+    $interbreadcrumb[] = array(
54 54
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
55 55
         'name' => get_lang('ToolGradebook')
56 56
     );
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     echo "\t<tr>\n\t\t<th style=\"padding-left:5px;\" align=\"left\" colspan=\"6\">";
184 184
     echo '<span class="forum_title">'.prepare4display($current_thread['thread_title']).'</span><br />';
185 185
 
186
-    if ($origin!='learnpath') {
186
+    if ($origin != 'learnpath') {
187 187
         echo '<span class="forum_low_description">'.prepare4display($current_forum_category['cat_title']).' - ';
188 188
     }
189 189
 
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=".Security::remove_XSS($_GET['forum'])."&gradebook=".$gradebook."&thread=".Security::remove_XSS($_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(Security::remove_XSS($_GET['thread']));
122
+            if (isset($_GET['gradebook']) and $_GET['gradebook'] == 'view') {
123
+                $info_thread = get_thread_information(Security::remove_XSS($_GET['thread']));
124 124
                 $interbreadcrumb[] = array(
125 125
                     "url" => "viewthread.php?".api_get_cidreq()."&forum=".$info_thread['forum_id']."&thread=".Security::remove_XSS($_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/editthread.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 if (!empty($gradebook) && $gradebook == 'view') {
50
-    $interbreadcrumb[] = array (
50
+    $interbreadcrumb[] = array(
51 51
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
52 52
         'name' => get_lang('ToolGradebook')
53 53
     );
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 if (!empty($_GET['gidReq'])) {
57 57
     $toolgroup = intval($_GET['gidReq']);
58
-    Session::write('toolgroup',$toolgroup);
58
+    Session::write('toolgroup', $toolgroup);
59 59
 }
60 60
 
61 61
 $threadId = isset($_GET['thread']) ? intval($_GET['thread']) : 0;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     $interbreadcrumb[] = array('url' => '../group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
115 115
     $interbreadcrumb[] = array('url' => '../group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
116 116
     $interbreadcrumb[] = array('url' => 'viewforum.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $currentForum['forum_title']);
117
-    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']),'name' => get_lang('EditThread'));
117
+    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => get_lang('EditThread'));
118 118
 } else {
119 119
     $interbreadcrumb[] = array('url' => 'index.php?'.$cidreq, 'name' => $nameTools);
120 120
     $interbreadcrumb[] = array('url' => 'viewforumcategory.php?'.$cidreq.'&forumcategory='.$currentForumCategory['cat_id'], 'name' => $currentForumCategory['cat_title']);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 echo '<div class="actions">';
164 164
 echo '<span style="float:right;">'.search_link().'</span>';
165 165
 echo '<a href="viewforum.php?forum='.intval($_GET['forum']).'&'.$cidreq.'">'.
166
-    Display::return_icon('back.png',get_lang('BackToForum'),'',ICON_SIZE_MEDIUM).'</a>';
166
+    Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
167 167
 echo '</div>';
168 168
 
169 169
 $threadData = getThreadInfo($threadId, $cId);
Please login to merge, or discard this patch.
main/forum/viewthread_flat.inc.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
                         $buttonReply = Display::tag(
68 68
                             'a',
69
-                            '<em class="fa fa-reply"></em> ' . get_lang('ReplyToMessage'),
69
+                            '<em class="fa fa-reply"></em> '.get_lang('ReplyToMessage'),
70 70
                             array(
71
-                                'href' => 'reply.php?' . api_get_cidreq()
71
+                                'href' => 'reply.php?'.api_get_cidreq()
72 72
                                     . "&forum=$clean_forum_id&thread=$clean_thread_id&post="
73 73
                                     . "{$row['post_id']}&action=replymessage&origin=$origin",
74 74
                                 'class' => 'btn btn-primary'
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 
78 78
                         $buttonQuote = Display::tag(
79 79
                             'a',
80
-                            '<em class="fa fa-quote-left"></em> ' . get_lang('QuoteMessage'),
80
+                            '<em class="fa fa-quote-left"></em> '.get_lang('QuoteMessage'),
81 81
                             array(
82
-                                'href' => 'reply.php?' . api_get_cidreq()
82
+                                'href' => 'reply.php?'.api_get_cidreq()
83 83
                                     . "&forum=$clean_forum_id&thread=$clean_thread_id"
84 84
                                     . "&post={$row['post_id']}&action=quote&origin=$origin",
85 85
                                 'class' => 'btn btn-success'
@@ -92,21 +92,21 @@  discard block
 block discarded – undo
92 92
                 if (($current_forum_category && $current_forum_category['locked'] == 1)) {
93 93
                     $closedPost = Display::tag(
94 94
                         'div',
95
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'),
95
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
96 96
                         array('class' => 'alert alert-warning post-closed')
97 97
                     );
98 98
                 }
99 99
                 if ($current_forum['locked'] == 1) {
100 100
                     $closedPost = Display::tag(
101 101
                         'div',
102
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'),
102
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
103 103
                         array('class' => 'alert alert-warning post-closed')
104 104
                     );
105 105
                 }
106 106
                 if ($current_thread['locked'] == 1) {
107 107
                     $closedPost = Display::tag(
108 108
                         'div',
109
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'),
109
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
110 110
                         array('class' => 'alert alert-warning post-closed')
111 111
                     );
112 112
                 }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
             if ($origin != 'learnpath') {
123 123
                 if (api_get_course_setting('allow_user_image_forum')) {
124
-                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name) . '</div>';
124
+                    $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name).'</div>';
125 125
                 }
126 126
                 $html .= Display::tag(
127 127
                     'h4',
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     array('class' => 'title-username')
130 130
                 );
131 131
             } else {
132
-                $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name";
132
+                $name = Display::tag('strong', "#".$postCount--, ['class' => 'text-info'])." | $name";
133 133
 
134 134
                 $html .= Display::tag(
135 135
                     'p',
@@ -172,10 +172,10 @@  discard block
 block discarded – undo
172 172
             ) {
173 173
                 if (api_is_allowed_to_session_edit(false, true)) {
174 174
                     if ($locked == false) {
175
-                        $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
176
-                            . "&thread=" . $clean_thread_id . "&post=" . $row['post_id'] . "&origin="
177
-                            . $origin . "&edit=edition&id_attach=" . $id_attach . "\">"
178
-                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . "</a>";
175
+                        $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id
176
+                            . "&thread=".$clean_thread_id."&post=".$row['post_id']."&origin="
177
+                            . $origin."&edit=edition&id_attach=".$id_attach."\">"
178
+                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>";
179 179
                     }
180 180
                 }
181 181
             }
@@ -187,10 +187,10 @@  discard block
 block discarded – undo
187 187
                 ) {
188 188
 
189 189
                     if ($locked == false) {
190
-                        $iconEdit .= "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&forum="
191
-                            . $clean_forum_id . "&thread=" . $clean_thread_id
192
-                            . "&action=delete&content=post&id=" . $row['post_id'] . "&origin="
193
-                            . $origin . "\" onclick=\"javascript:if(!confirm('"
190
+                        $iconEdit .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&forum="
191
+                            . $clean_forum_id."&thread=".$clean_thread_id
192
+                            . "&action=delete&content=post&id=".$row['post_id']."&origin="
193
+                            . $origin."\" onclick=\"javascript:if(!confirm('"
194 194
                             . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES))
195 195
                             . "')) return false;\">"
196 196
                             . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
@@ -210,9 +210,9 @@  discard block
 block discarded – undo
210 210
                     );
211 211
                     $iconEdit .= "";
212 212
                     if ($increment > 0) {
213
-                        $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
214
-                            . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id']
215
-                            . "&origin=" . $origin . "\">"
213
+                        $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".$clean_forum_id
214
+                            . "&thread=".$clean_thread_id."&action=move&post=".$row['post_id']
215
+                            . "&origin=".$origin."\">"
216 216
                             . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)
217 217
                             . "</a>";
218 218
                     }
@@ -245,16 +245,16 @@  discard block
 block discarded – undo
245 245
                     $userCanEdit = true;
246 246
                 }
247 247
                 if ($increment > 0 && $locked == false && $userCanEdit) {
248
-                    $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id
249
-                        . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id']
250
-                        . "&user=" . $row['poster_id'] . "&user_id=" . $row['poster_id']
251
-                        . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >"
248
+                    $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$my_forum_id
249
+                        . "&thread=".$clean_thread_id."&action=list&post=".$row['post_id']
250
+                        . "&user=".$row['poster_id']."&user_id=".$row['poster_id']
251
+                        . "&origin=".$origin."&idtextqualify=".$current_qualify_thread."\" >"
252 252
                         . Display::return_icon('quiz.gif', get_lang('Qualify'))
253 253
                         . "</a> ";
254 254
                 }
255 255
             }
256 256
             if ($iconEdit != '') {
257
-                $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
257
+                $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
258 258
             }
259 259
 
260 260
             $html .= $closedPost;
@@ -312,27 +312,27 @@  discard block
 block discarded – undo
312 312
                     $user_filename = $attachment['filename'];
313 313
 
314 314
                     $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
315
-                    $html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>';
315
+                    $html .= '<a href="download.php?file='.$realname.'"> '.$user_filename.' </a>';
316 316
 
317 317
                     if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) ||
318 318
                         (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
319 319
                     ) {
320
-                        $html .= '&nbsp;&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin='
321
-                            . Security::remove_XSS($origin) . '&action=delete_attach&id_attach='
322
-                            . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id
320
+                        $html .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='
321
+                            . Security::remove_XSS($origin).'&action=delete_attach&id_attach='
322
+                            . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
323 323
                             . '" onclick="javascript:if(!confirm(\''
324 324
                             . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))
325 325
                             . '\')) return false;">'
326 326
                             . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
327 327
                             . '</a><br />';
328 328
                     }
329
-                    $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
329
+                    $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
330 330
                 }
331 331
             }
332 332
 
333 333
             $html .= '</div>';
334 334
             $html .= '<div class="col-md-5 text-right">';
335
-            $html .= $buttonReply . ' ' . $buttonQuote;
335
+            $html .= $buttonReply.' '.$buttonQuote;
336 336
             $html .= '</div>';
337 337
             $html .= '</div>';
338 338
 
Please login to merge, or discard this patch.
main/forum/viewthread_nested.inc.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     $indent = $post['indent_cnt'];
57 57
 
58 58
     $html = '';
59
-    $html .= '<div class="col-md-offset-' . $indent . '" >';
59
+    $html .= '<div class="col-md-offset-'.$indent.'" >';
60 60
     $html .= '<div class="panel panel-default forum-post">';
61 61
     $html .= '<div class="panel-body">';
62 62
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     if ($origin != 'learnpath') {
75 75
         if (api_get_course_setting('allow_user_image_forum')) {
76
-            $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>';
76
+            $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>';
77 77
         }
78 78
 
79 79
         $html .= Display::tag(
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
121 121
     ) {
122 122
         if ($locked == false) {
123
-            $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq()
123
+            $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()
124 124
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&post={$post['post_id']}&id_attach=$id_attach"
125 125
                 . "\">"
126 126
                 . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
         !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)
135 135
     ) {
136 136
         if ($locked == false) {
137
-            $iconEdit .="<a href=\"" . api_get_self() . "?" . api_get_cidreq()
137
+            $iconEdit .= "<a href=\"".api_get_self()."?".api_get_cidreq()
138 138
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&action=delete&content=post&id={$post['post_id']}"
139 139
                 . "\" onclick=\"javascript:if(!confirm('"
140
-                . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . "')) return false;\">"
140
+                . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES))."')) return false;\">"
141 141
                 . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
142 142
                 . "</a>";
143 143
         }
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
         );
162 162
 
163 163
         if ($count > 0) {
164
-            $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq()
164
+            $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()
165 165
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}"
166
-                . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>";
166
+                . "\">".Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)."</a>";
167 167
         }
168 168
     }
169 169
 
@@ -182,17 +182,17 @@  discard block
 block discarded – undo
182 182
                 '1', $post['user_id'], $_GET['thread']
183 183
             );
184 184
             if ($locked == false) {
185
-                $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq()
185
+                $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()
186 186
                     . "&forum=$clean_forum_id&thread=$clean_thread_id&action=list&post={$post['post_id']}"
187 187
                     . "&user={$post['user_id']}&user_id={$post['user_id']}&origin=$origin"
188 188
                     . "&idtextqualify=$current_qualify_thread"
189
-                    . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a>";
189
+                    . "\" >".Display::return_icon('quiz.gif', get_lang('Qualify'))."</a>";
190 190
             }
191 191
         }
192 192
     }
193 193
 
194 194
     if ($iconEdit != '') {
195
-        $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
195
+        $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
196 196
     }
197 197
 
198 198
     if (($current_forum_category && $current_forum_category['locked'] == 0) &&
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 
204 204
                 $buttonReply = Display::tag(
205 205
                     'a',
206
-                    '<em class="fa fa-reply"></em> ' . get_lang('ReplyToMessage'),
206
+                    '<em class="fa fa-reply"></em> '.get_lang('ReplyToMessage'),
207 207
                     array(
208
-                        'href' => 'reply.php?' . api_get_cidreq()
208
+                        'href' => 'reply.php?'.api_get_cidreq()
209 209
                             . "&forum=$clean_forum_id'&thread=$clean_thread_id"
210 210
                             . "&post={$post['post_id']}&action=replymessage&origin=$origin",
211 211
                         'class' => 'btn btn-primary'
@@ -214,9 +214,9 @@  discard block
 block discarded – undo
214 214
 
215 215
                 $buttonQuote = Display::tag(
216 216
                     'a',
217
-                    '<em class="fa fa-quote-left"></em> ' . get_lang('QuoteMessage'),
217
+                    '<em class="fa fa-quote-left"></em> '.get_lang('QuoteMessage'),
218 218
                     array(
219
-                        'href' => 'reply.php?' . api_get_cidreq()
219
+                        'href' => 'reply.php?'.api_get_cidreq()
220 220
                             . "&forum=$clean_forum_id&thread=$clean_thread_id"
221 221
                             . "&post={$post['post_id']}&action=quote&origin=$origin",
222 222
                         'class' => 'btn btn-success'
@@ -228,21 +228,21 @@  discard block
 block discarded – undo
228 228
         if ($current_forum_category && $current_forum_category['locked'] == 1) {
229 229
             $closedPost = Display::tag(
230 230
                 'div',
231
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'),
231
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
232 232
                 array('class' => 'alert alert-warning post-closed')
233 233
             );
234 234
         }
235 235
         if ($current_forum['locked'] == 1) {
236 236
             $closedPost = Display::tag(
237 237
                 'div',
238
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'),
238
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
239 239
                 array('class' => 'alert alert-warning post-closed')
240 240
             );
241 241
         }
242 242
         if ($current_thread['locked'] == 1) {
243 243
             $closedPost = Display::tag(
244 244
                 'div',
245
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'),
245
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
246 246
                 array('class' => 'alert alert-warning post-closed')
247 247
             );
248 248
         }
@@ -294,24 +294,24 @@  discard block
 block discarded – undo
294 294
             $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
295 295
             $html .= '<a href="download.php?file=';
296 296
             $html .= $realname;
297
-            $html .= ' "> ' . $user_filename . ' </a>';
298
-            $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
297
+            $html .= ' "> '.$user_filename.' </a>';
298
+            $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
299 299
             if (($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) ||
300 300
                 (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
301 301
             ) {
302
-                $html .= '&nbsp;&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin='
303
-                    . Security::remove_XSS($_GET['origin']) . '&action=delete_attach&id_attach='
304
-                    . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id
302
+                $html .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='
303
+                    . Security::remove_XSS($_GET['origin']).'&action=delete_attach&id_attach='
304
+                    . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
305 305
                     . '" onclick="javascript:if(!confirm(\''
306
-                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;">'
307
-                    . Display::return_icon('delete.gif', get_lang('Delete')) . '</a><br />';
306
+                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">'
307
+                    . Display::return_icon('delete.gif', get_lang('Delete')).'</a><br />';
308 308
             }
309 309
         }
310 310
     }
311 311
 
312 312
     $html .= '</div>';
313 313
     $html .= '<div class="col-md-6 text-right">';
314
-    $html .= $buttonReply . ' ' . $buttonQuote;
314
+    $html .= $buttonReply.' '.$buttonQuote;
315 315
     $html .= '</div>';
316 316
     $html .= '</div>';
317 317
     // The post has been displayed => it can be removed from the what's new array
Please login to merge, or discard this patch.