Passed
Push — 1.10.x ( 918f1f...c8b126 )
by Yannick
419:13 queued 372:02
created
main/forum/viewthread_flat.inc.php 1 patch
Spacing   +32 added lines, -32 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, $origin) . '</div>';
124
+                    $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>';
125 125
                 }
126 126
                 $html .= Display::tag(
127 127
                     'h4',
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
                 );
131 131
             } else {
132 132
                 if (api_get_course_setting('allow_user_image_forum')) {
133
-                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
133
+                    $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>';
134 134
                 }
135
-                $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name";
135
+                $name = Display::tag('strong', "#".$postCount--, ['class' => 'text-info'])." | $name";
136 136
 
137 137
                 $html .= Display::tag(
138 138
                     'p',
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
             ) {
176 176
                 if (api_is_allowed_to_session_edit(false, true)) {
177 177
                     if ($locked == false) {
178
-                        $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
179
-                            . "&thread=" . $clean_thread_id . "&post=" . $row['post_id'] . "&origin="
180
-                            . $origin . "&edit=edition&id_attach=" . $id_attach . "\">"
181
-                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . "</a>";
178
+                        $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id
179
+                            . "&thread=".$clean_thread_id."&post=".$row['post_id']."&origin="
180
+                            . $origin."&edit=edition&id_attach=".$id_attach."\">"
181
+                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>";
182 182
                     }
183 183
                 }
184 184
             }
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
                 ) {
191 191
 
192 192
                     if ($locked == false) {
193
-                        $iconEdit .= "<a href=\"" . api_get_self() . "?" . api_get_cidreq() . "&forum="
194
-                            . $clean_forum_id . "&thread=" . $clean_thread_id
195
-                            . "&action=delete&content=post&id=" . $row['post_id'] . "&origin="
196
-                            . $origin . "\" onclick=\"javascript:if(!confirm('"
193
+                        $iconEdit .= "<a href=\"".api_get_self()."?".api_get_cidreq()."&forum="
194
+                            . $clean_forum_id."&thread=".$clean_thread_id
195
+                            . "&action=delete&content=post&id=".$row['post_id']."&origin="
196
+                            . $origin."\" onclick=\"javascript:if(!confirm('"
197 197
                             . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES))
198 198
                             . "')) return false;\">"
199 199
                             . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
                     );
214 214
                     $iconEdit .= "";
215 215
                     if ($increment > 0) {
216
-                        $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
217
-                            . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id']
218
-                            . "&origin=" . $origin . "\">"
216
+                        $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".$clean_forum_id
217
+                            . "&thread=".$clean_thread_id."&action=move&post=".$row['post_id']
218
+                            . "&origin=".$origin."\">"
219 219
                             . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)
220 220
                             . "</a>";
221 221
                     }
@@ -248,16 +248,16 @@  discard block
 block discarded – undo
248 248
                     $userCanEdit = true;
249 249
                 }
250 250
                 if ($increment > 0 && $locked == false && $userCanEdit) {
251
-                    $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id
252
-                        . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id']
253
-                        . "&user=" . $row['poster_id'] . "&user_id=" . $row['poster_id']
254
-                        . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >"
251
+                    $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$my_forum_id
252
+                        . "&thread=".$clean_thread_id."&action=list&post=".$row['post_id']
253
+                        . "&user=".$row['poster_id']."&user_id=".$row['poster_id']
254
+                        . "&origin=".$origin."&idtextqualify=".$current_qualify_thread."\" >"
255 255
                         . Display::return_icon('quiz.gif', get_lang('Qualify'))
256 256
                         . "</a> ";
257 257
                 }
258 258
             }
259 259
             if ($iconEdit != '') {
260
-                $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
260
+                $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
261 261
             }
262 262
 
263 263
             $html .= $closedPost;
@@ -315,27 +315,27 @@  discard block
 block discarded – undo
315 315
                     $user_filename = $attachment['filename'];
316 316
 
317 317
                     $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
318
-                    $html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>';
318
+                    $html .= '<a href="download.php?file='.$realname.'"> '.$user_filename.' </a>';
319 319
 
320 320
                     if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) ||
321 321
                         (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
322 322
                     ) {
323
-                        $html .= '&nbsp;&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin='
324
-                            . Security::remove_XSS($origin) . '&action=delete_attach&id_attach='
325
-                            . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id
323
+                        $html .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='
324
+                            . Security::remove_XSS($origin).'&action=delete_attach&id_attach='
325
+                            . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
326 326
                             . '" onclick="javascript:if(!confirm(\''
327 327
                             . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))
328 328
                             . '\')) return false;">'
329 329
                             . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
330 330
                             . '</a><br />';
331 331
                     }
332
-                    $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
332
+                    $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
333 333
                 }
334 334
             }
335 335
 
336 336
             $html .= '</div>';
337 337
             $html .= '<div class="col-md-5 text-right">';
338
-            $html .= $buttonReply . ' ' . $buttonQuote;
338
+            $html .= $buttonReply.' '.$buttonQuote;
339 339
             $html .= '</div>';
340 340
             $html .= '</div>';
341 341
 
Please login to merge, or discard this patch.
main/forum/viewthread_nested.inc.php 1 patch
Spacing   +26 added lines, -26 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(
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         );
84 84
     } else {
85 85
         if (api_get_course_setting('allow_user_image_forum')) {
86
-            $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>';
86
+            $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>';
87 87
         }
88 88
         
89 89
         $html .= Display::tag(
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
125 125
     ) {
126 126
         if ($locked == false) {
127
-            $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq()
127
+            $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()
128 128
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&post={$post['post_id']}&id_attach=$id_attach"
129 129
                 . "\">"
130 130
                 . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
         !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)
139 139
     ) {
140 140
         if ($locked == false) {
141
-            $iconEdit .="<a href=\"" . api_get_self() . "?" . api_get_cidreq()
141
+            $iconEdit .= "<a href=\"".api_get_self()."?".api_get_cidreq()
142 142
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&action=delete&content=post&id={$post['post_id']}"
143 143
                 . "\" onclick=\"javascript:if(!confirm('"
144
-                . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES)) . "')) return false;\">"
144
+                . addslashes(api_htmlentities(get_lang('DeletePost'), ENT_QUOTES))."')) return false;\">"
145 145
                 . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
146 146
                 . "</a>";
147 147
         }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
         );
166 166
 
167 167
         if ($count > 0) {
168
-            $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq()
168
+            $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()
169 169
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}"
170
-                . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>";
170
+                . "\">".Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)."</a>";
171 171
         }
172 172
     }
173 173
 
@@ -186,17 +186,17 @@  discard block
 block discarded – undo
186 186
                 '1', $post['user_id'], $_GET['thread']
187 187
             );
188 188
             if ($locked == false) {
189
-                $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq()
189
+                $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()
190 190
                     . "&forum=$clean_forum_id&thread=$clean_thread_id&action=list&post={$post['post_id']}"
191 191
                     . "&user={$post['user_id']}&user_id={$post['user_id']}&origin=$origin"
192 192
                     . "&idtextqualify=$current_qualify_thread"
193
-                    . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a>";
193
+                    . "\" >".Display::return_icon('quiz.gif', get_lang('Qualify'))."</a>";
194 194
             }
195 195
         }
196 196
     }
197 197
 
198 198
     if ($iconEdit != '') {
199
-        $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
199
+        $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
200 200
     }
201 201
 
202 202
     if (($current_forum_category && $current_forum_category['locked'] == 0) &&
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 
208 208
                 $buttonReply = Display::tag(
209 209
                     'a',
210
-                    '<em class="fa fa-reply"></em> ' . get_lang('ReplyToMessage'),
210
+                    '<em class="fa fa-reply"></em> '.get_lang('ReplyToMessage'),
211 211
                     array(
212
-                        'href' => 'reply.php?' . api_get_cidreq()
212
+                        'href' => 'reply.php?'.api_get_cidreq()
213 213
                             . "&forum=$clean_forum_id'&thread=$clean_thread_id"
214 214
                             . "&post={$post['post_id']}&action=replymessage&origin=$origin",
215 215
                         'class' => 'btn btn-primary'
@@ -218,9 +218,9 @@  discard block
 block discarded – undo
218 218
 
219 219
                 $buttonQuote = Display::tag(
220 220
                     'a',
221
-                    '<em class="fa fa-quote-left"></em> ' . get_lang('QuoteMessage'),
221
+                    '<em class="fa fa-quote-left"></em> '.get_lang('QuoteMessage'),
222 222
                     array(
223
-                        'href' => 'reply.php?' . api_get_cidreq()
223
+                        'href' => 'reply.php?'.api_get_cidreq()
224 224
                             . "&forum=$clean_forum_id&thread=$clean_thread_id"
225 225
                             . "&post={$post['post_id']}&action=quote&origin=$origin",
226 226
                         'class' => 'btn btn-success'
@@ -232,21 +232,21 @@  discard block
 block discarded – undo
232 232
         if ($current_forum_category && $current_forum_category['locked'] == 1) {
233 233
             $closedPost = Display::tag(
234 234
                 'div',
235
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'),
235
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
236 236
                 array('class' => 'alert alert-warning post-closed')
237 237
             );
238 238
         }
239 239
         if ($current_forum['locked'] == 1) {
240 240
             $closedPost = Display::tag(
241 241
                 'div',
242
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'),
242
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
243 243
                 array('class' => 'alert alert-warning post-closed')
244 244
             );
245 245
         }
246 246
         if ($current_thread['locked'] == 1) {
247 247
             $closedPost = Display::tag(
248 248
                 'div',
249
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'),
249
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
250 250
                 array('class' => 'alert alert-warning post-closed')
251 251
             );
252 252
         }
@@ -298,24 +298,24 @@  discard block
 block discarded – undo
298 298
             $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
299 299
             $html .= '<a href="download.php?file=';
300 300
             $html .= $realname;
301
-            $html .= ' "> ' . $user_filename . ' </a>';
302
-            $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
301
+            $html .= ' "> '.$user_filename.' </a>';
302
+            $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
303 303
             if (($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) ||
304 304
                 (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
305 305
             ) {
306
-                $html .= '&nbsp;&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin='
307
-                    . Security::remove_XSS($_GET['origin']) . '&action=delete_attach&id_attach='
308
-                    . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id
306
+                $html .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='
307
+                    . Security::remove_XSS($_GET['origin']).'&action=delete_attach&id_attach='
308
+                    . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
309 309
                     . '" onclick="javascript:if(!confirm(\''
310
-                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;">'
311
-                    . Display::return_icon('delete.gif', get_lang('Delete')) . '</a><br />';
310
+                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">'
311
+                    . Display::return_icon('delete.gif', get_lang('Delete')).'</a><br />';
312 312
             }
313 313
         }
314 314
     }
315 315
 
316 316
     $html .= '</div>';
317 317
     $html .= '<div class="col-md-6 text-right">';
318
-    $html .= $buttonReply . ' ' . $buttonQuote;
318
+    $html .= $buttonReply.' '.$buttonQuote;
319 319
     $html .= '</div>';
320 320
     $html .= '</div>';
321 321
     // The post has been displayed => it can be removed from the what's new array
Please login to merge, or discard this patch.