Skip to content

Commit

Permalink
Merge pull request #267 from bcgov/feat/repair-js-files/rs
Browse files Browse the repository at this point in the history
feat: repair js files command
  • Loading branch information
raphaelcdsouza authored Jul 31, 2024
2 parents b578fa1 + d9a52bf commit 12d988b
Showing 1 changed file with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ function usage($error = '') {
'cache/modules/Teams/TeamSetCache.php'
);

// foreach ($files_to_remove as $file) {
// $file = SugarAutoloader::normalizeFilePath($file);
// if (SugarAutoloader::fileExists($file)) {
// SugarAutoloader::unlink($file);
// }
// }

// // rebuild the autoloader once first, to be aware of new files
// SugarAutoLoader::buildCache();

// repair
$repair = new RepairAndClear();
$repair->repairAndClearAll(array('clearAll'), array($mod_strings['LBL_ALL_MODULES']), true, false, '');
Expand All @@ -111,9 +101,6 @@ function usage($error = '') {
LanguageManager::removeJSLanguageFiles();
LanguageManager::clearLanguageCache();

// rebuild some stuff
// SugarAutoLoader::buildCache();

// quick load of all beans
global $beanList;
$full_module_list = array_merge($beanList, $app_list_strings['moduleList']);
Expand All @@ -129,9 +116,12 @@ function usage($error = '') {
$app_list_strings = return_app_list_strings_language($current_language);
$app_strings = return_application_language($current_language);

// load api
// $sd = new ServiceDictionary();
// $sd->buildAllDictionaries();

echo 'Repairing JS files...' . PHP_EOL;

$_REQUEST['js_admin_repair'] = 'repair';

require_once('/suitecrm/public/legacy/modules/Administration/callJSRepair.php');

// when the other register shutdown functionalities complete, exit this script
register_shutdown_function(
Expand Down

0 comments on commit 12d988b

Please sign in to comment.