Compare commits
2 Commits
e12bf58baf
...
5ec081022d
Author | SHA1 | Date | |
---|---|---|---|
5ec081022d | |||
c2dfe632e7 |
@ -24,7 +24,11 @@ class ModuleController extends ConsoleController
|
||||
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->installModule($this->argv['path']);
|
||||
if ($moduleService->installModule($this->argv['path'])) {
|
||||
$this->out->r("Модуль установлен", 'green');
|
||||
} else {
|
||||
$this->out->r("Ошибка установки модуля", 'red');
|
||||
}
|
||||
} else {
|
||||
$this->out->r("Модуль не найден", 'red');
|
||||
}
|
||||
@ -42,6 +46,7 @@ class ModuleController extends ConsoleController
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->uninstallModule($this->argv['path']);
|
||||
$this->out->r("Модуль удален", 'green');
|
||||
} else {
|
||||
$this->out->r("Модуль не найден", 'red');
|
||||
}
|
||||
@ -59,6 +64,7 @@ class ModuleController extends ConsoleController
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->packModule($this->argv['path']);
|
||||
$this->out->r("Модуль заархивирован", 'green');
|
||||
} else {
|
||||
$this->out->r("Модуль не найден", 'red');
|
||||
}
|
||||
@ -74,7 +80,13 @@ class ModuleController extends ConsoleController
|
||||
}
|
||||
if (file_exists(ROOT_DIR . $this->argv['path'])) {
|
||||
$moduleService = new ModuleService();
|
||||
$moduleService->updateModule($this->argv['path']);
|
||||
if ($moduleService->updateModule($this->argv['path'])) {
|
||||
$this->out->r("Модуль обновлен", 'green');
|
||||
} else {
|
||||
$this->out->r("Ошибка обновления модуля", 'red');
|
||||
}
|
||||
} else {
|
||||
$this->out->r("Модуль не найден", 'red');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,6 @@ class ModuleService
|
||||
}
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpModuleDirFull);
|
||||
var_dump($tmpModuleDirFull);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -349,7 +348,7 @@ class ModuleService
|
||||
if (!is_dir(RESOURCES_DIR . '/tmp/modules')) {
|
||||
mkdir(RESOURCES_DIR . '/tmp/modules', 0777, true);
|
||||
}
|
||||
$fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.itguild');
|
||||
$fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.igm');
|
||||
|
||||
$fileHelper->recursiveRemoveDir($tmpModuleDirFull);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user