| @@ 97-102 (lines=6) @@ | ||
| 94 | $query .= ' WHERE pid = (SELECT id FROM (SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('mymenus_links') . " WHERE pid = {$id}) AS sec);"; |
|
| 95 | $result = $GLOBALS['xoopsDB']->queryF($query); |
|
| 96 | //delete links level 0 and 1 |
|
| 97 | if (!$mymenus->getHandler('links')->deleteAll($linksCriteria)) { |
|
| 98 | xoops_cp_header(); |
|
| 99 | xoops_error(_AM_MYMENUS_MSG_ERROR, $linksObj->getVar('id')); |
|
| 100 | xoops_cp_footer(); |
|
| 101 | exit(); |
|
| 102 | } |
|
| 103 | redirect_header($currentFile, 3, _AM_MYMENUS_MSG_DELETE_LINK_SUCCESS); |
|
| 104 | } else { |
|
| 105 | xoops_cp_header(); |
|
| @@ 189-195 (lines=7) @@ | ||
| 186 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 187 | } |
|
| 188 | // delete menus |
|
| 189 | if (!$mymenus->getHandler('menus')->delete($menusObj)) { |
|
| 190 | // ERROR |
|
| 191 | xoops_cp_header(); |
|
| 192 | xoops_error(_AM_MYMENUS_MSG_ERROR, $menusObj->getVar('id')); |
|
| 193 | xoops_cp_footer(); |
|
| 194 | exit(); |
|
| 195 | } |
|
| 196 | // Delete links |
|
| 197 | $mymenus->getHandler('links')->deleteAll(new Criteria('mid', $id)); |
|
| 198 | redirect_header($currentFile, 3, _AM_MYMENUS_MSG_DELETE_MENU_SUCCESS); |
|