Move handling webstats_js_code parameter in core code

This commit is contained in:
Benjamin Renard 2023-02-27 16:35:35 +01:00
parent c346252f55
commit 765844bee9
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
4 changed files with 7 additions and 5 deletions

View file

@ -302,6 +302,6 @@ email:
catch_all: false catch_all: false
# Web Stats JS code # Web Stats JS code
webstats_js_code: '' #webstats_js_code: ''
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab # vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab

View file

@ -30,9 +30,6 @@ function define_common_template_variables($event) {
$status_list:array() $status_list:array()
); );
Tpl :: assign('admin', isset($admin) && $admin); Tpl :: assign('admin', isset($admin) && $admin);
Tpl :: assign(
'webstats_js_code',
App::get('webstats_js_code', null, 'string'));
} }
Hook :: register('before_displaying_template', 'define_common_template_variables'); Hook :: register('before_displaying_template', 'define_common_template_variables');

View file

@ -302,6 +302,6 @@ email:
catch_all: false catch_all: false
# Web Stats JS code # Web Stats JS code
webstats_js_code: '' #webstats_js_code: ''
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab # vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab

View file

@ -380,6 +380,11 @@ class Tpl {
// Authenticated user info // Authenticated user info
if (Auth::user()) if (Auth::user())
self :: assign('auth_user', Auth::user()); self :: assign('auth_user', Auth::user());
// Webstats JS code
Tpl :: assign(
'webstats_js_code',
App::get('webstats_js_code', null, 'string'));
} }
/** /**