diff options
author | Thomas Bruederli <bruederli@kolabsys.com> | 2014-12-27 14:53:21 +0100 |
---|---|---|
committer | Thomas Bruederli <bruederli@kolabsys.com> | 2014-12-27 14:53:21 +0100 |
commit | b737021a905a33c8eb4331692475cca7791e533c (patch) | |
tree | f6706f7bcbd1f3467985aa57d79eeec135565b18 /program/include/rcmail_install.php | |
parent | d1bf0feed4db67adacbec1148d1ac15b9e1a68c2 (diff) |
Improve plugin selection in installer; check already selected plugins
Diffstat (limited to 'program/include/rcmail_install.php')
-rw-r--r-- | program/include/rcmail_install.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/program/include/rcmail_install.php b/program/include/rcmail_install.php index 26c613a11..2ba90693f 100644 --- a/program/include/rcmail_install.php +++ b/program/include/rcmail_install.php @@ -578,17 +578,18 @@ class rcmail_install foreach (glob($plugin_dir . '*') as $path) { - if (is_dir($path) && file_exists($path.'/composer.json')) + if (is_dir($path) && is_readable($path.'/composer.json')) { $file_json = json_decode(file_get_contents($path.'/composer.json')); - $plugin_desc = $file_json->description; + $plugin_desc = $file_json->description ?: 'N/A'; } else { $plugin_desc = 'N/A'; } - $plugins[] = array('name' => substr($path, strlen($plugin_dir)), 'desc' => $plugin_desc); + $name = substr($path, strlen($plugin_dir)); + $plugins[] = array('name' => $name, 'desc' => $plugin_desc, 'enabled' => in_array($name, $this->config['plugins'])); } return $plugins; |