Created
March 26, 2015 13:46
-
-
Save vratiu/ec71e3506935a8ff902f to your computer and use it in GitHub Desktop.
Quick repair and rebuild script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (php_sapi_name() !== "cli") { | |
die(1); | |
} | |
define('sugarEntry', true); | |
$runSQL = false; | |
if (!empty($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 'true') { | |
$runSQL = true; | |
} | |
// Run the repair and rebuild to install the custom fields that were populated into fields_meta_data table | |
require_once('include/entryPoint.php'); | |
$GLOBALS['current_user'] = BeanFactory::getBean('Users', '1'); | |
require('modules/Administration/language/en_us.lang.php'); | |
SugarAutoLoader::requireWithCustom('modules/Administration/QuickRepairAndRebuild.php'); | |
$repairClass = SugarAutoLoader::customClass('RepairAndClear'); | |
$randc = new $repairClass(); | |
$randc->repairAndClearAll(array('clearAll'), array($mod_strings['LBL_ALL_MODULES']), $runSQL, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment