Code Duplication    Length = 5-5 lines in 3 locations

admin/cat.php 3 locations

@@ 184-188 (lines=5) @@
181
182
                // Добавляем права
183
                // Права на просмотр
184
                if (Request::hasVar('groups_instr_view', 'POST')) {
185
                    foreach (Request::getArray('groups_instr_view', '', 'POST') as $onegroup_id) {
186
                        $gpermHandler->addRight('instruction_view', $new_cid, $onegroup_id, $GLOBALS['xoopsModule']->getVar('mid'));
187
                    }
188
                }
189
                // Права на добавление
190
                if (Request::hasVar('groups_instr_submit', 'POST')) {
191
                    foreach (Request::getArray('groups_instr_submit', '', 'POST') as $onegroup_id) {
@@ 190-194 (lines=5) @@
187
                    }
188
                }
189
                // Права на добавление
190
                if (Request::hasVar('groups_instr_submit', 'POST')) {
191
                    foreach (Request::getArray('groups_instr_submit', '', 'POST') as $onegroup_id) {
192
                        $gpermHandler->addRight('instruction_submit', $new_cid, $onegroup_id, $GLOBALS['xoopsModule']->getVar('mid'));
193
                    }
194
                }
195
                // Права на редактирование
196
                if (Request::hasVar('groups_instr_edit', 'POST')) {
197
                    foreach (Request::getArray('groups_instr_edit', '', 'POST') as $onegroup_id) {
@@ 196-200 (lines=5) @@
193
                    }
194
                }
195
                // Права на редактирование
196
                if (Request::hasVar('groups_instr_edit', 'POST')) {
197
                    foreach (Request::getArray('groups_instr_edit', '', 'POST') as $onegroup_id) {
198
                        $gpermHandler->addRight('instruction_edit', $new_cid, $onegroup_id, $GLOBALS['xoopsModule']->getVar('mid'));
199
                    }
200
                }
201
202
                //
203
                redirect_header('cat.php', 3, _AM_INSTRUCTION_NEWCATADDED);