]> git.mxchange.org Git - mailer.git/commitdiff
Naming convention applied
authorRoland Häder <roland@mxchange.org>
Fri, 5 Nov 2010 14:10:15 +0000 (14:10 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 5 Nov 2010 14:10:15 +0000 (14:10 +0000)
inc/modules/admin/what-list_country.php
templates/de/html/admin/admin_list_country_del_row.tpl
templates/de/html/admin/admin_list_country_edit_row.tpl
templates/de/html/admin/admin_list_country_row.tpl

index f67b2dd615fc4e89b58f81e611ba62a0d9984b8c..ceaee5366ecd5d456b89085d9d93c9c22027b3db 100644 (file)
@@ -100,7 +100,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
 
                // Edit all selected country codes
                $OUT = '';
-               foreach (postRequestParameter('id') as $id => $status) {
+               foreach (postRequestParameter('id') as $id => $isActive) {
                        // Load data from DB
                        $result = SQL_QUERY_ESC("SELECT `id`, `code`, `descr` FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
@@ -110,10 +110,10 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
 
                                if ($post == 'modify') {
                                        // Generate default selection in edit-mode
-                                       $content['status'] = generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $status);
+                                       $content['is_active'] = generateOptionList('/ARRAY/', array('Y', 'N'), array('{--YES--}', '{--NO--}'), $isActive);
                                } else {
                                        // Only display status when in delete-mode
-                                       $content['status'] = translateYesNo($status);
+                                       $content['is_active'] = translateYesNo($isActive);
                                }
 
                                // Insert row template and switch color
@@ -144,7 +144,7 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
                // Modify
                foreach (postRequestParameter('id') as $id => $sel) {
                        addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='" . postRequestParameter('code', $id) . "', `descr`='" . postRequestParameter('descr', $id) . "', `is_active`='" . postRequestParameter('is_active', $id) . "' WHERE `id`=" . bigintval($id) . " LIMIT 1");
-               }
+               } // END - foreach
 
                // Create message
                $message = '{--ADMIN_COUNTRIES_MODIFIED--}';
@@ -166,8 +166,10 @@ if ((isFormSent('add')) && (isPostRequestParameterSet('code')) && (isPostRequest
        } // END - if
 
        // Load currenty setup country codes to list
-       $result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY code',
+       $result = SQL_QUERY('SELECT `id`, `code`, `descr`, `is_active` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `code` ASC',
        __FILE__, __LINE__);
+
+       // Do we have entries?
        if (!SQL_HASZERONUMS($result)) {
                // List all countries
                $OUT = '';
index 6a353cb2f69aec093fbd9a6f8c9e179840ab103c..99f3f6154763284df3e0aec7dc88f8b17bf4e120 100644 (file)
@@ -9,6 +9,6 @@
                $content[descr]
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom">
-               $content[status]
+               $content[is_active]
        </td>
 </tr>
index 0e366820199c3233118575ff37d6a248070ed1d4..607fb30d966fe0bc677feb92bdfebfa076fd691e 100644 (file)
@@ -10,7 +10,7 @@
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom">
                <select name="is_active[$content[id]]" class="form_select" size="1">
-                       $content[status]
+                       $content[is_active]
                </select>
        </td>
 </tr>
index b3063b22f0f7fe1fdf6434b2f764c27af04a530e..666dcf60f186db647f8713ea65d8397d855fdf6e 100644 (file)
@@ -9,6 +9,6 @@
                $content[descr]
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom">
-               {%pipe,translateYesNo=$content[active]%}
+               {%pipe,translateYesNo=$content[is_active]%}
        </td>
 </tr>