Code Duplication    Length = 9-10 lines in 2 locations

main/wiki/wiki.inc.php 2 locations

@@ 1056-1064 (lines=9) @@
1053
            }
1054
1055
            //page action: notification
1056
            if (api_is_allowed_to_session_edit()) {
1057
                if (self::check_notify_page($page) == 1) {
1058
                    $notify_page = Display::return_icon('messagebox_info.png', get_lang('NotifyByEmail'), '', ICON_SIZE_MEDIUM);
1059
                    $lock_unlock_notify_page = 'unlocknotify';
1060
                } else {
1061
                    $notify_page = Display::return_icon('mail.png', get_lang('CancelNotifyByEmail'), '', ICON_SIZE_MEDIUM);
1062
                    $lock_unlock_notify_page = 'locknotify';
1063
                }
1064
            }
1065
1066
            // Only available if row['id'] is set
1067
            if ($row['id']) {
@@ 4837-4846 (lines=10) @@
4834
        $lock_unlock_addnew = null;
4835
        $protect_addnewpage = null;
4836
4837
        if (api_is_allowed_to_edit(false, true) || api_is_platform_admin()) {
4838
            // page action: enable or disable the adding of new pages
4839
            if (self::check_addnewpagelock() == 0) {
4840
                $protect_addnewpage = Display::return_icon('off.png', get_lang('AddOptionProtected'));
4841
                $lock_unlock_addnew = 'unlockaddnew';
4842
            } else {
4843
                $protect_addnewpage = Display::return_icon('on.png', get_lang('AddOptionUnprotected'));
4844
                $lock_unlock_addnew = 'lockaddnew';
4845
            }
4846
        }
4847
4848
        // menu find
4849
        $actionsLeft .= '<a href="index.php?cidReq='.$_course['id'].'&action=searchpages&session_id='.$session_id.'&group_id='.$groupId.'"'.self::is_active_navigation_tab('searchpages').'>'.