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();
|
||||
}
|
||||
|
||||
@@ -141,6 +141,7 @@ try {
|
||||
$browserCacheFilesUid = G::browserCacheFilesGetUid();
|
||||
|
||||
$template->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
|
||||
$template->assign("URL_TRANSLATION_ENV_JS", G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
|
||||
$template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
|
||||
$template->assign("sysSys", SYS_SYS);
|
||||
$template->assign("sysLang", SYS_LANG);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel='stylesheet' type='text/css' href='/css/{$_skin}-extJs.css' />
|
||||
</head>
|
||||
|
||||
|
||||
<body class="x-pm-login-body">
|
||||
|
||||
<br/> <br/>
|
||||
@@ -13,9 +13,9 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class="companyLogo"><img src="{$logo_company}"/></div>
|
||||
|
||||
|
||||
<div id="loading-mask"> </div>
|
||||
|
||||
|
||||
<div id="loading">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerLeftSection">
|
||||
<tr>
|
||||
@@ -48,13 +48,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Core API...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-base.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Loading Components...';</script>
|
||||
<script type='text/javascript' src='/js/ext/ext-all.js'></script>
|
||||
<script type="text/javascript">document.getElementById('loading-message').innerHTML = 'Initializing...';</script>
|
||||
<script type='text/javascript' src='/js/ext/translation.en.js'></script>
|
||||
<script type="text/javascript" src="{$URL_TRANSLATION_JS}"></script>
|
||||
{$login_script}
|
||||
{$login_vars}
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="{siteUrl}/jscore/labels/{sysLang}.js"></script>
|
||||
<script type="text/javascript" src="{siteUrl}{URL_TRANSLATION_ENV_JS}"></script>
|
||||
<script type="text/javascript" src="{siteUrl}{URL_MABORAK_JS}"></script>
|
||||
<script type="text/javascript" src="{siteUrl}/js/jscalendar/lang/calendar-{sysLang}.js"></script>
|
||||
<script type="text/javascript" src="{siteUrl}/jsform/gulliver/dynaforms_Options.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user