Code Duplication    Length = 3-3 lines in 7 locations

admin/myblocksadmin.php 1 location

@@ 104-106 (lines=3) @@
101
}
102
103
if (!empty($_POST['submit'])) {
104
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
105
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
106
    }
107
108
    include 'mygroupperm.php';
109
    redirect_header(XOOPS_URL . '/modules/' . $xoopsModule->dirname() . "/admin/myblocksadmin.php{$query4redirect}", 1, _MD_MYLINKS_DBUPDATED);

include/blocksadmin.inc.php 6 locations

@@ 62-64 (lines=3) @@
59
        exit('Invalid Referer');
60
    }
61
*/
62
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
63
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
64
    }
65
66
    if (empty($bid)) {
67
        die('Invalid bid.');
@@ 168-170 (lines=3) @@
165
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
166
    //  exit('Invalid Referer');
167
    //}
168
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
169
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
170
    }
171
    if (!empty($_POST['side'])) {
172
        $side = $_POST['side'];
173
    }
@@ 213-215 (lines=3) @@
210
}
211
212
if ($op == 'order2') {
213
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
214
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
215
    }
216
217
    if (isset($_POST['addblock']) && is_array($_POST['addblock'])) {
218
        // addblock
@@ 278-280 (lines=3) @@
275
      exit('Invalid Referer');
276
    }
277
*/
278
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
279
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
280
    }
281
    /*
282
        if ( !empty($_POST['bside']) ) { $bside = intval($_POST['bside']); } else { $bside = 0; }
283
        if ( !empty($_POST['bweight']) ) { $bweight = intval($_POST['bweight']); } else { $bweight = 0; }
@@ 309-311 (lines=3) @@
306
      exit('Invalid Referer');
307
    }
308
*/
309
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
310
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
311
    }
312
    // delete_block_ok($bid); GIJ imported from blocksadmin.php
313
    $myblock = new XoopsBlock($bid);
314
    if ('D' != $myblock->getVar('block_type') && 'C' != $myblock->getVar('block_type')) {
@@ 438-440 (lines=3) @@
435
436
if ('clone_ok' == $op) {
437
    // Ticket Check
438
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
439
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
440
    }
441
442
    $block = new XoopsBlock($bid);
443