Skip to content

Commit

Permalink
improv: fix theme supported with cms version #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Eywek committed Apr 28, 2018
1 parent d9663db commit ed4d5eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Controller/Component/ThemeComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ public function checkSupported($slug)
foreach ($supported as $type => $version) { // on parcours tout les pré-requis
// Set version to compare
if ($type == 'CMS')
$versionToCompare = $this->controller->Configuration->getKey('version');
$versionToCompare = trim(@file_get_contents(ROOT . DS . 'VERSION'));
else {
// find plugin
$search = $this->EyPlugin->findPlugin('id', $type);
if (empty($search)) // plugin not installed
continue;
$versionToCompare = $this->EyPlugin->getPluginConfig($search->slug)->version;
$versionToCompare = $search->version;
}

// Check
Expand All @@ -319,7 +319,7 @@ public function checkSupported($slug)
if (isset($search))
$this->log('Theme (' . $slug . ') check supported: Plugin (' . $search->slug . ') invalid version: ' . $versionToCompare);
else
$this->log('Theme (' . $slug . ') check supported: Invalid version : ' . $versionToCompare);
$this->log('Theme (' . $slug . ') check supported: Invalid version : ' . $versionToCompare . '(' . $type . ' => ' . $version . ')');
}
}

Expand Down

0 comments on commit ed4d5eb

Please sign in to comment.