Completed
Push — 1.10.x ( ae816c...4c5f4c )
by Angel Fernando Quiroz
303:41 queued 253:33
created
main/forum/viewthread_flat.inc.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                     if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
66 66
                         $buttonReply = Display::toolbarButton(
67 67
                             get_lang('ReplyToMessage'),
68
-                            'reply.php?' . api_get_cidreq() . '&' . http_build_query([
68
+                            'reply.php?'.api_get_cidreq().'&'.http_build_query([
69 69
                                 'forum' => $clean_forum_id,
70 70
                                 'thread' => $clean_thread_id,
71 71
                                 'post' => $row['post_id'],
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
                         $buttonQuote = Display::toolbarButton(
80 80
                             get_lang('QuoteMessage'),
81
-                            'reply.php?' . api_get_cidreq() . '&' . http_build_query([
81
+                            'reply.php?'.api_get_cidreq().'&'.http_build_query([
82 82
                                 'forum' => $clean_forum_id,
83 83
                                 'thread' => $clean_thread_id,
84 84
                                 'post' => $row['post_id'],
@@ -95,21 +95,21 @@  discard block
 block discarded – undo
95 95
                 if (($current_forum_category && $current_forum_category['locked'] == 1)) {
96 96
                     $closedPost = Display::tag(
97 97
                         'div',
98
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'),
98
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
99 99
                         array('class' => 'alert alert-warning post-closed')
100 100
                     );
101 101
                 }
102 102
                 if ($current_forum['locked'] == 1) {
103 103
                     $closedPost = Display::tag(
104 104
                         'div',
105
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'),
105
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
106 106
                         array('class' => 'alert alert-warning post-closed')
107 107
                     );
108 108
                 }
109 109
                 if ($current_thread['locked'] == 1) {
110 110
                     $closedPost = Display::tag(
111 111
                         'div',
112
-                        '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'),
112
+                        '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
113 113
                         array('class' => 'alert alert-warning post-closed')
114 114
                     );
115 115
                 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
             if ($origin != 'learnpath') {
126 126
                 if (api_get_course_setting('allow_user_image_forum')) {
127
-                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
127
+                    $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>';
128 128
                 }
129 129
                 $html .= Display::tag(
130 130
                     'h4',
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
                 );
134 134
             } else {
135 135
                 if (api_get_course_setting('allow_user_image_forum')) {
136
-                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
136
+                    $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>';
137 137
                 }
138
-                $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name";
138
+                $name = Display::tag('strong', "#".$postCount--, ['class' => 'text-info'])." | $name";
139 139
 
140 140
                 $html .= Display::tag(
141 141
                     'p',
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
             ) {
179 179
                 if (api_is_allowed_to_session_edit(false, true)) {
180 180
                     if ($locked == false) {
181
-                        $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
182
-                            . "&thread=" . $clean_thread_id . "&post=" . $row['post_id'] . "&origin="
183
-                            . $origin . "&edit=edition&id_attach=" . $id_attach . "\">"
184
-                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . "</a>";
181
+                        $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id
182
+                            . "&thread=".$clean_thread_id."&post=".$row['post_id']."&origin="
183
+                            . $origin."&edit=edition&id_attach=".$id_attach."\">"
184
+                            . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>";
185 185
                     }
186 186
                 }
187 187
             }
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 ) {
194 194
 
195 195
                     if ($locked == false) {
196
-                        $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([
196
+                        $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([
197 197
                             'forum' => $clean_forum_id,
198 198
                             'thread' => $clean_thread_id,
199 199
                             'action' => 'delete',
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
                     );
226 226
                     $iconEdit .= "";
227 227
                     if ($increment > 0) {
228
-                        $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id
229
-                            . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id']
230
-                            . "&origin=" . $origin . "\">"
228
+                        $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".$clean_forum_id
229
+                            . "&thread=".$clean_thread_id."&action=move&post=".$row['post_id']
230
+                            . "&origin=".$origin."\">"
231 231
                             . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)
232 232
                             . "</a>";
233 233
                     }
@@ -260,16 +260,16 @@  discard block
 block discarded – undo
260 260
                     $userCanEdit = true;
261 261
                 }
262 262
                 if ($increment > 0 && $locked == false && $userCanEdit) {
263
-                    $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id
264
-                        . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id']
265
-                        . "&user=" . $row['poster_id'] . "&user_id=" . $row['poster_id']
266
-                        . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >"
263
+                    $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$my_forum_id
264
+                        . "&thread=".$clean_thread_id."&action=list&post=".$row['post_id']
265
+                        . "&user=".$row['poster_id']."&user_id=".$row['poster_id']
266
+                        . "&origin=".$origin."&idtextqualify=".$current_qualify_thread."\" >"
267 267
                         . Display::return_icon('quiz.gif', get_lang('Qualify'))
268 268
                         . "</a> ";
269 269
                 }
270 270
             }
271 271
             if ($iconEdit != '') {
272
-                $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
272
+                $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
273 273
             }
274 274
 
275 275
             $html .= $closedPost;
@@ -327,27 +327,27 @@  discard block
 block discarded – undo
327 327
                     $user_filename = $attachment['filename'];
328 328
 
329 329
                     $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
330
-                    $html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>';
330
+                    $html .= '<a href="download.php?file='.$realname.'"> '.$user_filename.' </a>';
331 331
 
332 332
                     if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) ||
333 333
                         (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId))
334 334
                     ) {
335
-                        $html .= '&nbsp;&nbsp;<a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin='
336
-                            . Security::remove_XSS($origin) . '&action=delete_attach&id_attach='
337
-                            . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id
335
+                        $html .= '&nbsp;&nbsp;<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='
336
+                            . Security::remove_XSS($origin).'&action=delete_attach&id_attach='
337
+                            . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
338 338
                             . '" onclick="javascript:if(!confirm(\''
339 339
                             . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))
340 340
                             . '\')) return false;">'
341 341
                             . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)
342 342
                             . '</a><br />';
343 343
                     }
344
-                    $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
344
+                    $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
345 345
                 }
346 346
             }
347 347
 
348 348
             $html .= '</div>';
349 349
             $html .= '<div class="col-md-5 text-right">';
350
-            $html .= $buttonReply . ' ' . $buttonQuote;
350
+            $html .= $buttonReply.' '.$buttonQuote;
351 351
             $html .= '</div>';
352 352
             $html .= '</div>';
353 353
 
Please login to merge, or discard this patch.
main/forum/viewthread_nested.inc.php 1 patch
Spacing   +23 added lines, -23 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,7 +138,7 @@  discard block
 block discarded – undo
138 138
         !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)
139 139
     ) {
140 140
         if ($locked == false) {
141
-            $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([
141
+            $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([
142 142
                     'forum' => $clean_forum_id,
143 143
                     'thread' => $clean_thread_id,
144 144
                     'action' => 'delete',
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
         );
177 177
 
178 178
         if ($count > 0) {
179
-            $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq()
179
+            $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()
180 180
                 . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}"
181
-                . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>";
181
+                . "\">".Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)."</a>";
182 182
         }
183 183
     }
184 184
 
@@ -197,17 +197,17 @@  discard block
 block discarded – undo
197 197
                 '1', $post['user_id'], $_GET['thread']
198 198
             );
199 199
             if ($locked == false) {
200
-                $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq()
200
+                $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()
201 201
                     . "&forum=$clean_forum_id&thread=$clean_thread_id&action=list&post={$post['post_id']}"
202 202
                     . "&user={$post['user_id']}&user_id={$post['user_id']}&origin=$origin"
203 203
                     . "&idtextqualify=$current_qualify_thread"
204
-                    . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a>";
204
+                    . "\" >".Display::return_icon('quiz.gif', get_lang('Qualify'))."</a>";
205 205
             }
206 206
         }
207 207
     }
208 208
 
209 209
     if ($iconEdit != '') {
210
-        $html .= '<div class="tools-icons">' . $iconEdit . '</div>';
210
+        $html .= '<div class="tools-icons">'.$iconEdit.'</div>';
211 211
     }
212 212
 
213 213
     if (($current_forum_category && $current_forum_category['locked'] == 0) &&
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) {
218 218
                 $buttonReply = Display::toolbarButton(
219 219
                     get_lang('ReplyToMessage'),
220
-                    'reply.php?' . api_get_cidreq() . '&' . http_build_query([
220
+                    'reply.php?'.api_get_cidreq().'&'.http_build_query([
221 221
                         'forum' => $clean_forum_id,
222 222
                         'thread' => $clean_thread_id,
223 223
                         'post' => $post['post_id'],
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 
231 231
                 $buttonQuote = Display::toolbarButton(
232 232
                     get_lang('QuoteMessage'),
233
-                    'reply.php?' . api_get_cidreq() . '&' . http_build_query([
233
+                    'reply.php?'.api_get_cidreq().'&'.http_build_query([
234 234
                         'forum' => $clean_forum_id,
235 235
                         'thread' => $clean_thread_id,
236 236
                         'post' => $post['post_id'],
@@ -246,21 +246,21 @@  discard block
 block discarded – undo
246 246
         if ($current_forum_category && $current_forum_category['locked'] == 1) {
247 247
             $closedPost = Display::tag(
248 248
                 'div',
249
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'),
249
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'),
250 250
                 array('class' => 'alert alert-warning post-closed')
251 251
             );
252 252
         }
253 253
         if ($current_forum['locked'] == 1) {
254 254
             $closedPost = Display::tag(
255 255
                 'div',
256
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'),
256
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'),
257 257
                 array('class' => 'alert alert-warning post-closed')
258 258
             );
259 259
         }
260 260
         if ($current_thread['locked'] == 1) {
261 261
             $closedPost = Display::tag(
262 262
                 'div',
263
-                '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'),
263
+                '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'),
264 264
                 array('class' => 'alert alert-warning post-closed')
265 265
             );
266 266
         }
@@ -312,24 +312,24 @@  discard block
 block discarded – undo
312 312
             $html .= Display::return_icon('attachment.gif', get_lang('Attachment'));
313 313
             $html .= '<a href="download.php?file=';
314 314
             $html .= $realname;
315
-            $html .= ' "> ' . $user_filename . ' </a>';
316
-            $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>';
315
+            $html .= ' "> '.$user_filename.' </a>';
316
+            $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>';
317 317
             if (($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) ||
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($_GET['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($_GET['origin']).'&action=delete_attach&id_attach='
322
+                    . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id
323 323
                     . '" onclick="javascript:if(!confirm(\''
324
-                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;">'
325
-                    . Display::return_icon('delete.gif', get_lang('Delete')) . '</a><br />';
324
+                    . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">'
325
+                    . Display::return_icon('delete.gif', get_lang('Delete')).'</a><br />';
326 326
             }
327 327
         }
328 328
     }
329 329
 
330 330
     $html .= '</div>';
331 331
     $html .= '<div class="col-md-6 text-right">';
332
-    $html .= $buttonReply . ' ' . $buttonQuote;
332
+    $html .= $buttonReply.' '.$buttonQuote;
333 333
     $html .= '</div>';
334 334
     $html .= '</div>';
335 335
     // The post has been displayed => it can be removed from the what's new array
Please login to merge, or discard this patch.