
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 9 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'dashboard'); Original: Redirect::page('admin', 'dashboard'); Line 39 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'themes'); Original: Redirect::page('admin', 'themes');
40 lines
1.4 KiB
PHP
40 lines
1.4 KiB
PHP
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
// ============================================================================
|
|
// Check role
|
|
// ============================================================================
|
|
|
|
if($Login->role()!=='admin') {
|
|
Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
|
|
Redirect::page($adminfolder, 'dashboard');
|
|
}
|
|
|
|
// ============================================================================
|
|
// Functions
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Main before POST
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// POST Method
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Main after POST
|
|
// ============================================================================
|
|
$themeDirname = $layout['parameters'];
|
|
|
|
if( Sanitize::pathFile(PATH_THEMES.$themeDirname) )
|
|
{
|
|
$Site->set(array('theme'=>$themeDirname));
|
|
Alert::set($Language->g('The changes have been saved'));
|
|
}
|
|
else
|
|
{
|
|
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to install the theme: '.$themeDirname);
|
|
}
|
|
|
|
Redirect::page($adminfolder, 'themes');
|