|
|
@@ -14,7 +14,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
|
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
|
|
|
|
|
/**
|
|
|
- * This CLI command undo the soft-deletion an existing organization's website
|
|
|
+ * This CLI command undoes the soft-deletion an existing organization's website and updates it
|
|
|
*
|
|
|
* @package Opentalent\OtAdmin\Command
|
|
|
*/
|
|
|
@@ -31,7 +31,7 @@ class UndeleteSiteCommand extends Command
|
|
|
{
|
|
|
$this
|
|
|
->setName("ot:site:undelete")
|
|
|
- ->setDescription("Undo the soft-deletion of an organization website")
|
|
|
+ ->setDescription("Undo the soft-deletion of an organization website and update it")
|
|
|
->setHelp("Call this method by giving it the organization's id in the Opentalent DB.
|
|
|
If an organization website has been deleted with the ot:site:delete
|
|
|
command and without the --hard option, you can undo the deletion with
|
|
|
@@ -51,7 +51,7 @@ class UndeleteSiteCommand extends Command
|
|
|
* @return int
|
|
|
* @throws \Exception
|
|
|
*/
|
|
|
- protected function execute(InputInterface $input, OutputInterface $output)
|
|
|
+ protected function execute(InputInterface $input, OutputInterface $output): int
|
|
|
{
|
|
|
$org_id = $input->getArgument('organization-id');
|
|
|
|
|
|
@@ -59,6 +59,7 @@ class UndeleteSiteCommand extends Command
|
|
|
|
|
|
$siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class);
|
|
|
$rootUid = $siteController->undeleteSiteAction($org_id);
|
|
|
+ $siteController->updateSiteAction($org_id);
|
|
|
|
|
|
$io->success(sprintf("The website with root uid " . $rootUid . " has been restored"));
|
|
|
return 0;
|