From c29ee5b685b3cc16ce2d1cc4b9e25e0bc229eb9c Mon Sep 17 00:00:00 2001 From: Kim Keown Date: Tue, 25 Oct 2016 05:08:43 -0600 Subject: [PATCH] Revise configure-plugin.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 9 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'dashboard'); Original: Redirect::page('admin', 'dashboard'); Line 31 - Replace Admin string with folder variable: Redirect::page($adminfolder, 'plugins'); Original: Redirect::page('admin', 'plugins'); Line 36- Replace Admin string with folder variable: Redirect::page($adminfolder, 'plugins'); Original: Redirect::page('admin', 'plugins'); --- bl-kernel/admin/controllers/configure-plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bl-kernel/admin/controllers/configure-plugin.php b/bl-kernel/admin/controllers/configure-plugin.php index 60946a16..79bacaea 100644 --- a/bl-kernel/admin/controllers/configure-plugin.php +++ b/bl-kernel/admin/controllers/configure-plugin.php @@ -6,7 +6,7 @@ if($Login->role()!=='admin') { Alert::set($Language->g('you-do-not-have-sufficient-permissions')); - Redirect::page('admin', 'dashboard'); + Redirect::page($adminfolder, 'dashboard'); } // ============================================================================ @@ -28,12 +28,12 @@ foreach($plugins['all'] as $P) // Check if the plugin exists. if($_Plugin===false) { - Redirect::page('admin', 'plugins'); + Redirect::page($adminfolder, 'plugins'); } // Check if the plugin has the method form() if(!method_exists($_Plugin, 'form')) { - Redirect::page('admin', 'plugins'); + Redirect::page($adminfolder, 'plugins'); } // ============================================================================