Revise login.php - Admin folder rename

Add variable in bl-kernel/boot/init.php that allows User to rename bl-kernel/admin folder. 
User can then define variable in bl-kernel/boot/init.php and change the foldername itself to effect the rename. 

Add global $adminfolder variable as necessary and replace relevant 'admin' strings with $adminfolder.
Applies to most of the files in bl-kernel/admin/controllers.

Line 16- Reference Admin folder variable within function
	      global $adminfolder;

Line 29 - Replace Admin string with folder variable:
		Redirect::page($adminfolder, 'dashboard');
Original: 	Redirect::page('admin', 'dashboard');
This commit is contained in:
Kim Keown 2016-10-25 06:18:08 -06:00 committed by GitHub
parent 1b37c3f537
commit bc50352c93

View File

@ -13,6 +13,7 @@ function checkPost($args)
global $Security; global $Security;
global $Login; global $Login;
global $Language; global $Language;
global $adminfolder;
if($Security->isBlocked()) { if($Security->isBlocked()) {
Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes')); Alert::set($Language->g('IP address has been blocked').'<br>'.$Language->g('Try again in a few minutes'));
@ -25,7 +26,7 @@ function checkPost($args)
// Renew the token. This token will be the same inside the session for multiple forms. // Renew the token. This token will be the same inside the session for multiple forms.
$Security->generateTokenCSRF(); $Security->generateTokenCSRF();
Redirect::page('admin', 'dashboard'); Redirect::page($adminfolder, 'dashboard');
return true; return true;
} }