
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 15 - Reference Admin folder variable within function global $adminfolder; Line 27 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'manage-pages'); Original: Redirect::page('admin', 'manage-pages');
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
<?php defined('BLUDIT') or die('Bludit CMS.');
|
|
|
|
// ============================================================================
|
|
// Check role
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// Functions
|
|
// ============================================================================
|
|
|
|
function addPage($args)
|
|
{
|
|
global $dbPages;
|
|
global $Language;
|
|
global $adminfolder;
|
|
|
|
// Add the page, if the $key is FALSE the creation of the post failure.
|
|
$key = $dbPages->add($args);
|
|
|
|
if($key)
|
|
{
|
|
// Call the plugins after page created.
|
|
Theme::plugins('afterPageCreate');
|
|
|
|
// Alert the user
|
|
Alert::set($Language->g('Page added successfully'));
|
|
Redirect::page($adminfolder, 'manage-pages');
|
|
}
|
|
else
|
|
{
|
|
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the page.');
|
|
}
|
|
}
|
|
|
|
// ============================================================================
|
|
// Main before POST
|
|
// ============================================================================
|
|
|
|
// ============================================================================
|
|
// POST Method
|
|
// ============================================================================
|
|
|
|
if( $_SERVER['REQUEST_METHOD'] == 'POST' )
|
|
{
|
|
addPage($_POST);
|
|
}
|
|
|
|
// ============================================================================
|
|
// Main after POST
|
|
// ============================================================================
|