mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-02-21 10:08:34 +00:00
migrate extension after enabling it with console tool
This commit is contained in:
parent
38827c8531
commit
a651a23193
|
|
@ -13,6 +13,7 @@
|
|||
if length is greater than 8
|
||||
- parse changelog and readme of extension as markdown
|
||||
- fix incorrect base path for url routing, which broke some extensions
|
||||
- migrate extension after enabling it with console tool
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.44
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ class ConfigureextensionCommand extends Command
|
|||
return Command::FAILURE;
|
||||
}
|
||||
|
||||
require_once('inc/inc.DBInit.php');
|
||||
|
||||
if ($input->getOption('enable')) {
|
||||
if ($settings->extensionIsDisabled($extname)) {
|
||||
$settings->enableExtension($extname);
|
||||
|
|
@ -73,7 +75,18 @@ class ConfigureextensionCommand extends Command
|
|||
$output->writeln(sprintf("<error>Could not write configuration.</error>", $extname));
|
||||
return Command::FAILURE;
|
||||
} else {
|
||||
$output->writeln(sprintf("Extension is %s.", $settings->extensionIsDisabled($extname) ? 'disabled' : 'enabled'));
|
||||
$ret = $extmgr->migrate($extname, $settings, $dms, $logger);
|
||||
if($ret !== null) {
|
||||
if($ret === true) {
|
||||
$output->writeln(sprintf("Migration of extension successful"));
|
||||
$output->writeln(sprintf("Extension is %s.", $settings->extensionIsDisabled($extname) ? 'disabled' : 'enabled'));
|
||||
} else {
|
||||
$output->writeln(sprintf("<error>Migration of extension failed</error>"));
|
||||
return Command::FAILURE;
|
||||
}
|
||||
} else {
|
||||
$output->writeln(sprintf("Extension is %s.", $settings->extensionIsDisabled($extname) ? 'disabled' : 'enabled'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$output->writeln(sprintf("Extension already enabled."));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user