@@ 275-278 (lines=4) @@ | ||
272 | $sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $GLOBALS['xoopsDB']->prefix('group_permission'), $bid[$i]); |
|
273 | $GLOBALS['xoopsDB']->query($sql); |
|
274 | if (!empty($groups[$i])) { |
|
275 | foreach ($groups[$i] as $grp) { |
|
276 | $sql = sprintf("INSERT INTO `%s` (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')", $GLOBALS['xoopsDB']->prefix('group_permission'), $grp, $bid[$i]); |
|
277 | $GLOBALS['xoopsDB']->query($sql); |
|
278 | } |
|
279 | } |
|
280 | } |
|
281 | $helper->redirect('admin/blocksadmin.php', Constants::REDIRECT_DELAY_MEDIUM, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
@@ 395-398 (lines=4) @@ | ||
392 | $sql = sprintf('DELETE FROM `%s` WHERE gperm_itemid = %u', $GLOBALS['xoopsDB']->prefix('group_permission'), $bid); |
|
393 | $GLOBALS['xoopsDB']->query($sql); |
|
394 | if (!empty($groups)) { |
|
395 | foreach ($groups as $grp) { |
|
396 | $sql = sprintf("INSERT INTO `%s` (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')", $GLOBALS['xoopsDB']->prefix('group_permission'), $grp, $bid); |
|
397 | $GLOBALS['xoopsDB']->query($sql); |
|
398 | } |
|
399 | } |
|
400 | $helper->redirect('admin/blocksadmin.php', Constants::REDIRECT_DELAY_MEDIUM, constant('CO_' . $moduleDirNameUpper . '_' . 'UPDATE_SUCCESS')); |
|
401 | break; |