From 9ee2292b7b651b401e3b6f275cfc9587eaccc2e3 Mon Sep 17 00:00:00 2001 From: Kim Keown Date: Tue, 25 Oct 2016 06:26:39 -0600 Subject: [PATCH] Revise new-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 as necessary and replace relevant 'admin' strings with $adminfolder. Applies to most of the files in bl-kernel/admin/controllers. Line 14 - Reference Admin folder variable within function global $adminfolder; Line 29 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'manage-posts'); Original: Redirect::page('admin', 'manage-posts'); --- bl-kernel/admin/controllers/new-post.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bl-kernel/admin/controllers/new-post.php b/bl-kernel/admin/controllers/new-post.php index 19463e3b..29da3479 100644 --- a/bl-kernel/admin/controllers/new-post.php +++ b/bl-kernel/admin/controllers/new-post.php @@ -11,7 +11,8 @@ function addPost($args) { global $dbPosts; global $Language; - + global $adminfolder; + // Add the page, if the $key is FALSE the creation of the post failure. $key = $dbPosts->add($args); @@ -25,7 +26,7 @@ function addPost($args) // Alert for the user Alert::set($Language->g('Post added successfully')); - Redirect::page('admin', 'manage-posts'); + Redirect::page($adminfolder, 'manage-posts'); } else {