disable custom plugin
This commit is contained in:
@@ -39,11 +39,11 @@ $oPluginRegistry = PluginRegistry::loadSingleton();
|
|||||||
if ($handle = opendir(PATH_PLUGINS)) {
|
if ($handle = opendir(PATH_PLUGINS)) {
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if (strpos($file, '.php', 1) && $file == $pluginFile) {
|
if (strpos($file, '.php', 1) && $file == $pluginFile) {
|
||||||
if ($pluginStatus == '1') {
|
if ($pluginStatus === 'true') {
|
||||||
// change to disable
|
// change to disable
|
||||||
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
$details = $oPluginRegistry->getPluginDetails($pluginFile);
|
||||||
$oPluginRegistry->disablePlugin($details->getNamespace());
|
$oPluginRegistry->disablePlugin($details->getNamespace());
|
||||||
$oPluginRegistry->savePlugin($details->sNamespace);
|
$oPluginRegistry->savePlugin($details->getNamespace());
|
||||||
G::auditLog("DisablePlugin", "Plugin Name: " . $details->getNamespace());
|
G::auditLog("DisablePlugin", "Plugin Name: " . $details->getNamespace());
|
||||||
} else {
|
} else {
|
||||||
$pluginName = str_replace(".php", "", $pluginFile);
|
$pluginName = str_replace(".php", "", $pluginFile);
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ class PluginRegistry
|
|||||||
$CompanyLogo = $default;
|
$CompanyLogo = $default;
|
||||||
/** @var PluginDetail $detail */
|
/** @var PluginDetail $detail */
|
||||||
foreach ($this->_aPluginDetails as $detail) {
|
foreach ($this->_aPluginDetails as $detail) {
|
||||||
if (trim($detail->getCompanyLogo()) != '') {
|
if (trim($detail->getCompanyLogo()) != '' && $detail->isEnabled()) {
|
||||||
$CompanyLogo = $detail->getCompanyLogo();
|
$CompanyLogo = $detail->getCompanyLogo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user