Bug plugin variable enum dataDirectory empty
This commit is contained in:
parent
50e94976fa
commit
b2daeccc2c
@ -224,19 +224,22 @@ class plugin extends common
|
||||
// Copie du module
|
||||
$success = $this->copyDir(self::TEMP_DIR . $tempFolder, self::MODULE_DIR . $module['name']);
|
||||
// Copie récursive des dossiers externes
|
||||
foreach ($module['dirs'] as $src => $dest) {
|
||||
if (is_array($module['dataDirectory'])) {
|
||||
foreach ($module['dataDirectory'] as $src => $dest) {
|
||||
if (!is_dir(self::TEMP_DIR . $tempFolder . $src)) {
|
||||
mkdir(self::TEMP_DIR . $tempFolder . $src);
|
||||
}
|
||||
$success = $success && $this->copyDir(self::TEMP_DIR . $tempFolder . $src, $dest);
|
||||
}
|
||||
}
|
||||
// Message de retour
|
||||
$t = isset($versionInstalled) ? helper::translate('actualisé') : helper::translate('installé');
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
$zip->close();
|
||||
return ([
|
||||
'success' => $success,
|
||||
'notification' => $success ? sprintf(helper::translate('Le module %s a été %s'), $module['name'], $t)
|
||||
'notification' => $success
|
||||
? sprintf(helper::translate('Le module %s a été %s'), $module['name'], $t)
|
||||
: helper::translate('Erreur inconnue, le module n\'est pas installé')
|
||||
]);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user