Code Duplication    Length = 9-9 lines in 2 locations

admin/main.php 2 locations

@@ 256-264 (lines=9) @@
253
            $old_encoding = $hl->getVar('headline_encoding');
254
            if (!$hlman->insert($hl)) {
255
                $msg .= '<br>' . sprintf(_AM_HEADLINES_FAILUPDATE, $hl->getVar('headline_name'));
256
            } else {
257
                if ($hl->getVar('headline_xml') === '') {
258
                    $renderer = XoopsheadlineUtility::xoopsheadline_getrenderer($hl);
259
                    if (!$renderer->updateCache()) {
260
                        xoops_error($hl->getErrors(true));
261
                        require_once __DIR__ . '/admin_footer.php';
262
                    }
263
                }
264
            }
265
            $i++;
266
        }
267
        if ($msg != '') {
@@ 446-454 (lines=9) @@
443
            xoops_error($msg);
444
            require_once __DIR__ . '/admin_footer.php';
445
            exit();
446
        } else {
447
            if ($hl->getVar('headline_xml') == '') {
448
                $renderer = XoopsheadlineUtility::xoopsheadline_getrenderer($hl);
449
                if (!$renderer->updateCache()) {
450
                    xoops_error($hl->getErrors(true));
451
                    require_once __DIR__ . '/admin_footer.php';
452
                }
453
            }
454
        }
455
        redirect_header('main.php', 2, _AM_HEADLINES_DBUPDATED);
456
        break;
457
    case 'delete':