Completed
Push — 1.10.x ( 23ef56...71a362 )
by
unknown
49:56
created
main/forum/index.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 if (!empty($gradebook) && $gradebook == 'view') {
66 66
     $interbreadcrumb[] = array(
67
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
67
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
68 68
         'name' => get_lang('ToolGradebook'),
69 69
     );
70 70
 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     switch ($_GET['content']) {
80 80
         case 'forum':
81 81
             $interbreadcrumb[] = array(
82
-                'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(),
82
+                'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(),
83 83
                 'name' => get_lang('Forum'),
84 84
             );
85 85
             $interbreadcrumb[] = array(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             break;
90 90
         case 'forumcategory':
91 91
             $interbreadcrumb[] = array(
92
-                'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(),
92
+                'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(),
93 93
                 'name' => get_lang('Forum'),
94 94
             );
95 95
             $interbreadcrumb[] = array(
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         . "&gradebook=&action=add_item&type=step&lp_id=$lp_id#resource_tab-5\">"
186 186
         . Display::return_icon(
187 187
             'back.png',
188
-            get_lang("BackTo") . ' ' . get_lang("LearningPaths"),
188
+            get_lang("BackTo").' '.get_lang("LearningPaths"),
189 189
             '',
190 190
             ICON_SIZE_MEDIUM
191 191
         )
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
 if (api_is_allowed_to_edit(false, true)) {
199 199
     echo '<a href="'
200
-        . api_get_self() . '?' . api_get_cidreq()
201
-        . '&action=add&content=forumcategory&lp_id=' . $lp_id . '"> ' .
200
+        . api_get_self().'?'.api_get_cidreq()
201
+        . '&action=add&content=forumcategory&lp_id='.$lp_id.'"> '.
202 202
         Display::return_icon(
203 203
             'new_folder.png', get_lang('AddForumCategory'), '', ICON_SIZE_MEDIUM
204 204
         )
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         );
249 249
 
250 250
         if (empty($sessionId) && !empty($forumCategory['session_name'])) {
251
-            $session_displayed = ' (' . Security::remove_XSS($forumCategory['session_name']) . ')';
251
+            $session_displayed = ' ('.Security::remove_XSS($forumCategory['session_name']).')';
252 252
         } else {
253 253
             $session_displayed = '';
254 254
         }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $html = '';
261 261
         $iconsEdit = '';
262 262
         $idCategory = $forumCategory['cat_id'];
263
-        $urlCategory = 'viewforumcategory.php?' . api_get_cidreq() . '&forumcategory=' . intval($idCategory);
263
+        $urlCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.intval($idCategory);
264 264
         $titleCategory = Display::tag(
265 265
             'a',
266 266
             $forumCategory['cat_title'],
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
                 !($forumCategory['session_id'] == 0 &&
279 279
                 intval($sessionId) != 0)
280 280
             ) {
281
-                $iconsEdit .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
282
-                    . '&action=edit&content=forumcategory&id=' . intval($idCategory)
283
-                    . '">' . Display::return_icon(
281
+                $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq()
282
+                    . '&action=edit&content=forumcategory&id='.intval($idCategory)
283
+                    . '">'.Display::return_icon(
284 284
                         'edit.png',
285 285
                         get_lang('Edit'),
286 286
                         array(),
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
                     )
289 289
                     . '</a>';
290 290
 
291
-                $iconsEdit .='<a href="' . api_get_self() . '?' . api_get_cidreq()
292
-                    . '&action=delete&content=forumcategory&id=' . intval($idCategory)
291
+                $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq()
292
+                    . '&action=delete&content=forumcategory&id='.intval($idCategory)
293 293
                     . "\" onclick=\"javascript:if(!confirm('"
294 294
                     . addslashes(api_htmlentities(
295 295
                         get_lang('DeleteForumCategory'),
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                         ICON_SIZE_SMALL
304 304
                     )
305 305
                     . '</a>';
306
-                $iconsEdit .=  return_visible_invisible_icon(
306
+                $iconsEdit .= return_visible_invisible_icon(
307 307
                     'forumcategory',
308 308
                     strval(intval($idCategory)),
309 309
                     strval(intval($forumCategory['visibility']))
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             array(),
338 338
             ICON_SIZE_MEDIUM
339 339
         );
340
-        $html .= '<h3>' . $icoCategory . $titleCategory . '</h3>';
340
+        $html .= '<h3>'.$icoCategory.$titleCategory.'</h3>';
341 341
 
342 342
         if ($descriptionCategory != '' && trim($descriptionCategory) != '&nbsp;') {
343 343
             $html .= '<div class="forum-description">'.$descriptionCategory.'</div>';
@@ -470,15 +470,15 @@  discard block
 block discarded – undo
470 470
                                 30
471 471
                             );
472 472
                             $forum_title_group_addition = ' (<a href="../group/group_space.php?'
473
-                                . api_get_cidreq() . '&gidReq=' . $forum['forum_of_group']
474
-                                . '" class="forum_group_link">' . get_lang('GoTo') . ' ' . $group_title . '</a>)'
473
+                                . api_get_cidreq().'&gidReq='.$forum['forum_of_group']
474
+                                . '" class="forum_group_link">'.get_lang('GoTo').' '.$group_title.'</a>)'
475 475
                                 . $session_img;
476 476
                         } else {
477 477
                             $forum_title_group_addition = '';
478 478
                         }
479 479
 
480 480
                         if (empty($sessionId) && !empty($forum['session_name'])) {
481
-                            $session_displayed = ' (' . $forum['session_name'] . ')';
481
+                            $session_displayed = ' ('.$forum['session_name'].')';
482 482
                         } else {
483 483
                             $session_displayed = '';
484 484
                         }
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
                         $html .= '<div class="row">';
491 491
                         $html .= '<div class="col-md-6">';
492 492
                         $html .= '<div class="col-md-3">';
493
-                        $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' ' . get_lang('ForumThreads') . '</p>'
493
+                        $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' '.get_lang('ForumThreads').'</p>'
494 494
                             . '</div>';
495 495
                         $html .= '</div>';
496 496
 
@@ -505,15 +505,15 @@  discard block
 block discarded – undo
505 505
                         $linkForum .= Display::tag(
506 506
                             'a',
507 507
                             $forum['forum_title'],
508
-                            array (
509
-                                'href' => 'viewforum.php?' . api_get_cidreq()
510
-                                    . '&gidReq=' . intval($groupid)
511
-                                    . '&forum=' . intval($forum['forum_id']),
512
-                                'class' => return_visible_invisible( strval( intval($forum['visibility']) ) )
508
+                            array(
509
+                                'href' => 'viewforum.php?'.api_get_cidreq()
510
+                                    . '&gidReq='.intval($groupid)
511
+                                    . '&forum='.intval($forum['forum_id']),
512
+                                'class' => return_visible_invisible(strval(intval($forum['visibility'])))
513 513
                             )
514 514
                         );
515 515
 
516
-                        $html .= '<h3 class="title">' . $iconForum . $linkForum . '</h3>';
516
+                        $html .= '<h3 class="title">'.$iconForum.$linkForum.'</h3>';
517 517
                         $html .= Display::tag(
518 518
                             'p',
519 519
                             Security::remove_XSS($forum['forum_comment']),
@@ -528,9 +528,9 @@  discard block
 block discarded – undo
528 528
 
529 529
                         // The number of topics and posts.
530 530
                         if ($forum['forum_of_group'] !== '0') {
531
-                            $newPost='';
531
+                            $newPost = '';
532 532
                             if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
533
-                                $newPost = ' ' . Display::return_icon(
533
+                                $newPost = ' '.Display::return_icon(
534 534
                                     'alert.png',
535 535
                                     get_lang('Forum'),
536 536
                                     null,
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
                             }
542 542
                         } else {
543 543
                             if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
544
-                                $newPost = ' ' . Display::return_icon(
544
+                                $newPost = ' '.Display::return_icon(
545 545
                                     'alert.png',
546 546
                                     get_lang('Forum'),
547 547
                                     null,
@@ -583,9 +583,9 @@  discard block
 block discarded – undo
583 583
                                     null,
584 584
                                     ICON_SIZE_TINY
585 585
                                 )
586
-                                . ' ' .
586
+                                . ' '.
587 587
                                 api_convert_and_format_date($forum['last_post_date'])
588
-                                . '<br /> ' . get_lang('By') . ' ' .
588
+                                . '<br /> '.get_lang('By').' '.
589 589
                                 display_user_link(
590 590
                                     $poster_id,
591 591
                                     $name,
@@ -600,13 +600,13 @@  discard block
 block discarded – undo
600 600
                             api_is_allowed_to_edit(false, true) &&
601 601
                             !($forum['session_id'] == 0 && intval($sessionId) != 0)
602 602
                         ) {
603
-                            $html .= '<a href="'.api_get_self() . '?' . api_get_cidreq()
604
-                                . '&action=edit&content=forum&id=' . $forum['forum_id'] . '">'
603
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
604
+                                . '&action=edit&content=forum&id='.$forum['forum_id'].'">'
605 605
                                 . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)
606 606
                                 . '</a>';
607
-                            $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
608
-                                . '&action=delete&content=forum&id=' . $forum['forum_id']
609
-                                . "\" onclick=\"javascript:if(!confirm('" . addslashes(
607
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
608
+                                . '&action=delete&content=forum&id='.$forum['forum_id']
609
+                                . "\" onclick=\"javascript:if(!confirm('".addslashes(
610 610
                                     api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES)
611 611
                                 )
612 612
                                 . "')) return false;\">"
@@ -644,8 +644,8 @@  discard block
 block discarded – undo
644 644
                             !api_is_anonymous() &&
645 645
                             api_is_allowed_to_session_edit(false, true)
646 646
                         ) {
647
-                            $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
648
-                                . '&action=notify&content=forum&id=' . $forum['forum_id'] . '">'
647
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
648
+                                . '&action=notify&content=forum&id='.$forum['forum_id'].'">'
649 649
                                 . Display::return_icon($iconnotify, get_lang('NotifyMe'), null, ICON_SIZE_SMALL)
650 650
                                 . '</a>';
651 651
                         }
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
                 }
663 663
             }
664 664
         } else {
665
-            echo '<div class="alert alert-warning">' . get_lang('NoForumInThisCategory') . '</div>'
665
+            echo '<div class="alert alert-warning">'.get_lang('NoForumInThisCategory').'</div>'
666 666
                 . (api_is_allowed_to_edit(false, true) ? '<div>' : '</div>')
667 667
                 . '</div>';
668 668
         }
Please login to merge, or discard this patch.