Merged master into dashboards2
This commit is contained in:
@@ -52,25 +52,27 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
|
||||
if (is_file(PATH_PLUGINS . $pluginName . ".php") && is_dir(PATH_PLUGINS . $pluginName)) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
|
||||
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName));
|
||||
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
|
||||
|
||||
if (count($arrayFoundDisabledCode) > 0) {
|
||||
$response = array();
|
||||
$response["status"] = "DISABLED-CODE";
|
||||
$response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PLUGIN");
|
||||
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
|
||||
|
||||
echo G::json_encode($response);
|
||||
exit(0);
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", PATH_PLUGINS . $pluginName . ".php"), $cs->checkDisabledCode("PATH", PATH_PLUGINS . $pluginName));
|
||||
|
||||
if (!empty($arrayFoundDisabledCode)) {
|
||||
$response = array();
|
||||
$response["status"] = "DISABLED-CODE";
|
||||
$response["message"] = G::LoadTranslation("ID_DISABLED_CODE_PLUGIN");
|
||||
|
||||
echo G::json_encode($response);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//print "change to ENABLED";
|
||||
require_once($path);
|
||||
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
||||
|
||||
@@ -238,20 +238,24 @@ try {
|
||||
unset( $oClass );
|
||||
}
|
||||
$res = $tar->extract( $path );
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
|
||||
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature("B0oWlBLY3hHdWY0YUNpZEtFQm5CeTJhQlIwN3IxMEkwaG4=")) {
|
||||
//Check disabled code
|
||||
G::LoadClass("codeScanner");
|
||||
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName));
|
||||
$arraySystemConfiguration = System::getSystemConfiguration(PATH_CONFIG . "env.ini");
|
||||
|
||||
if (count($arrayFoundDisabledCode) > 0) {
|
||||
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"));
|
||||
$cs = new CodeScanner((isset($arraySystemConfiguration["enable_blacklist"]) && (int)($arraySystemConfiguration["enable_blacklist"]) == 1)? "DISABLED_CODE" : "");
|
||||
|
||||
$arrayFoundDisabledCode = array_merge($cs->checkDisabledCode("FILE", $path . $pluginFile), $cs->checkDisabledCode("PATH", $path . $sClassName));
|
||||
|
||||
if (!empty($arrayFoundDisabledCode)) {
|
||||
throw new Exception(G::LoadTranslation("ID_DISABLED_CODE_PLUGIN"));
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
|
||||
//Check if is enterprise plugin
|
||||
$sContent = file_get_contents( $path . $pluginFile );
|
||||
$chain = preg_quote( 'extends enterprisePlugin' );
|
||||
|
||||
Reference in New Issue
Block a user