mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-20 04:23:26 +02:00
[WIP] More work on settings
Move more config to settings (mainly mail_* + some other) Remove mail_admin, wasnt used anywhere Add return type to some functions Add Twig settings(key) function Possibility to save setting to db
This commit is contained in:
11
index.php
11
index.php
@@ -104,7 +104,7 @@ $hooks->trigger(HOOK_STARTUP);
|
||||
|
||||
// anonymous usage statistics
|
||||
// sent only when user agrees
|
||||
if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_statistics']) {
|
||||
if(setting('core.anonymous_usage_statistics')) {
|
||||
$report_time = 30 * 24 * 60 * 60; // report one time per 30 days
|
||||
$should_report = true;
|
||||
|
||||
@@ -137,17 +137,16 @@ if(isset($config['anonymous_usage_statistics']) && $config['anonymous_usage_stat
|
||||
}
|
||||
}
|
||||
|
||||
if($config['views_counter'])
|
||||
if(setting('core.views_counter'))
|
||||
require_once SYSTEM . 'counter.php';
|
||||
|
||||
if($config['visitors_counter'])
|
||||
{
|
||||
if(setting('core.visitors_counter')) {
|
||||
require_once SYSTEM . 'libs/visitors.php';
|
||||
$visitors = new Visitors($config['visitors_counter_ttl']);
|
||||
$visitors = new Visitors(setting('core.visitors_counter_ttl'));
|
||||
}
|
||||
|
||||
// backward support for gesior
|
||||
if($config['backward_support']) {
|
||||
if(setting('core.backward_support')) {
|
||||
define('INITIALIZED', true);
|
||||
$SQL = $db;
|
||||
$layout_header = template_header();
|
||||
|
Reference in New Issue
Block a user