From: Roland Häder Date: Thu, 29 Oct 2009 04:14:01 +0000 (+0000) Subject: SQL query and inconsistencies fixed, TODOs.txt updated X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=9554a8d81c0b81430503ef8156748ffbb61daa00 SQL query and inconsistencies fixed, TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 96ecd6353a..cf295ec2c5 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -87,7 +87,6 @@ ./inc/modules/admin/what-config_mods.php:137: // @TODO Rewritings: mod->module in template ./inc/modules/admin/what-config_rallye_prices.php:202: // @TODO Rewritings: level->price_level, infos->info in template ./inc/modules/admin/what-config_rallye_prices.php:219: // @TODO Rewrite these two constants -./inc/modules/admin/what-config_rallye_prices.php:254: // @TODO Rewritings: admin_id->admin_id, alogin->login in template ./inc/modules/admin/what-config_register.php:67: // @TODO Move this HTML code into a template ./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country * ./inc/modules/admin/what-email_archiv.php:91: // @TODO Rewrite to SQL_FETCHARRAY() diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 1e2fd625b6..ddb605da49 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -188,8 +188,8 @@ VALUES ('%s','%s','%s','%s')", } } else { // a rallye was selected, so check if there are already prices assigned... - $result = SQL_QUERY_ESC("SELECT id, price_level, points, info FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id`, `price_level`, points`, `info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC", + array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load all prices for the selected rallye @@ -236,13 +236,13 @@ VALUES ('%s','%s','%s','%s')", $result = SQL_QUERY("SELECT d.id, d.admin_id, d.start_time, d.end_time, d.title, a.login, d.is_active FROM - `{?_MYSQL_PREFIX?}_rallye_data` AS d, + `{?_MYSQL_PREFIX?}_rallye_data` AS d LEFT JOIN `{?_MYSQL_PREFIX?}_admins` AS a ON d.admin_id=a.id ORDER BY - `d.start_time` DESC", __FILE__, __LINE__); + d.start_time DESC", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List found rallyes $OUT = ''; $SW = 2; @@ -251,15 +251,14 @@ ORDER BY if ($content['is_active'] == 'Y') $select = "
".$content['id']."
"; // Prepare data for the row template - // @TODO Rewritings: admin_id->admin_id, alogin->login in template $content = array( 'sw' => $SW, 'id' => $content['id'], 'select' => $select, 'title' => $content['title'], - 'admin_id' => $content['admin_id'], + 'admin_id' => $content['admin_id'], 'email_link' => generateEmailLink($content['admin_id']), - 'alogin' => $content['login'], + 'login' => $content['login'], 'start' => generateDateTime($content['start_time'], 3), 'end' => generateDateTime($content['end_time'], 3), ); diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 1b945c75a9..93272e1003 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -283,7 +283,7 @@ ORDER BY start_time DESC", $OUT = ''; $SW = 2; while ($row = SQL_FETCHARRAY($result)) { // Load admin login - $row['alogin'] = getAdminLogin($row['admin_id']); + $row['login'] = getAdminLogin($row['admin_id']); // Count joined userids $joined = countSumTotalData($row['id'], "rallye_users", 'id', "rallye_id", true); @@ -295,7 +295,7 @@ ORDER BY start_time DESC", } // END - if // Alter some variables - if (empty($row['alogin'])) $row['alogin'] = '???'; + if (empty($row['login'])) $row['login'] = '???'; if (empty($row['template'])) $row['template'] = '---'; if (empty($row['descr'])) $row['descr'] = '---'; @@ -305,7 +305,7 @@ ORDER BY start_time DESC", 'select' => "", 'admin_id' => $row['admin_id'], 'email_link' => generateEmailLink($row['admin_id']), - 'alogin' => $row['alogin'], + 'login' => $row['login'], 'id' => $row['id'], 'sw' => $SW, 'title' => $row['title'], diff --git a/templates/de/html/admin/admin_list_rallye_prices_row.tpl b/templates/de/html/admin/admin_list_rallye_prices_row.tpl index e26da996fd..581c28edd7 100644 --- a/templates/de/html/admin/admin_list_rallye_prices_row.tpl +++ b/templates/de/html/admin/admin_list_rallye_prices_row.tpl @@ -1,9 +1,7 @@ $content[select] - $content[title] - $content[alogin] + $content[title] + $content[login] $content[start] $content[end] diff --git a/templates/de/html/admin/admin_list_rallyes_row.tpl b/templates/de/html/admin/admin_list_rallyes_row.tpl index 0716996040..29b49bebab 100644 --- a/templates/de/html/admin/admin_list_rallyes_row.tpl +++ b/templates/de/html/admin/admin_list_rallyes_row.tpl @@ -6,7 +6,7 @@ {--RALLYE_DESCR2--}:
$content[descr] {--RALLYE_ADMIN_ID--}:
- $content[alogin] + $content[login] {--RALLYE_TSTART--}:
$content[start_date] {--RALLYE_TEND--}: