| @@ 278-292 (lines=15) @@ | ||
| 275 | $form->display(); |
|
| 276 | break; |
|
| 277 | ||
| 278 | case 'delete': |
|
| 279 | $categoryObject = $categoryHandler->get(Request::getString('id', '')); |
|
| 280 | if (1 == Request::getInt('ok', 0)) { |
|
| 281 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 282 | redirect_header('category.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 283 | } |
|
| 284 | if ($categoryHandler->delete($categoryObject)) { |
|
| 285 | redirect_header('category.php', 3, AM_RANDOMQUOTE_FORMDELOK); |
|
| 286 | } else { |
|
| 287 | echo $categoryObject->getHtmlErrors(); |
|
| 288 | } |
|
| 289 | } else { |
|
| 290 | xoops_confirm(['ok' => 1, 'id' => Request::getString('id', ''), 'op' => 'delete'], Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_RANDOMQUOTE_FORMSUREDEL, $categoryObject->getVar('title'))); |
|
| 291 | } |
|
| 292 | break; |
|
| 293 | ||
| 294 | case 'clone': |
|
| 295 | ||
| @@ 173-187 (lines=15) @@ | ||
| 170 | $form->display(); |
|
| 171 | break; |
|
| 172 | ||
| 173 | case 'delete': |
|
| 174 | $quotesObject = $quotesHandler->get(Request::getString('id', '')); |
|
| 175 | if (1 == Request::getInt('ok', 0)) { |
|
| 176 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 177 | redirect_header('quotes.php', 3, implode(', ', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 178 | } |
|
| 179 | if ($quotesHandler->delete($quotesObject)) { |
|
| 180 | redirect_header('quotes.php', 3, AM_RANDOMQUOTE_FORMDELOK); |
|
| 181 | } else { |
|
| 182 | echo $quotesObject->getHtmlErrors(); |
|
| 183 | } |
|
| 184 | } else { |
|
| 185 | xoops_confirm(['ok' => 1, 'id' => Request::getString('id', ''), 'op' => 'delete'], Request::getCmd('REQUEST_URI', '', 'SERVER'), sprintf(AM_RANDOMQUOTE_FORMSUREDEL, $quotesObject->getVar('quote'))); |
|
| 186 | } |
|
| 187 | break; |
|
| 188 | ||
| 189 | case 'clone': |
|
| 190 | ||