Code Duplication    Length = 9-10 lines in 2 locations

main/wiki/wiki.inc.php 2 locations

@@ 1183-1191 (lines=9) @@
1180
            }
1181
1182
            //page action: notification
1183
            if (api_is_allowed_to_session_edit()) {
1184
                if (self::check_notify_page($page) == 1) {
1185
                    $notify_page = Display::return_icon('messagebox_info.png', get_lang('NotifyByEmail'), '', ICON_SIZE_MEDIUM);
1186
                    $lock_unlock_notify_page = 'unlocknotify';
1187
                } else {
1188
                    $notify_page = Display::return_icon('mail.png', get_lang('CancelNotifyByEmail'), '', ICON_SIZE_MEDIUM);
1189
                    $lock_unlock_notify_page = 'locknotify';
1190
                }
1191
            }
1192
1193
            // Only available if row['id'] is set
1194
            if ($row['id']) {
@@ 5389-5398 (lines=10) @@
5386
        $lock_unlock_addnew = null;
5387
        $protect_addnewpage = null;
5388
5389
        if (api_is_allowed_to_edit(false, true) || api_is_platform_admin()) {
5390
            // page action: enable or disable the adding of new pages
5391
            if (self::check_addnewpagelock() == 0) {
5392
                $protect_addnewpage = Display::return_icon(
5393
                    'off.png',
5394
                    get_lang('AddOptionProtected')
5395
                );
5396
                $lock_unlock_addnew = 'unlockaddnew';
5397
            } else {
5398
                $protect_addnewpage = Display::return_icon(
5399
                    'on.png',
5400
                    get_lang('AddOptionUnprotected')
5401
                );