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:
@@ -367,7 +367,7 @@ class Installer extends Controller
|
||||
{
|
||||
$pathSharedPartner = trim( $_REQUEST['pathShared'] );
|
||||
if (file_exists($pathSharedPartner.'partner.info')) {
|
||||
$_REQUEST['PARTNER_FLAG'] = true;
|
||||
$_REQUEST["PARTNER_FLAG"] = true;
|
||||
}
|
||||
$this->setResponseType( 'json' );
|
||||
if ($_REQUEST['db_engine'] == 'mysql') {
|
||||
@@ -382,13 +382,13 @@ class Installer extends Controller
|
||||
public function forceTogenerateTranslationsFiles ($url)
|
||||
{
|
||||
$ch = curl_init();
|
||||
curl_setopt( $ch, CURLOPT_URL, (isset( $_SERVER['HTTPS'] ) ? ($_SERVER['HTTPS'] != '' ? 'https://' : 'http://') : 'http://') . $_SERVER['HTTP_HOST'] . '/js/ext/translation.en.js?r=' . rand( 1, 10000 ) );
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
|
||||
curl_setopt( $ch, CURLOPT_FRESH_CONNECT, 1 );
|
||||
curl_setopt( $ch, CURLOPT_TIMEOUT, 60 );
|
||||
curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 20 );
|
||||
curl_exec( $ch );
|
||||
curl_close( $ch );
|
||||
curl_setopt($ch, CURLOPT_URL, G::browserCacheFilesUrl((isset($_SERVER["HTTPS"])? (($_SERVER["HTTPS"] != "")? "https://" : "http://") : "http://") . $_SERVER["HTTP_HOST"] . "/js/ext/translation.en.js?r=" . rand(1, 10000)));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
|
||||
curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1374,7 +1374,7 @@ EOL;
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Upload translation .po file
|
||||
*/
|
||||
|
||||
@@ -1397,7 +1397,7 @@ EOL;
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Upload skin file
|
||||
*/
|
||||
|
||||
|
||||
@@ -277,10 +277,11 @@ class Main extends Controller
|
||||
$this->setVar( 'advise_text', $adviseText );
|
||||
$loginScript = $this->getHeadPublisher()->getExtJsLibraries();
|
||||
$loginScript .= $this->getHeadPublisher()->getExtJsScripts();
|
||||
$this->setVar( 'login_script', $loginScript );
|
||||
$this->setVar( 'login_vars', $this->getHeadPublisher()->getExtJsVariablesScript() );
|
||||
$this->setVar("login_script", $loginScript);
|
||||
$this->setVar("login_vars", $this->getHeadPublisher()->getExtJsVariablesScript());
|
||||
$this->setVar("URL_TRANSLATION_JS", G::browserCacheFilesUrl("/js/ext/translation.en.js"));
|
||||
|
||||
$this->setLayout( 'pm-modern-login' );
|
||||
$this->setLayout("pm-modern-login");
|
||||
|
||||
$this->render();
|
||||
}
|
||||
@@ -342,10 +343,11 @@ class Main extends Controller
|
||||
|
||||
$loginScript = $this->getHeadPublisher()->getExtJsLibraries();
|
||||
$loginScript .= $this->getHeadPublisher()->getExtJsScripts();
|
||||
$this->setVar( 'login_script', $loginScript );
|
||||
$this->setVar( 'login_vars', $this->getHeadPublisher()->getExtJsVariablesScript() );
|
||||
$this->setVar("login_script", $loginScript);
|
||||
$this->setVar("login_vars", $this->getHeadPublisher()->getExtJsVariablesScript());
|
||||
$this->setVar("URL_TRANSLATION_JS", G::browserCacheFilesUrl("/js/ext/translation.en.js"));
|
||||
|
||||
$this->setLayout( 'pm-modern-login' );
|
||||
$this->setLayout("pm-modern-login");
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user