From 8d8efd8586f50f564a8663d21edb897939c9c6d5 Mon Sep 17 00:00:00 2001 From: wasu-code <61418403+wasu-code@users.noreply.github.com> Date: Thu, 24 Mar 2022 02:37:46 +0100 Subject: [PATCH] login quickfix --- app/security/check.php | 2 +- app/security/login.php | 10 +++++----- app/security/logout.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/security/check.php b/app/security/check.php index ccf6599..fe9d850 100644 --- a/app/security/check.php +++ b/app/security/check.php @@ -11,7 +11,7 @@ //jeśli brak parametru (niezalogowanie) to idź na stronę logowania if ( empty($role) ){ - include _ROOT_PATH.'/app/security/login.php'; + include $cfg->root_path.'/app/security/login.php'; //zatrzymaj dalsze przetwarzanie skryptów exit(); } diff --git a/app/security/login.php b/app/security/login.php index f73f6b7..57196d1 100644 --- a/app/security/login.php +++ b/app/security/login.php @@ -1,6 +1,6 @@ root_path.'/lib/smarty/Smarty.class.php'; $form = array(); $messages = array(); @@ -51,8 +51,8 @@ function validateLogin(&$form,&$messages){ } $smarty = new Smarty(); -$smarty->assign('app_url',_APP_URL); -$smarty->assign('root_path',_ROOT_PATH); +$smarty->assign('app_url',$cfg->app_url); +$smarty->assign('root_path',$cfg->root_path); $smarty->assign('page_title','Logowanie'); $smarty->assign('page_desc','zaloguj się'); @@ -63,9 +63,9 @@ function validateLogin(&$form,&$messages){ if (!validateLogin($form,$messages)){ - $smarty->display(_ROOT_PATH.'/app/security/login.tpl'); + $smarty->display($cfg->root_path.'/app/security/login.tpl'); } else { - header("Location: "._APP_URL); + header("Location: ".$cfg->app_url); } diff --git a/app/security/logout.php b/app/security/logout.php index 3276702..78f8ee1 100644 --- a/app/security/logout.php +++ b/app/security/logout.php @@ -6,6 +6,6 @@ // 2. przekieruj lub "forward" na stronę główną //redirect -header("Location: "._APP_URL); +header("Location: ".$cfg->app_url); //"forward" //include _ROOT_PATH.'/index.php'; \ No newline at end of file