Code Duplication    Length = 3-3 lines in 6 locations

include/blocksadmin.inc.php 6 locations

@@ 58-60 (lines=3) @@
55
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
56
    //  exit('Invalid Referer');
57
    //}
58
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
59
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
60
    }
61
62
    if (empty($bid)) {
63
        die('Invalid bid.');
@@ 197-199 (lines=3) @@
194
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
195
    //  exit('Invalid Referer');
196
    //}
197
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
198
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
199
    }
200
    if (!empty($_POST['side'])) {
201
        $side = $_POST['side'];
202
    }
@@ 237-239 (lines=3) @@
234
}
235
236
if ($op === 'order2') {
237
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
238
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
239
    }
240
241
    if (isset($_POST['addblock']) && is_array($_POST['addblock'])) {
242
@@ 305-307 (lines=3) @@
302
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
303
    //  exit('Invalid Referer');
304
    //}
305
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
306
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
307
    }
308
    /*  if ( !empty($_POST['bside']) ) { $bside = (int)($_POST['bside']); } else { $bside = 0; }
309
      if ( !empty($_POST['bweight']) ) { $bweight = (int)($_POST['bweight']); } else { $bweight = 0; }
310
      if ( !empty($_POST['bvisible']) ) { $bvisible = (int)($_POST['bvisible']); } else { $bvisible = 0; }
@@ 332-334 (lines=3) @@
329
    //if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
330
    //  exit('Invalid Referer');
331
    //}
332
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
333
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
334
    }
335
    // delete_block_ok($bid); GIJ imported from blocksadmin.php
336
    $myblock = new XoopsBlock($bid);
337
    if ($myblock->getVar('block_type') !== 'D' && $myblock->getVar('block_type') !== 'C') {
@@ 455-457 (lines=3) @@
452
453
if ($op === 'clone_ok') {
454
    // Ticket Check
455
    if (!$xoopsGTicket->check(true, 'myblocksadmin')) {
456
        redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
457
    }
458
459
    $block = new XoopsBlock($bid);
460