|
@@ 498-503 (lines=6) @@
|
| 495 |
|
if (in_array(0, $bmodule)) { |
| 496 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, 0); |
| 497 |
|
$xoopsDB->query($sql); |
| 498 |
|
} else { |
| 499 |
|
foreach ($bmodule as $bmid) { |
| 500 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid, (int)$bmid); |
| 501 |
|
$xoopsDB->query($sql); |
| 502 |
|
} |
| 503 |
|
} |
| 504 |
|
} |
| 505 |
|
$sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $xoopsDB->prefix('group_permission'), $bid); |
| 506 |
|
$xoopsDB->query($sql); |
|
@@ 540-545 (lines=6) @@
|
| 537 |
|
if (in_array(0, $bmodule[$i])) { |
| 538 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], 0); |
| 539 |
|
$xoopsDB->query($sql); |
| 540 |
|
} else { |
| 541 |
|
foreach ($bmodule[$i] as $bmid) { |
| 542 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $xoopsDB->prefix('block_module_link'), $bid[$i], (int)$bmid); |
| 543 |
|
$xoopsDB->query($sql); |
| 544 |
|
} |
| 545 |
|
} |
| 546 |
|
} |
| 547 |
|
$sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $xoopsDB->prefix('group_permission'), $bid[$i]); |
| 548 |
|
$xoopsDB->query($sql); |