Code Duplication    Length = 10-12 lines in 2 locations

admin/maintenance.php 2 locations

@@ 209-220 (lines=12) @@
206
                }
207
            }
208
209
            if (count($errors) > 0) {
210
                foreach ($errors as $error) {
211
                    $protocolObj = $helper->getHandler('Protocol')->create();
212
                    $protocolObj->setVar('protocol_letter_id', 0);
213
                    $protocolObj->setVar('protocol_subscriber_id', 0);
214
                    $protocolObj->setVar('protocol_status', '[' . _MI_XNEWSLETTER_ADMENU11 . ' reguser] ' . $error);
215
                    $protocolObj->setVar('protocol_success', false);
216
                    $protocolObj->setVar('protocol_submitter', $GLOBALS['xoopsUser']->uid());
217
                    $protocolObj->setVar('protocol_created', time());
218
                    $helper->getHandler('Protocol')->insert($protocolObj);
219
                }
220
            }
221
222
            if ($deleted > 0) {
223
                $protocolObj = $helper->getHandler('Protocol')->create();
@@ 222-231 (lines=10) @@
219
                }
220
            }
221
222
            if ($deleted > 0) {
223
                $protocolObj = $helper->getHandler('Protocol')->create();
224
                $protocolObj->setVar('protocol_letter_id', 0);
225
                $protocolObj->setVar('protocol_subscriber_id', 0);
226
                $protocolObj->setVar('protocol_status', '[' . _MI_XNEWSLETTER_ADMENU11 . ' reguser] ' . sprintf(_AM_XNEWSLETTER_MAINTENANCE_DELETEUSEROK, $deleted));
227
                $protocolObj->setVar('protocol_success', true);
228
                $protocolObj->setVar('protocol_submitter', $GLOBALS['xoopsUser']->uid());
229
                $protocolObj->setVar('protocol_created', time());
230
                $helper->getHandler('Protocol')->insert($protocolObj);
231
            }
232
            redirect_header($currentFile, 3, sprintf(_AM_XNEWSLETTER_MAINTENANCE_DELETEUSEROK, $deleted));
233
        } else {
234
            if ($subscrCount > 0) {