- if (!empty($_POST['menu']))
- {
- SQL_QUERY_ESC("INSERT INTO `{!MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
- array(
- $_POST['menu'],
- $_POST['name'],
- $_POST['title'],
- $_POST['visible'],
- $_POST['active'],
- bigintval($_POST['sort']),
-), __FILE__, __LINE__);
+ if (isPostRequestParameterSet('menu')) {
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `what`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
+ array(
+ postRequestParameter('menu'),
+ postRequestParameter('name'),
+ postRequestParameter('title'),
+ postRequestParameter('visible'),
+ postRequestParameter('active'),
+ bigintval(postRequestParameter('sort')),
+ ), __FILE__, __LINE__);
+ } else {
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`, `title`, `visible`, `locked`, `sort`) VALUES ('%s','%s','%s','%s','%s')",
+ array(
+ postRequestParameter('name'),
+ postRequestParameter('title'),
+ postRequestParameter('visible'),
+ postRequestParameter('active'),
+ bigintval(postRequestParameter('sort')),
+ ), __FILE__, __LINE__);