|
@@ 265-270 (lines=6) @@
|
| 262 |
|
if (in_array(0, $bmodule[$i])) { |
| 263 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $GLOBALS['xoopsDB']->prefix('block_module_link'), $bid[$i], 0); |
| 264 |
|
$GLOBALS['xoopsDB']->query($sql); |
| 265 |
|
} else { |
| 266 |
|
foreach ($bmodule[$i] as $bmid) { |
| 267 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $GLOBALS['xoopsDB']->prefix('block_module_link'), $bid[$i], (int)$bmid); |
| 268 |
|
$GLOBALS['xoopsDB']->query($sql); |
| 269 |
|
} |
| 270 |
|
} |
| 271 |
|
} |
| 272 |
|
$sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $GLOBALS['xoopsDB']->prefix('group_permission'), $bid[$i]); |
| 273 |
|
$GLOBALS['xoopsDB']->query($sql); |
|
@@ 385-390 (lines=6) @@
|
| 382 |
|
if (in_array(0, $bmodule)) { |
| 383 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $GLOBALS['xoopsDB']->prefix('block_module_link'), $bid, 0); |
| 384 |
|
$GLOBALS['xoopsDB']->query($sql); |
| 385 |
|
} else { |
| 386 |
|
foreach ($bmodule as $bmid) { |
| 387 |
|
$sql = sprintf('INSERT INTO `%s` (block_id, module_id) VALUES (%u, %d)', $GLOBALS['xoopsDB']->prefix('block_module_link'), $bid, (int)$bmid); |
| 388 |
|
$GLOBALS['xoopsDB']->query($sql); |
| 389 |
|
} |
| 390 |
|
} |
| 391 |
|
} |
| 392 |
|
$sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $GLOBALS['xoopsDB']->prefix('group_permission'), $bid); |
| 393 |
|
$GLOBALS['xoopsDB']->query($sql); |