diff --git a/gulliver/js/form/core/form.js b/gulliver/js/form/core/form.js index 0463d8107..cd408f5fe 100755 --- a/gulliver/js/form/core/form.js +++ b/gulliver/js/form/core/form.js @@ -2906,7 +2906,7 @@ var validateForm = function(sRequiredFields) { swSubmitValidateForm = 0; sFormName = document.getElementById('__DynaformName__'); - if ((typeof(sFormName) != 'undefined' && sFormName != 'login') && (typeof(__usernameLogged__) != 'undefined' && __usernameLogged__ != '') ) { + if (typeof(__dynaformSVal__) != 'undefined' && (typeof(sFormName) != 'undefined' && sFormName != 'login') && (typeof(__usernameLogged__) != 'undefined' && __usernameLogged__ != '') ) { if (!sessionPersits()) { showPromptLogin('session'); @@ -3294,7 +3294,7 @@ var saveAndRefreshForm = function(oObject) { var sessionPersits = function() { var rpc = new leimnud.module.rpc.xmlhttp({ url: '../services/sessionPersists', - args: 'dynaformRestoreValues=' + __dynaformSVal__, + args: 'dynaformRestoreValues=' + (typeof(__dynaformSVal__) != 'undefined' ? __dynaformSVal__ : ''), async: false }); rpc.make(); diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 4e369bfc0..54ca9e1a9 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -1199,7 +1199,7 @@ vtext.failed();}else{vtext.passed();}} dropdowns=grids[j].getElementsByTagName('select');for(i=0;i0){sRequiredFields=sRequiredFields.replace(/%27/gi,'"');} if(typeof(sRequiredFields)!='object'||sRequiredFields.indexOf("%39")>0){sRequiredFields=sRequiredFields.replace(/%39/gi,"'");} aRequiredFields=eval(sRequiredFields);var sMessage='';var invalid_fields=Array();var fielEmailInvalid=Array();for(var i=0;i0){oAux[0].action+='&_REFRESH_=1';oAux[0].submit();}}};var sessionPersits=function(){var rpc=new leimnud.module.rpc.xmlhttp({url:'../services/sessionPersists',args:'dynaformRestoreValues='+__dynaformSVal__,async:false});rpc.make();var response=rpc.xmlhttp.responseText.parseJSON();return response.status;};var showPromptLogin=function(lastAction){lastActionPerformed=lastAction;promptPanel=new leimnud.module.panel();promptPanel.options={statusBarButtons:[{value:_('LOGIN')}],position:{center:true},size:{w:300,h:130},control:{close:false,resize:false},fx:{modal:true}};promptPanel.setStyle={content:{padding:10,paddingBottom:2,textAlign:'left',paddingLeft:50,backgroundRepeat:'no-repeat',backgroundPosition:'10 50%',backgroundColor:'transparent',borderWidth:0}};promptPanel.make();promptPanel.addContent(_('ID_DYNAFORM_EDITOR_LOGIN_AGAIN'));promptPanel.addContent('
');var thePassword=$dce('input');thePassword.type='password';thePassword.id='thePassword';leimnud.dom.setStyle(thePassword,{font:'normal 8pt Tahoma,MiscFixed',color:'#000',width:'100%',marginTop:3,backgroundColor:'white',border:'1px solid #919B9C'});promptPanel.addContent(thePassword);thePassword.focus();thePassword.onkeyup=function(evt) +else{var oAux=window.document.getElementsByTagName('form');if(oAux.length>0){oAux[0].action+='&_REFRESH_=1';oAux[0].submit();}}};var sessionPersits=function(){var rpc=new leimnud.module.rpc.xmlhttp({url:'../services/sessionPersists',args:'dynaformRestoreValues='+(typeof(__dynaformSVal__)!='undefined'?__dynaformSVal__:''),async:false});rpc.make();var response=rpc.xmlhttp.responseText.parseJSON();return response.status;};var showPromptLogin=function(lastAction){lastActionPerformed=lastAction;promptPanel=new leimnud.module.panel();promptPanel.options={statusBarButtons:[{value:_('LOGIN')}],position:{center:true},size:{w:300,h:130},control:{close:false,resize:false},fx:{modal:true}};promptPanel.setStyle={content:{padding:10,paddingBottom:2,textAlign:'left',paddingLeft:50,backgroundRepeat:'no-repeat',backgroundPosition:'10 50%',backgroundColor:'transparent',borderWidth:0}};promptPanel.make();promptPanel.addContent(_('ID_DYNAFORM_EDITOR_LOGIN_AGAIN'));promptPanel.addContent('
');var thePassword=$dce('input');thePassword.type='password';thePassword.id='thePassword';leimnud.dom.setStyle(thePassword,{font:'normal 8pt Tahoma,MiscFixed',color:'#000',width:'100%',marginTop:3,backgroundColor:'white',border:'1px solid #919B9C'});promptPanel.addContent(thePassword);thePassword.focus();thePassword.onkeyup=function(evt) {var evt=(window.event)?window.event:evt;var key=(evt.which)?evt.which:evt.keyCode;if(key==13){verifyLogin();}}.extend(this);promptPanel.fixContent();promptPanel.elements.statusBarButtons[0].onmouseup=verifyLogin;};var verifyLogin=function(){if(document.getElementById('thePassword').value.trim()==''){alert(_('ID_WRONG_PASS'));return;} var rpc=new leimnud.module.rpc.xmlhttp({url:'../login/authentication',args:'form[USR_USERNAME]='+__usernameLogged__+'&form[USR_PASSWORD]='+document.getElementById('thePassword').value.trim()+'&form[USR_LANG]='+SYS_LANG});rpc.callback=function(rpc){if(rpc.xmlhttp.responseText.indexOf('form[USR_USERNAME]')==-1){promptPanel.remove();lastActionPerformed='';}else{alert(_('ID_WRONG_PASS'));}}.extend(this);rpc.make();};var saveForm=function(oObject,actionParameter){if(oObject){var actionUrl=actionParameter||oObject.form.action.replace('cases_SaveData','saveForm');ajax_post(actionUrl,oObject.form,'POST');} else{var oAux=window.document.getElementsByTagName('form');if(oAux.length>0){var actionUrl=actionParameter||oAux[0].action.replace('cases_SaveData','saveForm');ajax_post(actionUrl,oAux[0],'POST');}}};var validateURL=function(url){var regexp=/http?s?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/;if(regexp.test(url)){return true;}else{return false;}};var saveAndRedirectForm=function(oObject,oLocation){saveForm(oObject);if(validateURL(oLocation)){if(typeof(parent)!="undefined"){parent.location.href=oLocation;}else{document.location.href=oLocation;}}};var removeRequiredById=function(sFieldName){if(!notValidateThisFields.inArray(sFieldName)){notValidateThisFields.push(sFieldName);var oAux=document.getElementById('__notValidateThisFields__');if(oAux){oAux.value=notValidateThisFields.toJSONString();}}};var enableRequiredById=function(sFieldName){if(notValidateThisFields.inArray(sFieldName)){var i;var aAux=[];for(i=0;i0){for(i=0;i<=oObj.aFunctions.length-1;i++){elem=document.getElementById("form["+oObj.sGridName+"][1]["+oObj.aFunctions[i].sFieldName+"]");if(elem){switch(oObj.aFunctions[i].sFunction){case"sum":oObj.sum(false,elem);break;case"avg":oObj.avg(false,elem);break;}}}} if(oObj.ondeleterow){oObj.ondeleterow(iRow);}};this.clearRowWC=function(oObj,aRow) -{var i=0;var pmLabel='';var elemNodeName='';var objects='';for(i=1;i0){pmLabel='';for(iAux=0;iAux<=objects[0].attributes.length-1;iAux++){if(objects[0].attributes[iAux].name=="pm:label"){pmLabel=objects[0].attributes[iAux].nodeValue;break;}} for(j=0;jid}; var i; function loadForm_{$form->id}(ajaxServer) {literal}{{/literal} +swSubmitValidateForm = 1; if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}'); var myForm=form_{$form->id}; diff --git a/workflow/engine/bin/tasks/cliHotfix.php b/workflow/engine/bin/tasks/cliHotfix.php new file mode 100644 index 000000000..2264815ad --- /dev/null +++ b/workflow/engine/bin/tasks/cliHotfix.php @@ -0,0 +1,48 @@ + 0) { + //Install hotfix + foreach ($arrayFile as $value) { + $f = $value; + + $result = workspaceTools::hotfixInstall($f); + + CLI::logging($result["message"] . "\n"); + } + + //Clear server's cache + CLI::logging("\nClearing cache...\n"); + + if (defined("PATH_C")) { + G::rm_dir(PATH_C); + G::mk_dir(PATH_C, 0777); + } + + //Safe upgrade for JavaScript files + CLI::logging("\nSafe upgrade for files cached by the browser\n\n"); + + G::browserCacheFilesSetUid(); + + CLI::logging("HOTFIX done\n"); + } else { + CLI::logging("Please specify the hotfix to install\n"); + } +} + diff --git a/workflow/engine/bin/tasks/cliWorkspaces.php b/workflow/engine/bin/tasks/cliWorkspaces.php index 661396509..f28e8efbf 100755 --- a/workflow/engine/bin/tasks/cliWorkspaces.php +++ b/workflow/engine/bin/tasks/cliWorkspaces.php @@ -160,6 +160,18 @@ EOT CLI::taskArg('workspace-name', true, true); CLI::taskRun(run_translation_upgrade); +CLI::taskName('migrate-cases-folders'); +CLI::taskDescription(<<name) . "\n"); + $workspace->updateStructureDirectories($workspace->name); + $workspace->close(); + } catch (Exception $e) { + CLI::logging("Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n"); + $errors = true; + } + } +} + + diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php index a63569d04..02d494bb5 100755 --- a/workflow/engine/classes/class.case.php +++ b/workflow/engine/classes/class.case.php @@ -1960,6 +1960,12 @@ class Cases G::LoadClass('derivation'); $oDerivation = new Derivation(); $oDerivation->setTasLastAssigned($sTasUid, $sUsrUid); + + // Execute Events + require_once 'classes/model/Event.php'; + $event = new Event(); + $event->createAppEvents($sProUid, $sAppUid, $iDelIndex, $sTasUid); + //update searchindex if ($this->appSolr != null) { $this->appSolr->updateApplicationSearchIndex($sAppUid); diff --git a/workflow/engine/classes/class.dynaformEditor.php b/workflow/engine/classes/class.dynaformEditor.php index c74d811d2..9eddb2865 100755 --- a/workflow/engine/classes/class.dynaformEditor.php +++ b/workflow/engine/classes/class.dynaformEditor.php @@ -543,6 +543,18 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax public function set_htmlcode($A, $htmlcode) { try { + $iOcurrences = preg_match_all('/\{[\S*\<[^\>]*\S*\s*\>*\S*]*\$\S*\<[^\>]*\S*\s*\>*\S*\}/im', $htmlcode, $matches); + if ($iOcurrences) { + if (isset($matches[0])) { + $tagsHtml = $matches[0]; + foreach ($tagsHtml as $value) { + $aTagVar = str_replace("{", "{", $value); + $aTagVar = str_replace("}", "}", $aTagVar); + $aTagVar = str_replace("$", "$", $aTagVar); + $htmlcode = str_replace($value, $aTagVar, $htmlcode); + } + } + } $file = G::decrypt($A, URL_KEY); $form = new Form($file, PATH_DYNAFORM, SYS_LANG, true); $filename = substr($form->fileName, 0, - 3) . ($form->type === 'xmlform' ? '' : '.' . $form->type) . 'html'; diff --git a/workflow/engine/classes/class.system.php b/workflow/engine/classes/class.system.php index b4dc10715..1d83b53ac 100755 --- a/workflow/engine/classes/class.system.php +++ b/workflow/engine/classes/class.system.php @@ -1096,10 +1096,10 @@ class System $md5 = array (); if ($readGlobalIniFile) { - $md5[] = md5_file( $globalIniFile ); + $md5[] = @md5_file( $globalIniFile ); } if ($readWsIniFile) { - $md5[] = md5_file( $wsIniFile ); + $md5[] = @md5_file( $wsIniFile ); } $hash = implode( '-', $md5 ); diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index bafa964fd..6565710e3 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -89,7 +89,14 @@ class workspaceTools $stop = microtime(true); $final = $stop - $start; CLI::logging("<*> Updating cache view Process took $final seconds.\n"); + } + /** + * Updating cases directories structure + * + */ + public function updateStructureDirectories($workSpace = SYS_SYS) + { $start = microtime(true); CLI::logging("> Updating cases directories structure...\n"); $this->upgradeCasesDirectoryStructure($workSpace); @@ -548,7 +555,7 @@ class workspaceTools rmdir($UIdDir);//remove the diretory itself, G::rm_dir cannot do it } else { CLI::logging(CLI::error("Error: Failure at coping from $UIdDir...\n")); - } + } } else { CLI::logging("$UIdDir is empty, removing it\n"); rmdir($UIdDir);//remove the diretory itself @@ -575,7 +582,7 @@ class workspaceTools unlink($file[$index]); } else { CLI::logging(CLI::error("Error: Failure at copy $file[$index] files...\n")); - } + } } } @@ -583,13 +590,17 @@ class workspaceTools $this->initPropel(true); G::LoadClass("configuration"); $conf = new Configurations(); - if ($conf->exists("ENVIRONMENT_SETTINGS")) { - $conf->setDirectoryStructureVer(2); - CLI::logging(CLI::info("Version Directory Structure is 2 now.\n")); - } else { - CLI::logging(CLI::error("Error: found at try to use ENVIRONMENT_SETTINGS row.\n")); - return; + if (!$conf->exists("ENVIRONMENT_SETTINGS")) { + $conf->aConfig = array ("format" => '@userName (@firstName @lastName)', + "dateFormat" => 'd/m/Y', + "startCaseHideProcessInf" => false, + "casesListDateFormat" => 'Y-m-d H:i:s', + "casesListRowNumber" => 25, + "casesListRefreshTime" => 120 ); + $conf->saveConfig( 'ENVIRONMENT_SETTINGS', '' ); } + $conf->setDirectoryStructureVer(2); + CLI::logging(CLI::info("Version Directory Structure is 2 now.\n")); } /** @@ -622,7 +633,7 @@ class workspaceTools $this->upgradeData(); p11835::execute(); return true; - } + } /** * Upgrade this workspace database from a schema @@ -1180,12 +1191,12 @@ class workspaceTools if (isset($srcWorkspace) && !in_array("$srcWorkspace.meta", array_map(BASENAME, $metaFiles))) { throw new Exception("Workspace $srcWorkspace not found in backup"); } - + $version = System::getVersion(); $version = explode('-', $version); $versionPresent = ( isset($version[0])) ? $version[0] : ''; CLI::logging(CLI::warning(" - Note.- If you try to execute a restore from a generated backup on a recent version of Processmaker + Note.- If you try to execute a restore from a generated backup on a recent version of Processmaker than version you are using currently to restore it, it may be occur errors on the restore process, it shouldn't be restaured generated backups on later versions than version when the restore is executed") . "\n"); @@ -1285,7 +1296,7 @@ class workspaceTools $stop = microtime(true); $final = $stop - $start; CLI::logging("<*> Updating cache view Process took $final seconds.\n"); - + mysql_close($link); } @@ -1296,5 +1307,55 @@ class workspaceTools CLI::logging(CLI::info("Done restoring") . "\n"); } + + public static function hotfixInstall($file) + { + $result = array(); + + $dirHotfix = PATH_DATA . "hotfixes"; + + $arrayPathInfo = pathinfo($file); + + $f = ($arrayPathInfo["dirname"] == ".")? $dirHotfix . PATH_SEP . $file : $file; + + $swv = 1; + $msgv = ""; + + if (!file_exists($dirHotfix)) { + G::mk_dir($dirHotfix, 0777); + } + + if (!file_exists($f)) { + $swv = 0; + $msgv = $msgv . (($msgv != "")? "\n": null) . "- The file \"$f\" does not exist"; + } + + if ($arrayPathInfo["extension"] != "tar") { + $swv = 0; + $msgv = $msgv . (($msgv != "")? "\n": null) . "- The file extension \"$file\" is not \"tar\""; + } + + if ($swv == 1) { + G::LoadThirdParty("pear/Archive", "Tar"); + + //Extract + $tar = new Archive_Tar($f); + + $swTar = $tar->extract(PATH_OUTTRUNK); //true on success, false on error + + if ($swTar) { + $result["status"] = 1; + $result["message"] = "- Hotfix installed successfully \"$f\""; + } else { + $result["status"] = 0; + $result["message"] = "- Could not extract file \"$f\""; + } + } else { + $result["status"] = 0; + $result["message"] = $msgv; + } + + return $result; + } } diff --git a/workflow/engine/classes/model/AppNotes.php b/workflow/engine/classes/model/AppNotes.php index 566359efb..69b83aaf3 100755 --- a/workflow/engine/classes/model/AppNotes.php +++ b/workflow/engine/classes/model/AppNotes.php @@ -229,7 +229,7 @@ class AppNotes extends BaseAppNotes } $oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $aConfiguration['MESS_PASSWORD'],'SMTPAuth' => $aConfiguration['MESS_RAUTH'] == '1' ? true : false,'SMTPSecure' => isset( $aConfiguration['SMTPSecure'] ) ? $aConfiguration['SMTPSecure'] : '') ); - $oSpool->create( array ('msg_uid' => '','app_uid' => $appUid,'del_index' => 1,'app_msg_type' => 'DERIVATION','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $sTo,'app_msg_body' => $sBody,'app_msg_cc' => '','app_msg_bcc' => '','app_msg_attach' => '','app_msg_template' => '','app_msg_status' => 'pending') ); + $oSpool->create( array ('msg_uid' => '','app_uid' => $appUid,'del_index' => 0,'app_msg_type' => 'DERIVATION','app_msg_subject' => $sSubject,'app_msg_from' => $sFrom,'app_msg_to' => $sTo,'app_msg_body' => $sBody,'app_msg_cc' => '','app_msg_bcc' => '','app_msg_attach' => '','app_msg_template' => '','app_msg_status' => 'pending') ); if (($aConfiguration['MESS_BACKGROUND'] == '') || ($aConfiguration['MESS_TRY_SEND_INMEDIATLY'] == '1')) { $oSpool->sendMail(); } diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php index 81d1e688e..b6508cfb8 100755 --- a/workflow/engine/classes/model/Translation.php +++ b/workflow/engine/classes/model/Translation.php @@ -260,6 +260,7 @@ class Translation extends BaseTranslation $POFile = new i18n_PO( $languageFile ); $POFile->readInit(); while ($rowTranslation = $POFile->getTranslation()) { + $context = ''; foreach ($POFile->translatorComments as $a => $aux) { $aux = trim( $aux ); if ($aux == 'TRANSLATION') { @@ -281,7 +282,7 @@ class Translation extends BaseTranslation } } } - if ($identifier == 'TRANSLATION') { + if ($identifier == 'TRANSLATION' && $context != '') { list ($category, $id) = explode( '/', $context ); $translation[$id] = $rowTranslation['msgstr'] ; } diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index c7d63d0a6..faad85ca8 100644 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -1,8 +1,8 @@ msgid "" msgstr "" -"Project-Id-Version: ProcessMaker (Branch master) 2.5.1-testing.2\n" +"Project-Id-Version: ProcessMaker (Branch master) 2.5.1-testing.3\n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2013-06-05 13:33:25\n" +"PO-Revision-Date: 2013-06-26 12:29:31\n" "Last-Translator: \n" "Language-Team: Colosa Developers Team \n" "MIME-Version: 1.0\n" @@ -5236,8 +5236,8 @@ msgstr "Off" # TRANSLATION # LABEL/ID_NO_SELECTION_WARNING #: LABEL/ID_NO_SELECTION_WARNING -msgid "Select a item from the list please." -msgstr "Select a item from the list please." +msgid "One item should be selected in order to execute the action." +msgstr "One item should be selected in order to execute the action." # TRANSLATION # JAVASCRIPT/ID_REQUIRED_NAME_TRIGGERS @@ -12940,8 +12940,8 @@ msgstr "Could not create the installation log" # TRANSLATION # LABEL/ID_PREVIUS #: LABEL/ID_PREVIUS -msgid "Previus" -msgstr "Previus" +msgid "[LABEL/ID_PREVIUS] Previous" +msgstr "Previous" # TRANSLATION # LABEL/ID_UPLOAD_COMPLETE @@ -14905,6 +14905,30 @@ msgstr "You forgot the name of the Case Scheduler" msgid "Duplicate Case Scheduler name." msgstr "Duplicate Case Scheduler name." +# TRANSLATION +# LABEL/ID_MSG_CLEAR_GRID_FIRST_ITEM +#: LABEL/ID_MSG_CLEAR_GRID_FIRST_ITEM +msgid "Do you want to clear the information from the first row?" +msgstr "Do you want to clear the information from the first row?" + +# TRANSLATION +# LABEL/ID_FROM_NAME +#: LABEL/ID_FROM_NAME +msgid "From name" +msgstr "From name" + +# TRANSLATION +# LABEL/ID_ACCEPT +#: LABEL/ID_ACCEPT +msgid "[LABEL/ID_ACCEPT] Accept" +msgstr "Accept" + +# TRANSLATION +# LABEL/ID_ERROR_SEND_NOTIFICATIONS +#: LABEL/ID_ERROR_SEND_NOTIFICATIONS +msgid "The following error has occurred when trying to send the notifications:" +msgstr "The following error has occurred when trying to send the notifications:" + # additionalTables/additionalTablesData.xml?ADD_TAB_NAME # additionalTables/additionalTablesData.xml #: text - ADD_TAB_NAME diff --git a/workflow/engine/controllers/home.php b/workflow/engine/controllers/home.php index 72946706d..27eab0fcd 100755 --- a/workflow/engine/controllers/home.php +++ b/workflow/engine/controllers/home.php @@ -360,11 +360,6 @@ class Home extends Controller $_SESSION['STEP_POSITION'] = 0; $_SESSION['CASES_REFRESH'] = true; - // Execute Events - require_once 'classes/model/Event.php'; - $event = new Event(); - $event->createAppEvents( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK'] ); - $oCase = new Cases(); $aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] ); //../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo diff --git a/workflow/engine/data/mssql/insert.sql b/workflow/engine/data/mssql/insert.sql index f054d42a5..6d02409da 100755 --- a/workflow/engine/data/mssql/insert.sql +++ b/workflow/engine/data/mssql/insert.sql @@ -3150,7 +3150,7 @@ SELECT 'LABEL','ID_ON','en','On','2013-05-15' UNION ALL SELECT 'LABEL','ID_OFF','en','Off','2013-05-15' UNION ALL -SELECT 'LABEL','ID_NO_SELECTION_WARNING','en','Select a item from the list please.','2013-05-15' +SELECT 'LABEL','ID_NO_SELECTION_WARNING','en','One item should be selected in order to execute the action.','2013-06-14' UNION ALL SELECT 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2013-05-15' UNION ALL @@ -5750,7 +5750,7 @@ SELECT 'LABEL','ID_DOES_NOT_EXIST','en','does not exist','2013-03-07' UNION ALL SELECT 'LABEL','ID_CREATE_LOG_INSTALLATION','en','Could not create the installation log','2013-03-07' UNION ALL -SELECT 'LABEL','ID_PREVIUS','en','Previus','2013-03-07' +SELECT 'LABEL','ID_PREVIUS','en','Previous','2013-06-13' UNION ALL SELECT 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2013-03-07' UNION ALL @@ -6415,6 +6415,14 @@ INSERT INTO [TRANSLATION] ([TRN_CATEGORY],[TRN_ID],[TRN_LANG],[TRN_VALUE],[TRN_U SELECT 'LABEL','ID_REQUIRED_NAME_CASE_SCHEDULER','en','You forgot the name of the Case Scheduler','2013-05-28' UNION ALL SELECT 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2013-05-28' + UNION ALL +SELECT 'LABEL','ID_MSG_CLEAR_GRID_FIRST_ITEM','en','Do you want to clear the information from the first row?','2013-06-13' + UNION ALL +SELECT 'LABEL','ID_FROM_NAME','en','From name','2013-06-14' + UNION ALL +SELECT 'LABEL','ID_ACCEPT','en','Accept','2013-06-17' + UNION ALL +SELECT 'LABEL','ID_ERROR_SEND_NOTIFICATIONS','en','The following error has occurred when trying to send the notifications:','2013-06-19' ; INSERT INTO ISO_LOCATION ([IC_UID],[IL_UID],[IL_NAME],[IL_NORMAL_NAME],[IS_UID]) diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index d70610dfc..f5c78e688 100755 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -2280,7 +2280,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_PRO_CREATE_DATE','en','Create Date','2013-05-15') , ( 'LABEL','ID_ON','en','On','2013-05-15') , ( 'LABEL','ID_OFF','en','Off','2013-05-15') , -( 'LABEL','ID_NO_SELECTION_WARNING','en','Select a item from the list please.','2013-05-15') , +( 'LABEL','ID_NO_SELECTION_WARNING','en','One item should be selected in order to execute the action.','2013-06-14') , ( 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2013-05-15') , ( 'JAVASCRIPT','ID_EXIST_PROCESS','en','There is a process with the same name. this process will not save','2013-05-15') , ( 'JAVASCRIPT','ID_EXIST_DYNAFORM','en','There is a Dynaform with the same name in this process. It is not saving','2013-05-15') , @@ -3596,7 +3596,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_DIRECTORIES_NOT_WRITABLE','en','Some directories and/or files inside it are not writable','2013-03-07') , ( 'LABEL','ID_DOES_NOT_EXIST','en','does not exist','2013-03-07') , ( 'LABEL','ID_CREATE_LOG_INSTALLATION','en','Could not create the installation log','2013-03-07') , -( 'LABEL','ID_PREVIUS','en','Previus','2013-03-07') , +( 'LABEL','ID_PREVIUS','en','Previous','2013-06-13') , ( 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2013-03-07') , ( 'LABEL','ID_CREATE_FOLDER','en','Create New Folder','2013-03-07') , ( 'LABEL','ID_UPLOAD_LEAST_FILE','en','You may upload at least one file','2013-03-07') , @@ -3933,7 +3933,11 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES ( 'LABEL','ID_REQUIRED_NAME_CASE_SCHEDULER','en','You forgot the name of the Case Scheduler','2013-05-28') , -( 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2013-05-28') ; +( 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2013-05-28') , +( 'LABEL','ID_MSG_CLEAR_GRID_FIRST_ITEM','en','Do you want to clear the information from the first row?','2013-06-13') , +( 'LABEL','ID_FROM_NAME','en','From name','2013-06-14') , +( 'LABEL','ID_ACCEPT','en','Accept','2013-06-17') , +( 'LABEL','ID_ERROR_SEND_NOTIFICATIONS','en','The following error has occurred when trying to send the notifications:','2013-06-19') ; INSERT INTO ISO_LOCATION (IC_UID,IL_UID,IL_NAME,IL_NORMAL_NAME,IS_UID) VALUES ('AD','','',' ','') , diff --git a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php index 55a357931..73fbcc018 100644 --- a/workflow/engine/methods/cases/caseMessageHistory_Ajax.php +++ b/workflow/engine/methods/cases/caseMessageHistory_Ajax.php @@ -58,23 +58,36 @@ if ($actionAjax == 'messageHistoryGridList_JXP') { $delIndex = array(); $respMess = ""; - if (count($respView['MSGS_HISTORY'])>0) { - $respMess = $respView['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + + if (count($respView["MSGS_HISTORY"]) > 0) { + $respMess = $respView["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respView["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respView["MSGS_HISTORY"]["DEL_INDEX"]; + } + } else { - if (count($respBlock['MSGS_HISTORY'])>0) { - $respMess = $respBlock['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + if (count($respBlock["MSGS_HISTORY"]) > 0) { + $respMess = $respBlock["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"]; + } + } else { - if (count($respResend['MSGS_HISTORY'])>0) { - $respMess = $respResend['MSGS_HISTORY']['PERMISSION']; - $delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; + if (count($respResend["MSGS_HISTORY"]) > 0) { + + $respMess = $respResend["MSGS_HISTORY"]["PERMISSION"]; + + if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) { + $delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"]; + } } } } foreach ($appMessageArray as $index => $value) { - if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) && + if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) && ($appMessageArray[$index]['DEL_INDEX'] == 0 || in_array($appMessageArray[$index]['DEL_INDEX'], $delIndex ))) { $appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID']; if ($respMess == 'BLOCK' || $respMess == '') { diff --git a/workflow/engine/methods/cases/casesStartPage_Ajax.php b/workflow/engine/methods/cases/casesStartPage_Ajax.php index a902122f0..8c88391ef 100755 --- a/workflow/engine/methods/cases/casesStartPage_Ajax.php +++ b/workflow/engine/methods/cases/casesStartPage_Ajax.php @@ -250,11 +250,6 @@ function startCase () $_SESSION['CASES_REFRESH'] = true; - // Execute Events - require_once 'classes/model/Event.php'; - $event = new Event(); - $event->createAppEvents( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK'] ); - $oCase = new Cases(); $aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] ); diff --git a/workflow/engine/methods/cases/cases_Step.php b/workflow/engine/methods/cases/cases_Step.php index cf2870d92..1fc7baa2c 100755 --- a/workflow/engine/methods/cases/cases_Step.php +++ b/workflow/engine/methods/cases/cases_Step.php @@ -184,7 +184,11 @@ try { //Obtain previous and next step - End $aRequiredFields = array( - 'APP_DATA' => $Fields['APP_DATA'] + 'APPLICATION' => $Fields['APP_DATA']['APPLICATION'], + 'PROCESS' => $Fields['APP_DATA']['PROCESS'], + 'TASK' => $Fields['APP_DATA']['TASK'], + 'INDEX' => $Fields['APP_DATA']['INDEX'], + 'TRIGGER_DEBUG' => $Fields['APP_DATA']['TRIGGER_DEBUG'] ); $oHeadPublisher->addScriptCode('var __dynaformSVal__ = \'' . base64_encode(serialize($aRequiredFields)) . '\'; '); diff --git a/workflow/engine/methods/services/sessionPersists.php b/workflow/engine/methods/services/sessionPersists.php index d13aa2764..e43c711d1 100755 --- a/workflow/engine/methods/services/sessionPersists.php +++ b/workflow/engine/methods/services/sessionPersists.php @@ -34,25 +34,21 @@ if (isset($_REQUEST['dynaformEditorParams'])) { if (isset($_REQUEST['dynaformRestoreValues'])) { $aRetValues = unserialize(stripslashes(base64_decode($_REQUEST['dynaformRestoreValues']))); - - if (isset($aRetValues['APP_DATA'])) { - $_SESSION['APP_DATA'] = $aRetValues['APP_DATA']; - - if (isset($aRetValues['APP_DATA']['APPLICATION'])) { - $_SESSION['APPLICATION'] = $aRetValues['APP_DATA']['APPLICATION']; - } - if (isset($aRetValues['APP_DATA']['PROCESS'])) { - $_SESSION['PROCESS'] = $aRetValues['APP_DATA']['PROCESS']; - } - if (isset($aRetValues['APP_DATA']['TASK'])) { - $_SESSION['TASK'] = $aRetValues['APP_DATA']['TASK']; - } - if (isset($aRetValues['APP_DATA']['INDEX'])) { - $_SESSION['INDEX'] = $aRetValues['APP_DATA']['INDEX']; - } - if (isset($aRetValues['APP_DATA']['TRIGGER_DEBUG'])) { - $_SESSION['TRIGGER_DEBUG'] = $aRetValues['APP_DATA']['TRIGGER_DEBUG']; - } + + if (isset($aRetValues['APPLICATION'])) { + $_SESSION['APPLICATION'] = $aRetValues['APPLICATION']; + } + if (isset($aRetValues['PROCESS'])) { + $_SESSION['PROCESS'] = $aRetValues['PROCESS']; + } + if (isset($aRetValues['TASK'])) { + $_SESSION['TASK'] = $aRetValues['TASK']; + } + if (isset($aRetValues['INDEX'])) { + $_SESSION['INDEX'] = $aRetValues['INDEX']; + } + if (isset($aRetValues['TRIGGER_DEBUG'])) { + $_SESSION['TRIGGER_DEBUG'] = $aRetValues['TRIGGER_DEBUG']; } } die(G::json_encode($response)); \ No newline at end of file diff --git a/workflow/engine/methods/setup/environmentSettingsAjax.php b/workflow/engine/methods/setup/environmentSettingsAjax.php index 9224e62d5..96116c955 100755 --- a/workflow/engine/methods/setup/environmentSettingsAjax.php +++ b/workflow/engine/methods/setup/environmentSettingsAjax.php @@ -36,10 +36,15 @@ switch ($request) { break; case "save": $conf = new Configurations(); + $config = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "" ); + $config['format'] = $_POST["userFormat"]; + $config['dateFormat'] = $_POST["dateFormat"]; + $config['startCaseHideProcessInf'] = ((isset( $_POST["hideProcessInf"] )) ? true : false); + $config['casesListDateFormat'] = $_POST["casesListDateFormat"]; + $config['casesListRowNumber'] = intval( $_POST["casesListRowNumber"] ); + $config['casesListRefreshTime'] = intval( $_POST["txtCasesRefreshTime"]); - $conf->aConfig = array ("format" => $_POST["userFormat"],"dateFormat" => $_POST["dateFormat"],"startCaseHideProcessInf" => ((isset( $_POST["hideProcessInf"] )) ? true : false),"casesListDateFormat" => $_POST["casesListDateFormat"],"casesListRowNumber" => intval( $_POST["casesListRowNumber"] ),"casesListRefreshTime" => intval( $_POST["txtCasesRefreshTime"] ) - ); - + $conf->aConfig = $config; $conf->saveConfig( "ENVIRONMENT_SETTINGS", "" ); $response = new stdclass(); diff --git a/workflow/engine/templates/filterform.html b/workflow/engine/templates/filterform.html index dc39fd299..a8d96c2e2 100755 --- a/workflow/engine/templates/filterform.html +++ b/workflow/engine/templates/filterform.html @@ -3,7 +3,7 @@
-