Skip to content

Commit

Permalink
login quickfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wasu-code committed Mar 24, 2022
1 parent aca0cca commit 8d8efd8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/security/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
10 changes: 5 additions & 5 deletions app/security/login.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
require_once dirname(__FILE__).'/../../config.php';
require_once _ROOT_PATH.'/lib/smarty/Smarty.class.php';
require_once $cfg->root_path.'/lib/smarty/Smarty.class.php';

$form = array();
$messages = array();
Expand Down Expand Up @@ -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ę');
Expand All @@ -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);
}


Expand Down
2 changes: 1 addition & 1 deletion app/security/logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit 8d8efd8

Please sign in to comment.