mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-10 14:54:30 +02:00
* fixed country detection (was a little typo)
This commit is contained in:
parent
bbd9cd2101
commit
6d66dc9043
@ -253,7 +253,7 @@ If you haven\'t registered on ' . $config['lua']['serverName'] . ' please ignore
|
||||
|
||||
$country_recognized = null;
|
||||
if($config['account_country_recognize']) {
|
||||
$info = json_decode(@file_get_contents('http://ispinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
||||
$info = json_decode(@file_get_contents('http://ipinfo.io/' . $_SERVER['REMOTE_ADDR'] . '/geo'), true);
|
||||
if(isset($info['country'])) {
|
||||
$country_recognized = strtolower($info['country']);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ Also you have to agree to the terms presented below. If you have done so, your a
|
||||
<td>
|
||||
<select name="country" id="account_country">
|
||||
{% for code, country_ in countries %}
|
||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is not defined and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||
<option value="{{ code }}"{% if(country is defined and country == code) or (country is null and country_recognized == code) %}selected{% endif %}>{{ country_ }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<img src="" id="account_country_img"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user