Code Duplication    Length = 11-11 lines in 2 locations

admin/blocksadmin.php 2 locations

@@ 474-484 (lines=11) @@
471
                    0
472
                );
473
                $xoopsDB->query($sql);
474
            } else {
475
                foreach ($bmodule as $bmid) {
476
                    $sql = sprintf(
477
                        "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
478
                        $xoopsDB->prefix('block_module_link'),
479
                        $bid,
480
                        intval($bmid)
481
                    );
482
                    $xoopsDB->query($sql);
483
                }
484
            }
485
        }
486
        $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid);
487
        $xoopsDB->query($sql);
@@ 542-552 (lines=11) @@
539
                        0
540
                    );
541
                    $xoopsDB->query($sql);
542
                } else {
543
                    foreach ($bmodule[$i] as $bmid) {
544
                        $sql = sprintf(
545
                            "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
546
                            $xoopsDB->prefix('block_module_link'),
547
                            $bid[$i],
548
                            intval($bmid)
549
                        );
550
                        $xoopsDB->query($sql);
551
                    }
552
                }
553
            }
554
            $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid[$i]);
555
            $xoopsDB->query($sql);