Fix extensions loading issue
This commit is contained in:
@@ -5,7 +5,7 @@ if(!file_exists('config.php')){
|
|||||||
}
|
}
|
||||||
include ('config.php');
|
include ('config.php');
|
||||||
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
|
if(!isset($_REQUEST['g']) || !isset($_REQUEST['n'])){
|
||||||
header("Location:".CLIENT_BASE_URL."login.php");
|
header("Location:".CLIENT_BASE_URL."login.php");
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
$group = $_REQUEST['g'];
|
$group = $_REQUEST['g'];
|
||||||
@@ -14,7 +14,7 @@ $name= $_REQUEST['n'];
|
|||||||
$groups = array('admin','modules');
|
$groups = array('admin','modules');
|
||||||
|
|
||||||
if($group == 'admin' || $group == 'modules'){
|
if($group == 'admin' || $group == 'modules'){
|
||||||
$name = str_replace("..","",$name);
|
$name = str_replace("..","",$name);
|
||||||
$name = str_replace("/","",$name);
|
$name = str_replace("/","",$name);
|
||||||
include APP_BASE_PATH.'/'.$group.'/'.$name.'/index.php';
|
include APP_BASE_PATH.'/'.$group.'/'.$name.'/index.php';
|
||||||
}else if ($group == 'extension'){
|
}else if ($group == 'extension'){
|
||||||
@@ -23,7 +23,7 @@ if($group == 'admin' || $group == 'modules'){
|
|||||||
$moduleName = $name;
|
$moduleName = $name;
|
||||||
$moduleGroup = 'extensions';
|
$moduleGroup = 'extensions';
|
||||||
$extensionIndex = APP_BASE_PATH.'/../extensions/'.$name.'/web/index.php';
|
$extensionIndex = APP_BASE_PATH.'/../extensions/'.$name.'/web/index.php';
|
||||||
include $extensionIndex;
|
include APP_BASE_PATH.'extensions/wrapper.php';
|
||||||
}else{
|
}else{
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user