move page exceptions to separate array

This commit is contained in:
2020-10-12 21:12:22 +02:00
parent 5a252e28a0
commit f7929a0090

View File

@@ -90,7 +90,8 @@ class page {
//var_dump($user);
ini_set('include_path', '_include/');
//ini_set('include_path', '/var/www/badminton_coach/_include');
if ((!empty($user) && $user->is_logged_in()) || ($this->get_subpage() == "export_balance" || $this->get_subpage() == "send_report")) {
$exceptions = array("export_balance", "send_report", "money_update");
if ((!empty($user) && $user->is_logged_in()) || in_array($this->get_subpage(), $exceptions)) {
if ($this->is_page()) {
//TODO: mi van ha nincs page? átirányítás v 404?
//page alapján betölti a tpl-t