Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

SCRM-ACTION: quick repair, to generate components files #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/Console/Command/SystemQuickRepairCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ protected function configure()
'f',
InputOption::VALUE_NONE,
'Really execute the SQL queries (displayed by using -d).'
);
)
->addOption(
'action',
'a',
InputOption::VALUE_OPTIONAL,
'Action to run, default value repairMetadataAPICache'
);
}

protected function execute(InputInterface $input, OutputInterface $output)
Expand All @@ -58,7 +64,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
$progress->advance();
$sugarSystem = new SugarSystem($sugarEP);
$progress->setMessage('Working...');
$messages = $sugarSystem->repairAll($input->getOption('force'));
if ($input->getOption('action')) {
require_once('modules/Administration/QuickRepairAndRebuild.php');
require_once('include/utils/layout_utils.php');
$repair = new \RepairAndClear();
$messages = $repair->repairAndClearAll(array($input->getOption('action')), array(translate('LBL_ALL_MODULES')), '', true, '');
} else {
$messages = $sugarSystem->repairAll($input->getOption('force'));
}
$progress->finish('<info>Repair Done.</info>');

if ($output->isVerbose()) {
Expand Down