Quick Repair and Rebuild

Hi yall!,
How can i make this option “Quick Repair and Rebuild” by code? I hate to do stuff manually.

Best Regards

Hi,

You’ll need to look into the exact details but a small example can be found in install/suite_install/suite_install.php:

require_once('modules/Administration/QuickRepairAndRebuild.php');
$actions = array('clearAll');
$randc = new RepairAndClear();
$randc->repairAndClearAll($actions, array(translate('LBL_ALL_MODULES')), true,false);

I believe $actions is the list of specific repair/rebuild actions you want to do. The second argument to repairAndClearAll can be used to target specific modules.

Hope this helps,
Jim