Commit f18e89d9 authored by dockx thibault's avatar dockx thibault
Browse files

Merge branch...

Merge branch '27-fd-tools-the-install-plugins-propose-the-installation-of-multiple-plugins-but-take-all' into 'main'

Resolve "[FD-Tools] - The install plugins propose the installation of multiple plugins but take all nevertheless of the options"

Closes #27

See merge request fusiondirectory/fusiondirectory-tools!26
No related merge requests found
Showing with 20 additions and 19 deletions
+20 -19
...@@ -325,26 +325,27 @@ class PluginsManager extends Cli\Application ...@@ -325,26 +325,27 @@ class PluginsManager extends Cli\Application
if (in_array('all', $pluginsToInstall) || in_array($pluginPath->getBasename(), $pluginsToInstall) || in_array($i, $pluginsToInstall)) { if (in_array('all', $pluginsToInstall) || in_array($pluginPath->getBasename(), $pluginsToInstall) || in_array($i, $pluginsToInstall)) {
echo 'Installing plugin '.$pluginPath->getBasename().'.'."\n"; echo 'Installing plugin '.$pluginPath->getBasename().'.'."\n";
}
// Register the plugins within LDAP
$this->addPluginRecord([$pluginPath]);
$pluginInfo = $this->parseYamlFile([$pluginPath]);
// If package do not install // Register the plugins within LDAP
if ($pluginInfo['information']['origin'] !== 'package') { $this->addPluginRecord([$pluginPath]);
// YAML description must be saved within : /etc/fusiondirectory/yaml/nomplugin/description.yaml $pluginInfo = $this->parseYamlFile([$pluginPath]);
$this->copyDirectory($pluginPath->getPathname().'/contrib/yaml', $this->vars['fd_config_dir'].'/yaml/'.$pluginPath->getBasename().'/');
$this->copyDirectory($pluginPath->getPathname().'/addons', $this->vars['fd_home'].'/plugins/addons'); // If package do not install
$this->copyDirectory($pluginPath->getPathname().'/admin', $this->vars['fd_home'].'/plugins/admin'); if ($pluginInfo['information']['origin'] !== 'package') {
$this->copyDirectory($pluginPath->getPathname().'/config', $this->vars['fd_home'].'/plugins/config'); // YAML description must be saved within : /etc/fusiondirectory/yaml/nomplugin/description.yaml
$this->copyDirectory($pluginPath->getPathname().'/personal', $this->vars['fd_home'].'/plugins/personal'); $this->copyDirectory($pluginPath->getPathname().'/contrib/yaml', $this->vars['fd_config_dir'].'/yaml/'.$pluginPath->getBasename().'/');
$this->copyDirectory($pluginPath->getPathname().'/html', $this->vars['fd_home'].'/html'); $this->copyDirectory($pluginPath->getPathname().'/addons', $this->vars['fd_home'].'/plugins/addons');
$this->copyDirectory($pluginPath->getPathname().'/ihtml', $this->vars['fd_home'].'/ihtml'); $this->copyDirectory($pluginPath->getPathname().'/admin', $this->vars['fd_home'].'/plugins/admin');
$this->copyDirectory($pluginPath->getPathname().'/include', $this->vars['fd_home'].'/include'); $this->copyDirectory($pluginPath->getPathname().'/config', $this->vars['fd_home'].'/plugins/config');
$this->copyDirectory($pluginPath->getPathname().'/contrib/openldap', $this->vars['fd_home'].'/contrib/openldap'); $this->copyDirectory($pluginPath->getPathname().'/personal', $this->vars['fd_home'].'/plugins/personal');
$this->copyDirectory($pluginPath->getPathname().'/contrib/etc', $this->vars['fd_config_dir'].'/'.$pluginPath->getBasename()); $this->copyDirectory($pluginPath->getPathname().'/html', $this->vars['fd_home'].'/html');
$this->copyDirectory($pluginPath->getPathname().'/locale', $this->vars['fd_home'].'/locale/plugins/'.$pluginPath->getBasename().'/locale'); $this->copyDirectory($pluginPath->getPathname().'/ihtml', $this->vars['fd_home'].'/ihtml');
$this->copyDirectory($pluginPath->getPathname().'/include', $this->vars['fd_home'].'/include');
$this->copyDirectory($pluginPath->getPathname().'/contrib/openldap', $this->vars['fd_home'].'/contrib/openldap');
$this->copyDirectory($pluginPath->getPathname().'/contrib/etc', $this->vars['fd_config_dir'].'/'.$pluginPath->getBasename());
$this->copyDirectory($pluginPath->getPathname().'/locale', $this->vars['fd_home'].'/locale/plugins/'.$pluginPath->getBasename().'/locale');
}
echo 'Please refresh FusionDirectory with fusiondirectory-configuration-manager --update-cache' .PHP_EOL;
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment