mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 21:46:22 +05:30
Fix admin redirect
Fix admin redirect when not login.
This commit is contained in:
parent
6fafbf67ea
commit
fddeefde02
1 changed files with 2 additions and 2 deletions
|
|
@ -367,12 +367,12 @@ get('/:static', function($static){
|
||||||
'bodyclass' => 'inadmin',
|
'bodyclass' => 'inadmin',
|
||||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Admin'
|
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Admin'
|
||||||
));
|
));
|
||||||
die;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$login = site_url() . 'login';
|
$login = site_url() . 'login';
|
||||||
header("location: $login");
|
header("location: $login");
|
||||||
}
|
}
|
||||||
|
die;
|
||||||
}
|
}
|
||||||
elseif($static === 'login') {
|
elseif($static === 'login') {
|
||||||
config('views.root', 'system/admin/views');
|
config('views.root', 'system/admin/views');
|
||||||
|
|
@ -395,12 +395,12 @@ get('/:static', function($static){
|
||||||
'bodyclass' => 'inlogout',
|
'bodyclass' => 'inlogout',
|
||||||
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Logout'
|
'breadcrumb' => '<a href="' . config('site.url') . '">' .config('breadcrumb.home'). '</a> » Logout'
|
||||||
));
|
));
|
||||||
die;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$login = site_url() . 'login';
|
$login = site_url() . 'login';
|
||||||
header("location: $login");
|
header("location: $login");
|
||||||
}
|
}
|
||||||
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
$post = get_static_post($static);
|
$post = get_static_post($static);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue