| @@ 85-87 (lines=3) @@ | ||
| 82 | $id = Request::getInt('id', null); |
|
| 83 | $linksObj = $mymenus->getHandler('links')->get($id); |
|
| 84 | if (Request::getBool('ok', false, 'POST') === true) { |
|
| 85 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 86 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 87 | } |
|
| 88 | //get sub item |
|
| 89 | $linksCriteria = new CriteriaCompo(); |
|
| 90 | $linksCriteria->add(new Criteria('id', $id)); |
|
| @@ 221-223 (lines=3) @@ | ||
| 218 | { |
|
| 219 | $mymenus = MymenusMymenus::getInstance(); |
|
| 220 | // |
|
| 221 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 222 | redirect_header($GLOBALS['mymenusAdminPage'], 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 223 | } |
|
| 224 | if (!$mid) { |
|
| 225 | redirect_header($GLOBALS['mymenusAdminPage'] . '?op=list', 2, _AM_MYMENUS_MSG_MENU_INVALID_ERROR); |
|
| 226 | } |
|
| @@ 267-269 (lines=3) @@ | ||
| 264 | { |
|
| 265 | $mymenus = MymenusMymenus::getInstance(); |
|
| 266 | // |
|
| 267 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 268 | redirect_header($GLOBALS['mymenusAdminPage'], 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 269 | } |
|
| 270 | if (!$mid) { |
|
| 271 | redirect_header($GLOBALS['mymenusAdminPage'] . '?op=list', 2, _AM_MYMENUS_MSG_MENU_INVALID_ERROR); |
|
| 272 | } |
|
| @@ 149-151 (lines=3) @@ | ||
| 146 | break; |
|
| 147 | ||
| 148 | case 'save': |
|
| 149 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 150 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 151 | } |
|
| 152 | $id = Request::getInt('id', 0, 'POST'); |
|
| 153 | $isNewMenus = ($id == 0) ? true : false; |
|
| 154 | // |
|
| @@ 185-187 (lines=3) @@ | ||
| 182 | $id = Request::getInt('id', null); |
|
| 183 | $menusObj = $mymenus->getHandler('menus')->get($id); |
|
| 184 | if (Request::getBool('ok', false, 'POST') === true) { |
|
| 185 | if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 186 | redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
|
| 187 | } |
|
| 188 | // delete menus |
|
| 189 | if (!$mymenus->getHandler('menus')->delete($menusObj)) { |
|
| 190 | // ERROR |
|