* ask user for timezone on install

* remember status of the installation
* moved clients list to the new file
* verify if client and timezone is correct on install
This commit is contained in:
slawkens1
2017-12-25 12:40:41 +01:00
parent 4d690992ac
commit 6528a4a60c
10 changed files with 158 additions and 94 deletions

78
system/clients.conf.php Normal file
View File

@@ -0,0 +1,78 @@
<?php
/**
* List of clients
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$config['clients'] = array(
710,
740,
750,
760,
770,
772,
780,
792,
800,
810,
821,
822,
831,
840,
841,
842,
850,
852,
853,
854,
855,
857,
860,
870,
900,
910,
920,
930,
940,
942,
944,
946,
950,
952,
953,
954,
960,
970,
980,
1000,
1010,
1021,
1031,
1034,
1041,
1050,
1053,
1054,
1058,
1075,
1077,
1079,
1080,
1090,
1093,
1094,
1095,
1096,
1097,
1098,
1100,
);
?>

View File

@@ -14,8 +14,7 @@ if(file_exists(BASE . 'config.local.php')) // user customizations
require(BASE . 'config.local.php');
if(!isset($config['installed']) || !$config['installed']) {
header('Location: ' . BASE_URL);
die('AAC has not been installed yet or there was error during installation. Please install again.');
die('MyAAC has not been installed yet or there was error during installation. Please install again.');
}
date_default_timezone_set($config['date_timezone']);

View File

@@ -48,8 +48,12 @@ $locale['step_config_mail_admin_error'] = 'Admin E-Mail is not correct.';
$locale['step_config_mail_address'] = 'Server E-Mail';
$locale['step_config_mail_address_desc'] = 'Address which will be used for outgoing emails (from:), for example no-reply@your-server.org';
$locale['step_config_mail_address_error'] = 'Server E-Mail is not correct.';
$locale['step_config_timezone'] = 'Timezone';
$locale['step_config_timezone_desc'] = 'Used for date functions';
$locale['step_config_timezone_error'] = 'Timezone is not correct.';
$locale['step_config_client'] = 'Client version';
$locale['step_config_client_desc'] = 'Used for download page and some templates';
$locale['step_config_client_error'] = 'Client is not correct.';
$locale['step_config_usage'] = 'Usage Statistics';
$locale['step_config_usage_desc'] = 'Allow MyAAC to report anonymous usage statistics? The data is sent only once per 30 days and is fully confidential.';

View File

@@ -15,6 +15,22 @@
</td>
</tr>
{% endfor %}
<tr>
<td>
<label for="vars_date_timezone">
<span>{{ locale.step_config_timezone }}</span>
</label>
<br/>
<select name="vars[date_timezone]" id="vars_date_timezone">
{% for timezone in timezones %}
<option value="{{ timezone }}"{% if (session['var_date_timezone'] is not null and session['var_date_timezone'] == timezone) or (session['var_date_timezone'] is null and timezone == 'Europe/Berlin') %} selected{% endif %}>{{ timezone }}</option>
{% endfor %}
</select>
</td>
<td>
<em>{{ locale.step_config_timezone_desc }}</em>
</td>
</tr>
<tr>
<td>
<label for="vars_client">