Skip to content

Instantly share code, notes, and snippets.

@betobaz
Last active October 1, 2016 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betobaz/0ca221ce429551a75ea9e99dbbf3b620 to your computer and use it in GitHub Desktop.
Save betobaz/0ca221ce429551a75ea9e99dbbf3b620 to your computer and use it in GitHub Desktop.
SugarCRM: 7.7.X: Quick Repair CLI
<?php
if(!defined('sugarEntry'))define('sugarEntry', true);
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative, then do not
* install or use this SugarCRM file.
*
* Copyright (C) SugarCRM Inc. All rights reserved.
*/
//change directories to where this file is located.
require_once('include/entryPoint.php');
if(empty($current_language)) {
$current_language = $sugar_config['default_language'];
}
$app_list_strings = return_app_list_strings_language($current_language);
$app_strings = return_application_language($current_language);
$current_user = BeanFactory::getBean('Users');
$current_user->getSystemUser();
require_once('modules/Administration/QuickRepairAndRebuild.php');
$randc = new RepairAndClear();
$actions = array();
$actions[] = 'clearAll';
$randc->repairAndClearAll($actions, array(translate('LBL_ALL_MODULES')), false,false,'');
@betobaz
Copy link
Author

betobaz commented Oct 1, 2016

Copy inside instance directory and run

$ php repair.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment