From f7929a0090c40193d1f2d8dd674c5e6306a0d5aa Mon Sep 17 00:00:00 2001 From: Richard Toth Date: Mon, 12 Oct 2020 21:12:22 +0200 Subject: [PATCH] move page exceptions to separate array --- _class/class_page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_class/class_page.php b/_class/class_page.php index 25f312d..ac7303c 100644 --- a/_class/class_page.php +++ b/_class/class_page.php @@ -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