Skip to content

Commit 8f92401

Browse files
committed
- Bugfix: show the correct country flag in client and reseller lists.
1 parent 046d621 commit 8f92401

File tree

6 files changed

+248
-240
lines changed

6 files changed

+248
-240
lines changed

interface/lib/classes/listform_actions.inc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ private function getQueryString() {
248248
$order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
249249
}
250250
}
251+
252+
if($this->SQLExtSelect != '') {
253+
if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
254+
$extselect .= $this->SQLExtSelect;
255+
}
256+
251257
return 'SELECT '.$app->listform->listDef['table'].'.*'.$extselect.' FROM '.$app->listform->listDef['table']."$join WHERE $sql_where $order_by_sql $limit_sql";
252258
}
253259

interface/web/client/client_list.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
2121
$app->listform_actions->SQLExtWhere = "limit_client = 0";
22+
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
2223
$app->listform_actions->onLoad();
2324

2425

interface/web/client/reseller_list.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
5151
$app->listform_actions->SQLExtWhere = "(limit_client > 0 or limit_client = -1)";
52+
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
5253
$app->listform_actions->onLoad();
5354

5455

interface/web/client/templates/clients_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
4646
<td class="tbl_col_contact_name"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="contact_name"}</a></td>
4747
<td class="tbl_col_username"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="username"}</a></td>
4848
<td class="tbl_col_city"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="city"}</a></td>
49-
<td class="tbl_col_country"><div class="country-{tmpl_var name="country"}"><span>{tmpl_var name="country"}</span></div></td>
49+
<td class="tbl_col_country"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');"><div class="country-{tmpl_var name="countryiso"}" style="float:left"></div>{tmpl_var name="country"}</a></td>
5050
<td class="tbl_col_buttons">
5151
<tmpl_if name="is_admin">
5252
<a class="button icons16 icoLoginAs" href="javascript: loadContent('admin/login_as.php?cid={tmpl_var name='id'}');"><span>{tmpl_var name='login_as_txt'}</span></a>

interface/web/client/templates/resellers_list.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
4343
<td class="tbl_col_company_name"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="company_name"}</a></td>
4444
<td class="tbl_col_contact_name"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="contact_name"}</a></td>
4545
<td class="tbl_col_city"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="city"}</a></td>
46-
<td class="tbl_col_country"><div class="country-{tmpl_var name="country"}"><span>{tmpl_var name="country"}</span></div></td>
46+
<td class="tbl_col_country"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');"><div class="country-{tmpl_var name="countryiso"}" style="float:left"></div>{tmpl_var name="country"}</a></td>
4747
<td class="tbl_col_buttons">
4848
<a class="button icons16 icoLoginAs" href="javascript: loadContent('admin/login_as.php?cid={tmpl_var name='id'}');"><span>{tmpl_var name='login_as_txt'}</span></a>
4949
<a class="button icons16 icoDelete" href="javascript: del_record('client/reseller_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>

0 commit comments

Comments
 (0)