Update edit-post.php

Revise edit-post.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 15- Reference Admin folder variable within function
	       global $adminfolder;

Line 30 - Replace Admin string with folder variable:
		Redirect::page($adminfolder, 'edit-post/'.$args['slug']);
Original: 	Redirect::page('admin', 'edit-post/'.$args['slug']);

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

Line 55 - Replace Admin string with folder variable:
		Redirect::page($adminfolder, 'manage-posts');
Original: 	Redirect::page('admin', 'manage-posts');

Line 85- Reference Admin folder variable
              global $adminfolder;

Line 90 - Replace Admin string with folder variable:
	       Redirect::page($adminfolder, 'manage-posts');
Original: 	Redirect::page('admin', 'manage-pages');
This commit is contained in:
Kim Keown 2016-10-25 05:46:19 -06:00 committed by GitHub
parent 6c69c2d16b
commit 64eb3382a2

@ -87,7 +87,7 @@ global $adminfolder;
if(!$dbPosts->postExists($layout['parameters']))
{
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the post: '.$layout['parameters']);
Redirect::page('admin', 'manage-posts');
Redirect::page($adminfolder, 'manage-posts');
}
$_Post = buildPost($layout['parameters']);