Skip to content

Commit

Permalink
Minor optimizations in PluginController
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Apr 22, 2019
1 parent c904b9f commit c47e666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/Extension/PluginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ protected function getListByType($type, $enabled)
if (is_dir($typedir)) {
if ($dp = opendir($typedir)) {
while (false !== ($component = readdir($dp))) {
if (substr($component, 0, 1) == '.' || strtolower(substr($component, -4)) != ".php") continue;
if (strpos($component, '.') === 0 || strtolower(substr($component, -4)) !== '.php') continue;
if (is_file($typedir . $component)) {
$plugins[] = $plugin . '_' . substr($component, 0, -4);
}
Expand All @@ -373,7 +373,7 @@ protected function getListByType($type, $enabled)
*/
protected function splitName($name)
{
if (array_search($name, array_keys($this->tmp_plugins)) === false) {
if (!isset($this->masterList[$name])) {
return explode('_', $name, 2);
}

Expand Down

0 comments on commit c47e666

Please sign in to comment.