Code Duplication    Length = 3-3 lines in 6 locations

admin/cat.php 2 locations

@@ 103-105 (lines=3) @@
100
    case 'savecat':
101
102
        // Проверка
103
        if (!$GLOBALS['xoopsSecurity']->check()) {
104
            redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
105
        }
106
        // Если мы редактируем
107
        if ($cid) {
108
            $objInstructioncat = $categoryHandler->get($cid);
@@ 261-263 (lines=3) @@
258
        if ($ok) {
259
260
            // Проверка
261
            if (!$GLOBALS['xoopsSecurity']->check()) {
262
                redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
263
            }
264
            // Пытаемся удалить категорию
265
            if ($categoryHandler->delete($objInscat)) {
266

admin/instr.php 3 locations

@@ 169-171 (lines=3) @@
166
    case 'saveinstr':
167
168
        // Проверка
169
        if (!$GLOBALS['xoopsSecurity']->check()) {
170
            redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
171
        }
172
        // Если мы редактируем
173
        if ($instrid) {
174
            $objInsinstr = $instructionHandler->get($instrid);
@@ 316-318 (lines=3) @@
313
        if ($ok) {
314
315
            // Проверка
316
            if (!$GLOBALS['xoopsSecurity']->check()) {
317
                redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
318
            }
319
            // Находим все страницы, пренадлежащие этой инструкции
320
            $criteria = new \CriteriaCompo();
321
            $criteria->add(new \Criteria('instrid', $instrid));
@@ 550-552 (lines=3) @@
547
        if ($ok) {
548
549
            // Проверка
550
            if (!$GLOBALS['xoopsSecurity']->check()) {
551
                redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
552
            }
553
            // ID инструкции
554
            $page_instrid = $objInspage->getVar('instrid');
555
            // Декримент комментов

submit.php 1 location

@@ 104-106 (lines=3) @@
101
    case 'savepage':
102
103
        // Проверка
104
        if (!$GLOBALS['xoopsSecurity']->check()) {
105
            redirect_header('index.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
106
        }
107
108
        $err         = false;
109
        $message_err = '';