BUG 0000 "Safe upgrade for JavaScript files" SOLVED

- New feature
- Safe upgrade for JavaScript files
- Added new feature,
- This new feature is activated when you run one of the following commands:
    $ ./processmaker upgrade
    $ ./processmaker build-js
    $ ./processmaker browser-cache-files-upgrade
- The new feature creates an attribute in the file "processmaker/workflow/engine/config/env.ini"
    Example:
    browser_cache_files_uid = "xxxxxxxxxxyyyyyyyyyyzzzzzzzzzzaa"
- After running the command, the browser should automatically cache the new files
* Available from version ProcessMaker-2.5
This commit is contained in:
Victor Saisa Lopez
2013-04-25 12:42:30 -04:00
parent e81ef4e327
commit 8ef92c1a8b
8 changed files with 86 additions and 39 deletions

View File

@@ -579,8 +579,13 @@ class Bootstrap
//trick to generate the translation.language.js file , merging two files
if (strtolower($typefile) == 'js' && $typearray[0] == 'translation') {
Bootstrap::sendHeaders($filename, 'text/javascript', $download, $downloadFileName);
$output = Bootstrap::streamJSTranslationFile($filename, $typearray[count($typearray)-2]);
$filename = str_replace(implode(".", $typearray), $typearray[0] . "." . $typearray[1] . "." . $typearray[count($typearray) - 1], $filename);
$output = Bootstrap::streamJSTranslationFile($filename, $typearray[1]);
echo $output;
return;
}
@@ -855,11 +860,11 @@ class Bootstrap
foreach ($listPluginsActive['_aPluginDetails'] as $key => $value) {
$namePlugin = trim($key);
$translation = array();
if (!file_exists(PATH_LANGUAGECONT . $namePlugin . '.en')) {
Translation::generateFileTranslationPlugin($namePlugin, 'en');
}
if ( ($lang != 'en') && (!file_exists(PATH_LANGUAGECONT . $namePlugin . '.' . $lang)) ) {
Translation::generateFileTranslationPlugin($namePlugin, $lang);
}
@@ -3004,4 +3009,4 @@ class Bootstrap
return strtoupper(PHP_OS) == "LINUX";
}
}