Skip to content

Commit

Permalink
Dev: Fix merge conflict with plugin white list
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 2, 2018
1 parent ba30a82 commit 38c0f02
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions application/libraries/PluginManager/PluginManager.php
Expand Up @@ -288,7 +288,7 @@ public function scanPlugins($includeInstalledPlugins = false)
$plugin = Plugin::model()->find('name = :name', [':name' => $pluginName]);
if (empty($plugin)
|| ($includeInstalledPlugins && $plugin->load_error == 0)) {
if (file_exists($file)) {
if (file_exists($file) && $this->_checkWhitelist($pluginName)) {
try {
$result[$pluginName] = $this->getPluginInfo($pluginName, $pluginDir);
} catch (\Throwable $ex) {
Expand Down Expand Up @@ -572,9 +572,13 @@ public function readConfigFiles()
$this->loadPlugins();
}


private function _checkWhitelist($pluginName){
if(App()->getConfig('usePluginWhitelist')) {
/**
* @param string $pluginName
* @return boolean
*/
private function _checkWhitelist($pluginName)
{
if (App()->getConfig('usePluginWhitelist')) {

$whiteList = App()->getConfig('pluginWhitelist');
$coreList = App()->getConfig('pluginCoreList');
Expand Down

0 comments on commit 38c0f02

Please sign in to comment.