diff --git a/gulliver/bin/tasks/templates/sysGeneric.php.tpl b/gulliver/bin/tasks/templates/sysGeneric.php.tpl index 47b34d2a8..6096079f0 100755 --- a/gulliver/bin/tasks/templates/sysGeneric.php.tpl +++ b/gulliver/bin/tasks/templates/sysGeneric.php.tpl @@ -54,30 +54,6 @@ $docuroot = explode ( PATH_SEP , $_SERVER['DOCUMENT_ROOT'] ); /*** enable ERROR_LOG_NOTICE_ERROR to log Notices messages in default apache log ***/ // define ( 'ERROR_LOG_NOTICE_ERROR', true ); -// ************* creat headPublisher singleton ***************** - G::LoadSystem('headPublisher'); - $oHeadPublisher =& headPublisher::getSingleton(); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/maborak.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/common.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/webResource.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'dveditor/core/dveditor.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/tree/tree.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'json/core/json.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/form.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/pagedTable.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'grid/core/grid.js' ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.panel.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.validator.js', true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.app.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.rpc.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.fx.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drag.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drop.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dom.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.abbr.js' , true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dashboard.js', true ); - $oHeadPublisher->addMaborakFile( PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/jscalendar/calendar.js' ); - //************ defining Virtual URLs ****************/ $virtualURITable = array(); $virtualURITable['/plugin/(*)'] = 'plugin'; @@ -172,7 +148,7 @@ $docuroot = explode ( PATH_SEP , $_SERVER['DOCUMENT_ROOT'] ); G::LoadSystem('tree'); $oHeadPublisher =& headPublisher::getSingleton(); - + //***************** database and workspace definition ************************ //if SYS_TEMP exists, the URL has a workspace, now we need to verify if exists their db.php file if ( defined('SYS_TEMP') && SYS_TEMP != '') diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index f98a1a59f..6342e1314 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -4897,6 +4897,49 @@ class G } } } + + public static function browserCacheFilesSetUid() + { + $arrayData = array(); + $arrayData["browser_cache_files_uid"] = G::generateUniqueID(); + + G::update_php_ini(PATH_CONFIG . "env.ini", $arrayData); + } + + public static function browserCacheFilesGetUid() + { + $sysConf = System::getSystemConfiguration(PATH_CONFIG . "env.ini"); + + return (isset($sysConf["browser_cache_files_uid"]))? $sysConf["browser_cache_files_uid"] : null; + } + + public static function browserCacheFilesSetUrl($url) + { + $browserCacheFilesUid = self::browserCacheFilesGetUid(); + + if ($browserCacheFilesUid != null) { + $arrayLibrary = array(); + + $library = json_decode(file_get_contents(PATH_HOME . "engine" . PATH_SEP . "bin" . PATH_SEP . "tasks" . PATH_SEP . "libraries.json")); + + foreach ($library as $index => $value) { + $lib = $value; + + if ($lib->build) { + $arrayLibrary[] = $lib->name . ".js"; + } + } + + $arrayAux = explode("/", $url); + $n = count($arrayAux); + + if ($n > 0 && !empty($arrayAux[$n - 1]) && array_search($arrayAux[$n - 1], $arrayLibrary) !== false) { + $url = $url . ((strpos($arrayAux[$n - 1], "?") !== false)? "&c=" : "?c=") . $browserCacheFilesUid; + } + } + + return $url; + } } /** diff --git a/gulliver/system/class.headPublisher.php b/gulliver/system/class.headPublisher.php index 36783f5e9..4f2dc8f8c 100644 --- a/gulliver/system/class.headPublisher.php +++ b/gulliver/system/class.headPublisher.php @@ -1,5 +1,4 @@ scriptFiles[$url] = $url; } @@ -213,21 +214,25 @@ class headPublisher $head = ''; $head .= '' . $this->title . "\n"; + foreach ($this->scriptFiles as $file) { $head .= "\n"; } + if (!in_array($this->translationsFile, $this->scriptFiles)) { $head .= "\n"; } $head .= "\n"; - $head .= "\n"; + $head .= "\n"; return $head; } @@ -689,4 +694,4 @@ class headPublisher $this->disableHeaderScripts = true; } } - \ No newline at end of file + diff --git a/workflow/engine/PmBootstrap.php b/workflow/engine/PmBootstrap.php index 989e0f73f..e9ef3f36a 100644 --- a/workflow/engine/PmBootstrap.php +++ b/workflow/engine/PmBootstrap.php @@ -138,46 +138,6 @@ class PmBootstrap extends Bootstrap } } - public function loadLeimud() - { - $oHeadPublisher = headPublisher::getSingleton(); - - // Defining the maborak js file, this file is the concat of many js files and here we are including all of them. - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/maborak.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/common.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/effects.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/core/webResource.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'dveditor/core/dveditor.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'tinymce/jscripts/tiny_mce/tiny_mce.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'common/tree/tree.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'json/core/json.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/form.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'form/core/pagedTable.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'grid/core/grid.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.panel.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.validator.js', true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.app.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.rpc.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.fx.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drag.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.drop.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dom.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.abbr.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'maborak/core/module.dashboard.js', true ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/js-calendar/js-calendar.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/suggest/bsn.AutoSuggest_2.1.3.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/tooltip/pmtooltip.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'thirdparty/krumo/krumo.js' ); - $oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . 'widgets/calendar/pmcalendar.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'cases/core/cases.js' , true ); - $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'cases/core/cases_Step.js', true ); - $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'processmap/core/processmap.js', true ); - $oHeadPublisher->addMaborakFile(PATH_CORE . 'js' . PATH_SEP . 'appFolder/core/appFolderList.js', true ); - $oHeadPublisher->addMaborakFile(PATH_THIRDPARTY . 'htmlarea/editor.js', true ); - - //$oHeadPublisher->addMaborakFile(PATH_GULLIVER_HOME . 'js' . PATH_SEP . "widgets/jscalendar/lang/calendar-" . SYS_LANG . ".js"); - } - public function dispatchResource() { $realPath = $this->matchRoute['path']; diff --git a/workflow/engine/bin/tasks/cliBrowserCacheFiles.php b/workflow/engine/bin/tasks/cliBrowserCacheFiles.php new file mode 100644 index 000000000..5009de68c --- /dev/null +++ b/workflow/engine/bin/tasks/cliBrowserCacheFiles.php @@ -0,0 +1,21 @@ +lookingforUidGrids( $sPRO_UID, $sDYNAFORM ); - $template->assign( 'siteUrl', $http . $_SERVER['HTTP_HOST'] ); - $template->assign( 'sysSys', SYS_SYS ); - $template->assign( 'sysLang', SYS_LANG ); - $template->assign( 'sysSkin', SYS_SKIN ); - $template->assign( 'processUid', $sPRO_UID ); - $template->assign( 'dynaformUid', $sDYNAFORM ); - $template->assign( 'taskUid', $sTASKS ); - $template->assign( 'dynFileName', $sPRO_UID . '/' . $sDYNAFORM ); - $template->assign( 'formId', $G_FORM->id ); - $template->assign( 'scriptCode', $scriptCode ); + $browserCacheFilesUid = G::browserCacheFilesGetUid(); + + $template->assign("BROWSER_CACHE_FILES_UID", ($browserCacheFilesUid != null)? "?c=" . $browserCacheFilesUid : null); + $template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]); + $template->assign("sysSys", SYS_SYS); + $template->assign("sysLang", SYS_LANG); + $template->assign("sysSkin", SYS_SKIN); + $template->assign("processUid", $sPRO_UID); + $template->assign("dynaformUid", $sDYNAFORM); + $template->assign("taskUid", $sTASKS); + $template->assign("dynFileName", $sPRO_UID . "/" . $sDYNAFORM); + $template->assign("formId", $G_FORM->id); + $template->assign("scriptCode", $scriptCode); if (sizeof( $sUidGrids ) > 0) { foreach ($sUidGrids as $k => $v) { @@ -167,4 +170,3 @@ try { G::RenderPage( 'publish', 'raw' ); } - diff --git a/workflow/engine/methods/services/login_getStarted.php b/workflow/engine/methods/services/login_getStarted.php index dc7853572..09a4e4806 100755 --- a/workflow/engine/methods/services/login_getStarted.php +++ b/workflow/engine/methods/services/login_getStarted.php @@ -29,6 +29,11 @@ $oTemplatePower->newBlock('users'); $oTemplatePower->assign('USR_UID', $aUser['USR_UID']); $oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')'); */ + +$browserCacheFilesUid = G::browserCacheFilesGetUid(); + +$oTemplatePower->assign("BROWSER_CACHE_FILES_UID", ($browserCacheFilesUid != null)? "?c=" . $browserCacheFilesUid : null); + $G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower ); G::RenderPage( 'publish', 'raw' ); diff --git a/workflow/engine/templates/processes/webentry.tpl b/workflow/engine/templates/processes/webentry.tpl index b2f34e5a7..474f54d1c 100755 --- a/workflow/engine/templates/processes/webentry.tpl +++ b/workflow/engine/templates/processes/webentry.tpl @@ -1,45 +1,46 @@ - - - - - - - - - - - - - - - - - -{scriptCode} - - - - - - - + + + + + + + + + + + + + + + + +{scriptCode} + + + + + + + diff --git a/workflow/engine/templates/services/login_getStarted.html b/workflow/engine/templates/services/login_getStarted.html index e9a748432..ec491a456 100755 --- a/workflow/engine/templates/services/login_getStarted.html +++ b/workflow/engine/templates/services/login_getStarted.html @@ -1,124 +1,125 @@ - - - - - - - - - - - - - - -
- - - - - Get Started -

Welcome to ProcessMaker!

-

To get started, log in using the following credentials. You can change them later:

- Username: admin
- Password: admin -

We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at http://www.processmaker.com/demos/

- - Other Resources:

- - PM Library - Import Templates
- - PM Wiki - Manuals
- - PM Forum - Ask Questions
- -

We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services contact us. -

-

The ProcessMaker Team

- - - Don't show me again - -
- - - - - \ No newline at end of file + + + + + + + + + + + + + + +
+ + + Get Started +

Welcome to ProcessMaker!

+

To get started, log in using the following credentials. You can change them later:

+ Username: admin
+ Password: admin +

We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at http://www.processmaker.com/demos/

+ + Other Resources:

+ + PM Library - Import Templates
+ + PM Wiki - Manuals
+ + PM Forum - Ask Questions
+ +

We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services contact us. +

+

The ProcessMaker Team

+ + Don't show me again +
+ + + + +