} // END - if
// List all menu points and make them editable
-if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) {
+if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Edit menu entries
// @TODO Kill all constants in this file
$content['sub'] = $SUB;
// Load template
loadTemplate('admin_amenu_edit_form', false, $content);
-} elseif ((isFormSent('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) {
+} elseif ((isFormSent('del')) && (ifPostContainsSelections()) && (!isDemoModeActive())) {
// Prepare misc content
$content['sub'] = $SUB;
$content['chk'] = countPostSelection();
break;
}
} else {
- if ((isGetRequestParameterSet(('act'))) && (isGetRequestParameterSet(('tid'))) && (isGetRequestParameterSet(('fid')))) {
+ if ((isGetRequestParameterSet('act')) && (isGetRequestParameterSet('tid')) && (isGetRequestParameterSet('fid'))) {
// Get ids
- if (isGetRequestParameterSet(('w'))) {
+ if (isGetRequestParameterSet('w')) {
// Sub menus selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array(getRequestParameter('act'), bigintval(getRequestParameter('tid'))), __FILE__, __LINE__);
array(bigintval(getRequestParameter('tid')), bigintval($fid)), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1",
array(bigintval(getRequestParameter('fid')), bigintval($tid)), __FILE__, __LINE__);
- }
- }
+ } // END - if
+ } // END - if
// By default list menus
if (!empty($SUB)) {