Code Duplication    Length = 5-10 lines in 7 locations

main/admin/course_category.php 1 location

@@ 142-148 (lines=7) @@
139
    }
140
    echo '<div class="actions">';
141
    $link = null;
142
    if (!empty($parentInfo)) {
143
        $parentCode = $parentInfo['parent_id'];
144
        echo Display::url(
145
            Display::return_icon('back.png', get_lang("Back"), '', ICON_SIZE_MEDIUM),
146
            api_get_path(WEB_CODE_PATH).'admin/course_category.php?category='.$parentCode
147
        );
148
    }
149
150
    if (empty($parentInfo) || $parentInfo['auth_cat_child'] == 'TRUE') {
151
        echo Display::url(

main/forum/index.php 2 locations

@@ 415-423 (lines=9) @@
412
                        $forumInfo['alert'] = null;
413
                        // The number of topics and posts.
414
                        if ($forum['forum_of_group'] !== '0') {
415
                            if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
416
                                $forumInfo['alert'] = ' '.
417
                                Display::return_icon(
418
                                    'alert.png',
419
                                    get_lang('Forum'),
420
                                    null,
421
                                    ICON_SIZE_SMALL
422
                                );
423
                            }
424
                        } else {
425
                            if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
426
                                $forumInfo['alert'] = ' '.Display::return_icon(
@@ 424-433 (lines=10) @@
421
                                    ICON_SIZE_SMALL
422
                                );
423
                            }
424
                        } else {
425
                            if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
426
                                $forumInfo['alert'] = ' '.Display::return_icon(
427
                                    'alert.png',
428
                                    get_lang('Forum'),
429
                                    null,
430
                                    ICON_SIZE_SMALL
431
                                );
432
                            }
433
                        }
434
                        $poster_id = null;
435
                        // The last post in the forum.
436
                        if (isset($forum['last_poster_name']) && $forum['last_poster_name'] != '') {

main/forum/viewforum.php 1 location

@@ 441-445 (lines=5) @@
438
                $my_whatsnew_post_info = $whatsnew_post_info[$my_forum][$row['thread_id']];
439
            }
440
441
            if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
442
                $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
443
            } else {
444
                $newPost = '';
445
            }
446
447
            $name = api_get_person_name($row['firstname'], $row['lastname']);
448

main/forum/viewforumcategory.php 2 locations

@@ 411-415 (lines=5) @@
408
                    // The number of topics and posts.
409
                    if ($forum['forum_of_group'] !== '0') {
410
                        $newPost = '';
411
                        if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
412
                            $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
413
                        } else {
414
                            $newPost = $iconEmpty;
415
                        }
416
                    } else {
417
                        if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
418
                            $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
@@ 417-421 (lines=5) @@
414
                            $newPost = $iconEmpty;
415
                        }
416
                    } else {
417
                        if (is_array($my_whatsnew_post_info) && !empty($my_whatsnew_post_info)) {
418
                            $newPost = ' '.Display::return_icon('alert.png', get_lang('Forum'), null, ICON_SIZE_SMALL);
419
                        } else {
420
                            $newPost = $iconEmpty;
421
                        }
422
                    }
423
424
                    $html .= '<div class="row">';

main/wiki/wiki.inc.php 1 location

@@ 1100-1107 (lines=8) @@
1097
1098
        // task mode
1099
        $icon_task = null;
1100
        if (!empty($row['task'])) {
1101
            $icon_task = Display::return_icon(
1102
                'wiki_task.png',
1103
                get_lang('StandardTask'),
1104
                '',
1105
                ICON_SIZE_SMALL
1106
            );
1107
        }
1108
1109
        // Show page. Show page to all users if isn't hide page. Mode assignments: if student is the author, can view
1110
        if ($KeyVisibility == "1" ||