]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-adminedit.php
A lot naming conventions applied, TODOs.txt updated
[mailer.git] / inc / modules / admin / what-adminedit.php
index 8e6b10bc6e62010fc5f06b9a34b0a81e11dadbef..f86cb0a68771c35e18288b7ce01082dbf6056c4e 100644 (file)
@@ -53,7 +53,7 @@ if (isGetRequestParameterSet('sub')) {
 } // 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;
@@ -100,7 +100,7 @@ if ((isFormSent('edit')) && (countPostSelection() > 0) && (!isDemoModeActive()))
 
        // 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();
@@ -182,9 +182,9 @@ WHERE ".$AND." AND `id`=%s LIMIT 1",
                        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__);
@@ -212,8 +212,8 @@ WHERE ".$AND." AND `id`=%s LIMIT 1",
                                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)) {