Revision add-user.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 3- Admin folder variable global $adminfolder; Line 11 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'dashboard'); Original: Redirect::page('admin', 'dashboard'); Line 81- Replace Admin string with folder variable: Redirect::page($adminfolder, 'users'); Original: Redirect::page('admin', 'users');
This commit is contained in:
parent
c8bf86d0d0
commit
3f7504660e
@ -1,12 +1,14 @@
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
global $adminfolder;
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if($Login->role()!=='admin') {
|
||||
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
||||
Redirect::page('admin', 'dashboard');
|
||||
Redirect::page($adminfolder, 'dashboard');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@ -76,7 +78,7 @@ function addUser($args)
|
||||
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
||||
{
|
||||
if( addUser($_POST) ) {
|
||||
Redirect::page('admin', 'users');
|
||||
Redirect::page($adminfolder, 'users');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user