From e523b69ecd6c7f37ae1cb36872537073b40c0e27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 5 Nov 2010 14:10:15 +0000 Subject: [PATCH] Naming convention applied --- inc/modules/admin/what-list_country.php | 12 +++++++----- .../de/html/admin/admin_list_country_del_row.tpl | 2 +- .../de/html/admin/admin_list_country_edit_row.tpl | 2 +- templates/de/html/admin/admin_list_country_row.tpl | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index f67b2dd615..ceaee5366e 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -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 = ''; diff --git a/templates/de/html/admin/admin_list_country_del_row.tpl b/templates/de/html/admin/admin_list_country_del_row.tpl index 6a353cb2f6..99f3f61547 100644 --- a/templates/de/html/admin/admin_list_country_del_row.tpl +++ b/templates/de/html/admin/admin_list_country_del_row.tpl @@ -9,6 +9,6 @@ $content[descr] - $content[status] + $content[is_active] diff --git a/templates/de/html/admin/admin_list_country_edit_row.tpl b/templates/de/html/admin/admin_list_country_edit_row.tpl index 0e36682019..607fb30d96 100644 --- a/templates/de/html/admin/admin_list_country_edit_row.tpl +++ b/templates/de/html/admin/admin_list_country_edit_row.tpl @@ -10,7 +10,7 @@ diff --git a/templates/de/html/admin/admin_list_country_row.tpl b/templates/de/html/admin/admin_list_country_row.tpl index b3063b22f0..666dcf60f1 100644 --- a/templates/de/html/admin/admin_list_country_row.tpl +++ b/templates/de/html/admin/admin_list_country_row.tpl @@ -9,6 +9,6 @@ $content[descr] - {%pipe,translateYesNo=$content[active]%} + {%pipe,translateYesNo=$content[is_active]%} -- 2.39.5