]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_country.php
The usual changes: forms fixed
[mailer.git] / inc / modules / admin / what-list_country.php
index 518ce7690bf1b9883d8a21c23b2de1e54c05b598..8373690f78b0b0e141c29a584947460bb6db9371 100644 (file)
@@ -85,7 +85,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                if (isFormSent('edit')) {
                        // Edit template
                        $row    = 'admin_edit_country_row';
-                       $do     = 'modify';
+                       $do     = 'do_edit';
                        $class  = 'form_submit';
                        $submit = '{--ADMIN_COUNTRY_EDIT_NOW--}';
                        $title  = '{--ADMIN_COUNTRY_EDIT_TITLE--}';
@@ -93,7 +93,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
                } else {
                        // Delete template
                        $row    = 'admin_delete_country_row';
-                       $do     = 'remove';
+                       $do     = 'do_delete';
                        $class  = 'form_delete';
                        $submit = '{--ADMIN_COUNTRY_DELETE_NOW--}';
                        $title  = '{--ADMIN_COUNTRY_DELETE_TITLE--}';
@@ -138,7 +138,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl
        // Shall we modify / remove entries now?
        $message = '';
        initSqls();
-       if ((isPostRequestElementSet('modify')) && (isPostRequestElementSet('id'))) {
+       if ((isPostRequestElementSet('do_edit')) && (isPostRequestElementSet('id'))) {
                // Modify
                foreach (postRequestElement('id') as $id => $sel) {
                        addSql("UPDATE
@@ -163,6 +163,7 @@ LIMIT 1");
                $message = '{--ADMIN_COUNTRIES_REMOVED--}';
        }
 
+       // Are a message and some SQLs set?
        if ((!empty($message)) && (countSqls() > 0)) {
                // Run SQL commands
                runFilterChain('run_sqls');
@@ -173,7 +174,7 @@ LIMIT 1");
 
        // Load currenty setup country codes to list
        $result = SQL_QUERY('SELECT `id`, `code`, `descr`, `is_active` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `code` ASC',
-       __FILE__, __LINE__);
+               __FILE__, __LINE__);
 
        // Are there entries?
        if (!SQL_HASZERONUMS($result)) {