Code Duplication    Length = 7-7 lines in 2 locations

htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2 locations

@@ 655-661 (lines=7) @@
652
            $tcount          = count($templates);
653
            if ($tcount > 0) {
654
                $msgs[] = _AM_SYSTEM_MODULES_TEMPLATES_DELETE;
655
                for ($i = 0; $i < $tcount; ++$i) {
656
                    if (false === $tplfile_handler->delete($templates[$i])) {
657
                        $msgs[] = '&nbsp;&nbsp;<span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_DELETE_DATA_FAILD, $templates[$i]->getVar('tpl_file')) . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, '<strong>' . $templates[$i]->getVar('tpl_id') . '</strong>') . '</span>';
658
                    } else {
659
                        $msgs[] = '&nbsp;&nbsp;' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_DELETE_DATA, '<strong>' . $templates[$i]->getVar('tpl_file') . '</strong>') . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, '<strong>' . $templates[$i]->getVar('tpl_id') . '</strong>');
660
                    }
661
                }
662
            }
663
            unset($templates);
664
@@ 680-686 (lines=7) @@
677
                        $templates = $tplfile_handler->find(null, 'block', $block_arr[$i]->getVar('bid'));
678
                        $btcount   = count($templates);
679
                        if ($btcount > 0) {
680
                            for ($j = 0; $j < $btcount; ++$j) {
681
                                if (!$tplfile_handler->delete($templates[$j])) {
682
                                    $msgs[] = '&nbsp;&nbsp;<span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_BLOCK_DELETE_TEMPLATE_ERROR, $templates[$j]->getVar('tpl_file')) . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, '<strong>' . $templates[$j]->getVar('tpl_id') . '</strong>') . '</span>';
683
                                } else {
684
                                    $msgs[] = '&nbsp;&nbsp;' . sprintf(_AM_SYSTEM_MODULES_BLOCK_DELETE_DATA, '<strong>' . $templates[$j]->getVar('tpl_file') . '</strong>') . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, '<strong>' . $templates[$j]->getVar('tpl_id') . '</strong>');
685
                                }
686
                            }
687
                        }
688
                        unset($templates);
689
                    }