Merge branch 'master' of git://github.com/colosa/processmaker into BUG-11603

This commit is contained in:
Luis Fernando Saisa Lopez
2013-07-01 15:44:00 +00:00
31 changed files with 326 additions and 96 deletions

View File

@@ -2906,7 +2906,7 @@ var validateForm = function(sRequiredFields) {
swSubmitValidateForm = 0; swSubmitValidateForm = 0;
sFormName = document.getElementById('__DynaformName__'); 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()) { if (!sessionPersits()) {
showPromptLogin('session'); showPromptLogin('session');
@@ -3294,7 +3294,7 @@ var saveAndRefreshForm = function(oObject) {
var sessionPersits = function() { var sessionPersits = function() {
var rpc = new leimnud.module.rpc.xmlhttp({ var rpc = new leimnud.module.rpc.xmlhttp({
url: '../services/sessionPersists', url: '../services/sessionPersists',
args: 'dynaformRestoreValues=' + __dynaformSVal__, args: 'dynaformRestoreValues=' + (typeof(__dynaformSVal__) != 'undefined' ? __dynaformSVal__ : ''),
async: false async: false
}); });
rpc.make(); rpc.make();

View File

@@ -1199,7 +1199,7 @@ vtext.failed();}else{vtext.passed();}}
dropdowns=grids[j].getElementsByTagName('select');for(i=0;i<dropdowns.length;i++){var vtext=new input(dropdowns[i]);if(dropdowns[i].getAttribute("pm:required")=="1"&&dropdowns[i].value.trim()==""){$label=dropdowns[i].name.split("[");$labelPM=dropdowns[i].getAttribute("pm:label");if($labelPM==''||$labelPM==null){$fieldName=$label[3].split("]")[0]+" "+$label[2].split("]")[0];}else{$fieldName=$labelPM+" "+$label[2].split("]")[0];} dropdowns=grids[j].getElementsByTagName('select');for(i=0;i<dropdowns.length;i++){var vtext=new input(dropdowns[i]);if(dropdowns[i].getAttribute("pm:required")=="1"&&dropdowns[i].value.trim()==""){$label=dropdowns[i].name.split("[");$labelPM=dropdowns[i].getAttribute("pm:label");if($labelPM==''||$labelPM==null){$fieldName=$label[3].split("]")[0]+" "+$label[2].split("]")[0];}else{$fieldName=$labelPM+" "+$label[2].split("]")[0];}
fieldGridName=$label[1]+"["+$label[2]+"["+$label[3].split("]")[0];if(!notValidateThisFields.inArray(fieldGridName)){invalidFields.push($fieldName);} fieldGridName=$label[1]+"["+$label[2]+"["+$label[3].split("]")[0];if(!notValidateThisFields.inArray(fieldGridName)){invalidFields.push($fieldName);}
vtext.failed();}else{vtext.passed();}}} vtext.failed();}else{vtext.passed();}}}
return(invalidFields);};var swSubmitValidateForm=1;var validateForm=function(sRequiredFields){if(swSubmitValidateForm==1){swSubmitValidateForm=0;sFormName=document.getElementById('__DynaformName__');if((typeof(sFormName)!='undefined'&&sFormName!='login')&&(typeof(__usernameLogged__)!='undefined'&&__usernameLogged__!='')){if(!sessionPersits()){showPromptLogin('session');swSubmitValidateForm=1;return false;}} return(invalidFields);};var swSubmitValidateForm=1;var validateForm=function(sRequiredFields){if(swSubmitValidateForm==1){swSubmitValidateForm=0;sFormName=document.getElementById('__DynaformName__');if(typeof(__dynaformSVal__)!='undefined'&&(typeof(sFormName)!='undefined'&&sFormName!='login')&&(typeof(__usernameLogged__)!='undefined'&&__usernameLogged__!='')){if(!sessionPersits()){showPromptLogin('session');swSubmitValidateForm=1;return false;}}
if(typeof(sRequiredFields)!='object'||sRequiredFields.indexOf("%27")>0){sRequiredFields=sRequiredFields.replace(/%27/gi,'"');} if(typeof(sRequiredFields)!='object'||sRequiredFields.indexOf("%27")>0){sRequiredFields=sRequiredFields.replace(/%27/gi,'"');}
if(typeof(sRequiredFields)!='object'||sRequiredFields.indexOf("%39")>0){sRequiredFields=sRequiredFields.replace(/%39/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;i<aRequiredFields.length;i++){aRequiredFields[i].label=(aRequiredFields[i].label=='')?aRequiredFields[i].name:aRequiredFields[i].label;if(!notValidateThisFields.inArray(aRequiredFields[i].name)){if(typeof aRequiredFields[i].required!='undefined'){required=aRequiredFields[i].required;}else{required=1;} aRequiredFields=eval(sRequiredFields);var sMessage='';var invalid_fields=Array();var fielEmailInvalid=Array();for(var i=0;i<aRequiredFields.length;i++){aRequiredFields[i].label=(aRequiredFields[i].label=='')?aRequiredFields[i].name:aRequiredFields[i].label;if(!notValidateThisFields.inArray(aRequiredFields[i].name)){if(typeof aRequiredFields[i].required!='undefined'){required=aRequiredFields[i].required;}else{required=1;}
@@ -1232,7 +1232,7 @@ else{var arrayForm=document.getElementsByTagName("form");var inputAux;var id="";
var arrayLink=frm.getElementsByTagName("a");for(i2=0;i2<=arrayLink.length-1;i2++){var link=arrayLink[i2];if(typeof link.id!="undefined"&&link.id!=""&&link.id!="form[DYN_BACKWARD]"&&link.id!="form[DYN_FORWARD]"){var strHtml=link.parentNode.innerHTML;strHtml=stringReplace("\\x0A","",strHtml);strHtml=stringReplace("\\x0D","",strHtml);strHtml=stringReplace("\\x09","",strHtml);if(/^.*pm:field.*$/.test(strHtml)){id=link.id+"_";if(!document.getElementById(id)){var strAux=link.id.replace("form[","");strAux=strAux.substring(0,strAux.length-1);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=link.id;inputAux.value=link.href;frm.appendChild(inputAux);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id+"label";inputAux.name="form["+strAux+"_label]";inputAux.value=link.innerHTML;frm.appendChild(inputAux);}}}}} var arrayLink=frm.getElementsByTagName("a");for(i2=0;i2<=arrayLink.length-1;i2++){var link=arrayLink[i2];if(typeof link.id!="undefined"&&link.id!=""&&link.id!="form[DYN_BACKWARD]"&&link.id!="form[DYN_FORWARD]"){var strHtml=link.parentNode.innerHTML;strHtml=stringReplace("\\x0A","",strHtml);strHtml=stringReplace("\\x0D","",strHtml);strHtml=stringReplace("\\x09","",strHtml);if(/^.*pm:field.*$/.test(strHtml)){id=link.id+"_";if(!document.getElementById(id)){var strAux=link.id.replace("form[","");strAux=strAux.substring(0,strAux.length-1);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=link.id;inputAux.value=link.href;frm.appendChild(inputAux);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id+"label";inputAux.name="form["+strAux+"_label]";inputAux.value=link.innerHTML;frm.appendChild(inputAux);}}}}}
return true;}}else{return false;}};var getObject=function(sObject){var i;var oAux=null;var iLength=__aObjects__.length;for(i=0;i<iLength;i++){oAux=__aObjects__[i].getElementByName(sObject);if(oAux){return oAux;}} return true;}}else{return false;}};var getObject=function(sObject){var i;var oAux=null;var iLength=__aObjects__.length;for(i=0;i<iLength;i++){oAux=__aObjects__[i].getElementByName(sObject);if(oAux){return oAux;}}
return oAux;};var saveAndRefreshForm=function(oObject){if(oObject){oObject.form.action+='&_REFRESH_=1';oObject.form.submit();} return oAux;};var saveAndRefreshForm=function(oObject){if(oObject){oObject.form.action+='&_REFRESH_=1';oObject.form.submit();}
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='+__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('<br />');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('<br />');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 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');} 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;i<notValidateThisFields.length;i++){if(notValidateThisFields[i]!=sFieldName){aAux.push(notValidateThisFields[i]);}} 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;i<notValidateThisFields.length;i++){if(notValidateThisFields[i]!=sFieldName){aAux.push(notValidateThisFields[i]);}}
@@ -1410,7 +1410,7 @@ iRowAux++;}
this.oGrid.deleteRow(lastItem);for(i=0;i<=this.aFields.length-1;i++){this.aElements.pop();} this.oGrid.deleteRow(lastItem);for(i=0;i<=this.aFields.length-1;i++){this.aElements.pop();}
var elem;if(oObj.aFunctions.length>0){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;}}}} var elem;if(oObj.aFunctions.length>0){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) if(oObj.ondeleterow){oObj.ondeleterow(iRow);}};this.clearRowWC=function(oObj,aRow)
{var i=0;var pmLabel='';var elemNodeName='';var objects='';for(i=1;i<oObj.oGrid.rows[1].cells.length;i++){var oCell1=oObj.oGrid.rows[1].cells[i];elemNodeName=oCell1.innerHTML.substring(oCell1.innerHTML.indexOf("<")+1,oCell1.innerHTML.indexOf(" ")).toLowerCase();switch(elemNodeName){case"input":objects=oCell1.getElementsByTagName('input');if(objects[0].type=='checkbox'){document.getElementById(objects[0].id).checked=false;}else{document.getElementById(objects[0].id).value='';fieldSuggest=(objects[0].id).substring(0,(objects[0].id).length-7)+"]";if(document.getElementById(fieldSuggest)!=null){document.getElementById(fieldSuggest).value='';}} {var i=0;var j=0;var iAux=0;var pmLabel='';var elemNodeName='';var objects='';for(i=1;i<oObj.oGrid.rows[1].cells.length;i++){var oCell1=oObj.oGrid.rows[1].cells[i];elemNodeName=oCell1.innerHTML.substring(oCell1.innerHTML.indexOf("<")+1,oCell1.innerHTML.indexOf(" ")).toLowerCase();switch(elemNodeName){case"input":objects=oCell1.getElementsByTagName('input');if(objects[0].type=='checkbox'){document.getElementById(objects[0].id).checked=false;}else{document.getElementById(objects[0].id).value='';fieldSuggest=(objects[0].id).substring(0,(objects[0].id).length-7)+"]";if(document.getElementById(fieldSuggest)!=null){document.getElementById(fieldSuggest).value='';}}
if(oObj.aFunctions.length>0){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;}} if(oObj.aFunctions.length>0){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;j<oObj.aFunctions.length;j++){if(pmLabel!=''&&pmLabel==oObj.aFunctions[j].sFieldName){switch(oObj.aFunctions[j].sFunction){case"sum":oObj.sum(false,document.getElementById(objects[0].id));break;case"avg":oObj.avg(false,document.getElementById(objects[0].id));break;} for(j=0;j<oObj.aFunctions.length;j++){if(pmLabel!=''&&pmLabel==oObj.aFunctions[j].sFieldName){switch(oObj.aFunctions[j].sFunction){case"sum":oObj.sum(false,document.getElementById(objects[0].id));break;case"avg":oObj.avg(false,document.getElementById(objects[0].id));break;}
break;}}} break;}}}

View File

@@ -2614,7 +2614,7 @@ class G
G::verifyPath( $path, true ); G::verifyPath( $path, true );
} }
move_uploaded_file( $file, $path . "/" . $nameToSave ); move_uploaded_file( $file, $path . "/" . $nameToSave );
chmod( $path . "/" . $nameToSave, $permission ); @chmod( $path . "/" . $nameToSave, $permission );
umask( $oldumask ); umask( $oldumask );
} catch (Exception $oException) { } catch (Exception $oException) {
throw $oException; throw $oException;
@@ -2676,7 +2676,7 @@ class G
imagecopyresampled( $image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height ); imagecopyresampled( $image_p, $image, 0, 0, 0, 0, $resWidth, $resHeight, $width, $height );
$outputFn( $image_p, $saveTo ); $outputFn( $image_p, $saveTo );
chmod( $saveTo, 0666 ); @chmod( $saveTo, 0666 );
} }
/** /**
@@ -4804,7 +4804,7 @@ class G
} else { } else {
//first a raw permission check //first a raw permission check
if(fileperms($file) != 33200) { if(fileperms($file) != 33200) {
chmod ($file, 0660); @chmod ($file, 0660);
} }
} }
} }

View File

@@ -50,6 +50,7 @@ var form_{$form->id};
var i; var i;
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}'); form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
var myForm=form_{$form->id}; var myForm=form_{$form->id};

View File

@@ -0,0 +1,48 @@
<?php
CLI::taskName("hotfix-install");
CLI::taskDescription(<<<EOT
Install hotfix to system
This command is executed when you want to update certain files, which have improvements or bugs solutions.
EOT
);
CLI::taskRun(runHotfixInstall);
function runHotfixInstall($command, $args)
{
CLI::logging("HOTFIX", PATH_DATA . "log" . PATH_SEP . "upgrades.log");
CLI::logging("Install hotfix to system\n");
$arrayFile = $command;
if (count($arrayFile) > 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");
}
}

View File

@@ -160,6 +160,18 @@ EOT
CLI::taskArg('workspace-name', true, true); CLI::taskArg('workspace-name', true, true);
CLI::taskRun(run_translation_upgrade); CLI::taskRun(run_translation_upgrade);
CLI::taskName('migrate-cases-folders');
CLI::taskDescription(<<<EOT
Migrating cases folders of the workspaces
Specify the WORKSPACE to migrate from a existing workspace.
EOT
);
//CLI::taskArg('workspace', true);
CLI::taskOpt("workspace", "Select which workspace to migrate the cases folders, if multiple workspaces are present in the server.",
"w:", "workspace=");
CLI::taskRun(runStructureDirectories);
/** /**
* Function run_info * Function run_info
* access public * access public
@@ -460,4 +472,22 @@ function run_workspace_restore($args, $opts) {
} }
} }
?> function runStructureDirectories($command, $args) {
$workspaces = get_workspaces_from_args($command);
$count = count($workspaces);
$errors = false;
$countWorkspace = 0;
foreach ($workspaces as $index => $workspace) {
try {
$countWorkspace++;
CLI::logging("Updating workspaces ($countWorkspace/$count): " . CLI::info($workspace->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;
}
}
}

View File

@@ -1960,6 +1960,12 @@ class Cases
G::LoadClass('derivation'); G::LoadClass('derivation');
$oDerivation = new Derivation(); $oDerivation = new Derivation();
$oDerivation->setTasLastAssigned($sTasUid, $sUsrUid); $oDerivation->setTasLastAssigned($sTasUid, $sUsrUid);
// Execute Events
require_once 'classes/model/Event.php';
$event = new Event();
$event->createAppEvents($sProUid, $sAppUid, $iDelIndex, $sTasUid);
//update searchindex //update searchindex
if ($this->appSolr != null) { if ($this->appSolr != null) {
$this->appSolr->updateApplicationSearchIndex($sAppUid); $this->appSolr->updateApplicationSearchIndex($sAppUid);

View File

@@ -543,6 +543,18 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax
public function set_htmlcode($A, $htmlcode) public function set_htmlcode($A, $htmlcode)
{ {
try { 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("{", "&#123;", $value);
$aTagVar = str_replace("}", "&#125;", $aTagVar);
$aTagVar = str_replace("$", "&#36;", $aTagVar);
$htmlcode = str_replace($value, $aTagVar, $htmlcode);
}
}
}
$file = G::decrypt($A, URL_KEY); $file = G::decrypt($A, URL_KEY);
$form = new Form($file, PATH_DYNAFORM, SYS_LANG, true); $form = new Form($file, PATH_DYNAFORM, SYS_LANG, true);
$filename = substr($form->fileName, 0, - 3) . ($form->type === 'xmlform' ? '' : '.' . $form->type) . 'html'; $filename = substr($form->fileName, 0, - 3) . ($form->type === 'xmlform' ? '' : '.' . $form->type) . 'html';

View File

@@ -1096,10 +1096,10 @@ class System
$md5 = array (); $md5 = array ();
if ($readGlobalIniFile) { if ($readGlobalIniFile) {
$md5[] = md5_file( $globalIniFile ); $md5[] = @md5_file( $globalIniFile );
} }
if ($readWsIniFile) { if ($readWsIniFile) {
$md5[] = md5_file( $wsIniFile ); $md5[] = @md5_file( $wsIniFile );
} }
$hash = implode( '-', $md5 ); $hash = implode( '-', $md5 );

View File

@@ -89,7 +89,14 @@ class workspaceTools
$stop = microtime(true); $stop = microtime(true);
$final = $stop - $start; $final = $stop - $start;
CLI::logging("<*> Updating cache view Process took $final seconds.\n"); CLI::logging("<*> Updating cache view Process took $final seconds.\n");
}
/**
* Updating cases directories structure
*
*/
public function updateStructureDirectories($workSpace = SYS_SYS)
{
$start = microtime(true); $start = microtime(true);
CLI::logging("> Updating cases directories structure...\n"); CLI::logging("> Updating cases directories structure...\n");
$this->upgradeCasesDirectoryStructure($workSpace); $this->upgradeCasesDirectoryStructure($workSpace);
@@ -583,13 +590,17 @@ class workspaceTools
$this->initPropel(true); $this->initPropel(true);
G::LoadClass("configuration"); G::LoadClass("configuration");
$conf = new Configurations(); $conf = new Configurations();
if ($conf->exists("ENVIRONMENT_SETTINGS")) { if (!$conf->exists("ENVIRONMENT_SETTINGS")) {
$conf->setDirectoryStructureVer(2); $conf->aConfig = array ("format" => '@userName (@firstName @lastName)',
CLI::logging(CLI::info("Version Directory Structure is 2 now.\n")); "dateFormat" => 'd/m/Y',
} else { "startCaseHideProcessInf" => false,
CLI::logging(CLI::error("Error: found at try to use ENVIRONMENT_SETTINGS row.\n")); "casesListDateFormat" => 'Y-m-d H:i:s',
return; "casesListRowNumber" => 25,
"casesListRefreshTime" => 120 );
$conf->saveConfig( 'ENVIRONMENT_SETTINGS', '' );
} }
$conf->setDirectoryStructureVer(2);
CLI::logging(CLI::info("Version Directory Structure is 2 now.\n"));
} }
/** /**
@@ -1296,5 +1307,55 @@ class workspaceTools
CLI::logging(CLI::info("Done restoring") . "\n"); 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;
}
} }

View File

@@ -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->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')) { if (($aConfiguration['MESS_BACKGROUND'] == '') || ($aConfiguration['MESS_TRY_SEND_INMEDIATLY'] == '1')) {
$oSpool->sendMail(); $oSpool->sendMail();
} }

View File

@@ -260,6 +260,7 @@ class Translation extends BaseTranslation
$POFile = new i18n_PO( $languageFile ); $POFile = new i18n_PO( $languageFile );
$POFile->readInit(); $POFile->readInit();
while ($rowTranslation = $POFile->getTranslation()) { while ($rowTranslation = $POFile->getTranslation()) {
$context = '';
foreach ($POFile->translatorComments as $a => $aux) { foreach ($POFile->translatorComments as $a => $aux) {
$aux = trim( $aux ); $aux = trim( $aux );
if ($aux == 'TRANSLATION') { if ($aux == 'TRANSLATION') {
@@ -281,7 +282,7 @@ class Translation extends BaseTranslation
} }
} }
} }
if ($identifier == 'TRANSLATION') { if ($identifier == 'TRANSLATION' && $context != '') {
list ($category, $id) = explode( '/', $context ); list ($category, $id) = explode( '/', $context );
$translation[$id] = $rowTranslation['msgstr'] ; $translation[$id] = $rowTranslation['msgstr'] ;
} }

View File

@@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" 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" "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" "Last-Translator: \n"
"Language-Team: Colosa Developers Team <developers@colosa.com>\n" "Language-Team: Colosa Developers Team <developers@colosa.com>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -5236,8 +5236,8 @@ msgstr "Off"
# TRANSLATION # TRANSLATION
# LABEL/ID_NO_SELECTION_WARNING # LABEL/ID_NO_SELECTION_WARNING
#: LABEL/ID_NO_SELECTION_WARNING #: LABEL/ID_NO_SELECTION_WARNING
msgid "Select a item from the list please." msgid "One item should be selected in order to execute the action."
msgstr "Select a item from the list please." msgstr "One item should be selected in order to execute the action."
# TRANSLATION # TRANSLATION
# JAVASCRIPT/ID_REQUIRED_NAME_TRIGGERS # JAVASCRIPT/ID_REQUIRED_NAME_TRIGGERS
@@ -12940,8 +12940,8 @@ msgstr "Could not create the installation log"
# TRANSLATION # TRANSLATION
# LABEL/ID_PREVIUS # LABEL/ID_PREVIUS
#: LABEL/ID_PREVIUS #: LABEL/ID_PREVIUS
msgid "Previus" msgid "[LABEL/ID_PREVIUS] Previous"
msgstr "Previus" msgstr "Previous"
# TRANSLATION # TRANSLATION
# LABEL/ID_UPLOAD_COMPLETE # LABEL/ID_UPLOAD_COMPLETE
@@ -14905,6 +14905,30 @@ msgstr "You forgot the name of the Case Scheduler"
msgid "Duplicate Case Scheduler name." msgid "Duplicate Case Scheduler name."
msgstr "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?ADD_TAB_NAME
# additionalTables/additionalTablesData.xml # additionalTables/additionalTablesData.xml
#: text - ADD_TAB_NAME #: text - ADD_TAB_NAME

View File

@@ -360,11 +360,6 @@ class Home extends Controller
$_SESSION['STEP_POSITION'] = 0; $_SESSION['STEP_POSITION'] = 0;
$_SESSION['CASES_REFRESH'] = true; $_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(); $oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] ); $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 //../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo

View File

@@ -3150,7 +3150,7 @@ SELECT 'LABEL','ID_ON','en','On','2013-05-15'
UNION ALL UNION ALL
SELECT 'LABEL','ID_OFF','en','Off','2013-05-15' SELECT 'LABEL','ID_OFF','en','Off','2013-05-15'
UNION ALL 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 UNION ALL
SELECT 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2013-05-15' SELECT 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2013-05-15'
UNION ALL UNION ALL
@@ -5750,7 +5750,7 @@ SELECT 'LABEL','ID_DOES_NOT_EXIST','en','does not exist','2013-03-07'
UNION ALL UNION ALL
SELECT 'LABEL','ID_CREATE_LOG_INSTALLATION','en','Could not create the installation log','2013-03-07' SELECT 'LABEL','ID_CREATE_LOG_INSTALLATION','en','Could not create the installation log','2013-03-07'
UNION ALL UNION ALL
SELECT 'LABEL','ID_PREVIUS','en','Previus','2013-03-07' SELECT 'LABEL','ID_PREVIUS','en','Previous','2013-06-13'
UNION ALL UNION ALL
SELECT 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2013-03-07' SELECT 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2013-03-07'
UNION ALL 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' SELECT 'LABEL','ID_REQUIRED_NAME_CASE_SCHEDULER','en','You forgot the name of the Case Scheduler','2013-05-28'
UNION ALL UNION ALL
SELECT 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2013-05-28' 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]) INSERT INTO ISO_LOCATION ([IC_UID],[IL_UID],[IL_NAME],[IL_NORMAL_NAME],[IS_UID])

View File

@@ -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_PRO_CREATE_DATE','en','Create Date','2013-05-15') ,
( 'LABEL','ID_ON','en','On','2013-05-15') , ( 'LABEL','ID_ON','en','On','2013-05-15') ,
( 'LABEL','ID_OFF','en','Off','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_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_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') , ( '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_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_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_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_UPLOAD_COMPLETE','en','Upload complete','2013-03-07') ,
( 'LABEL','ID_CREATE_FOLDER','en','Create New Folder','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') , ( '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 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_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 INSERT INTO ISO_LOCATION (IC_UID,IL_UID,IL_NAME,IL_NORMAL_NAME,IS_UID) VALUES
('AD','','',' ','') , ('AD','','',' ','') ,

View File

@@ -58,17 +58,30 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
$delIndex = array(); $delIndex = array();
$respMess = ""; $respMess = "";
if (count($respView['MSGS_HISTORY'])>0) {
$respMess = $respView['MSGS_HISTORY']['PERMISSION']; if (count($respView["MSGS_HISTORY"]) > 0) {
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; $respMess = $respView["MSGS_HISTORY"]["PERMISSION"];
if (isset($respView["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respView["MSGS_HISTORY"]["DEL_INDEX"];
}
} else { } else {
if (count($respBlock['MSGS_HISTORY'])>0) { if (count($respBlock["MSGS_HISTORY"]) > 0) {
$respMess = $respBlock['MSGS_HISTORY']['PERMISSION']; $respMess = $respBlock["MSGS_HISTORY"]["PERMISSION"];
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX'];
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
}
} else { } else {
if (count($respResend['MSGS_HISTORY'])>0) { if (count($respResend["MSGS_HISTORY"]) > 0) {
$respMess = $respResend['MSGS_HISTORY']['PERMISSION'];
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX']; $respMess = $respResend["MSGS_HISTORY"]["PERMISSION"];
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
}
} }
} }
} }

View File

@@ -250,11 +250,6 @@ function startCase ()
$_SESSION['CASES_REFRESH'] = true; $_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(); $oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] ); $aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );

View File

@@ -184,7 +184,11 @@ try {
//Obtain previous and next step - End //Obtain previous and next step - End
$aRequiredFields = array( $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)) . '\'; '); $oHeadPublisher->addScriptCode('var __dynaformSVal__ = \'' . base64_encode(serialize($aRequiredFields)) . '\'; ');

View File

@@ -35,24 +35,20 @@ if (isset($_REQUEST['dynaformRestoreValues'])) {
$aRetValues = unserialize(stripslashes(base64_decode($_REQUEST['dynaformRestoreValues']))); $aRetValues = unserialize(stripslashes(base64_decode($_REQUEST['dynaformRestoreValues'])));
if (isset($aRetValues['APP_DATA'])) { if (isset($aRetValues['APPLICATION'])) {
$_SESSION['APP_DATA'] = $aRetValues['APP_DATA']; $_SESSION['APPLICATION'] = $aRetValues['APPLICATION'];
}
if (isset($aRetValues['APP_DATA']['APPLICATION'])) { if (isset($aRetValues['PROCESS'])) {
$_SESSION['APPLICATION'] = $aRetValues['APP_DATA']['APPLICATION']; $_SESSION['PROCESS'] = $aRetValues['PROCESS'];
} }
if (isset($aRetValues['APP_DATA']['PROCESS'])) { if (isset($aRetValues['TASK'])) {
$_SESSION['PROCESS'] = $aRetValues['APP_DATA']['PROCESS']; $_SESSION['TASK'] = $aRetValues['TASK'];
} }
if (isset($aRetValues['APP_DATA']['TASK'])) { if (isset($aRetValues['INDEX'])) {
$_SESSION['TASK'] = $aRetValues['APP_DATA']['TASK']; $_SESSION['INDEX'] = $aRetValues['INDEX'];
} }
if (isset($aRetValues['APP_DATA']['INDEX'])) { if (isset($aRetValues['TRIGGER_DEBUG'])) {
$_SESSION['INDEX'] = $aRetValues['APP_DATA']['INDEX']; $_SESSION['TRIGGER_DEBUG'] = $aRetValues['TRIGGER_DEBUG'];
}
if (isset($aRetValues['APP_DATA']['TRIGGER_DEBUG'])) {
$_SESSION['TRIGGER_DEBUG'] = $aRetValues['APP_DATA']['TRIGGER_DEBUG'];
}
} }
} }
die(G::json_encode($response)); die(G::json_encode($response));

View File

@@ -36,10 +36,15 @@ switch ($request) {
break; break;
case "save": case "save":
$conf = new Configurations(); $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", "" ); $conf->saveConfig( "ENVIRONMENT_SETTINGS", "" );
$response = new stdclass(); $response = new stdclass();

View File

@@ -70,6 +70,7 @@ var form_{$form->id};
var i; var i;
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
form_{$form->id}=new G_Form(document.getElementById('form[{$form->id}]'),'{$form->id}'); form_{$form->id}=new G_Form(document.getElementById('form[{$form->id}]'),'{$form->id}');
var myForm=form_{$form->id}; var myForm=form_{$form->id};

View File

@@ -80,6 +80,7 @@ var form_{$form->id};
var i; var i;
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}'); form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
var myForm=form_{$form->id}; var myForm=form_{$form->id};

View File

@@ -980,14 +980,15 @@ function createReportTable()
return false; return false;
} }
//validate process //validate process
if(Ext.getCmp('PROCESS').getValue().trim() == '') { PRO_UID = (PRO_UID !== false) ? PRO_UID : ((Ext.getCmp('PROCESS').getValue().trim() != '') ? Ext.getCmp('PROCESS').getValue().trim() : '');
Ext.getCmp('PROCESS').focus(); if(PRO_UID == '') {
PMExt.error(_('ID_ERROR'), _('ID_PROCESS_IS_REQUIRED'), function(){ Ext.getCmp('PROCESS').focus();
Ext.getCmp('PROCESS').focus(); PMExt.error(_('ID_ERROR'), _('ID_PROCESS_IS_REQUIRED'), function(){
}); Ext.getCmp('PROCESS').focus();
return false; });
} return false;
}
// validate table name length // validate table name length
if(tableName.length < 4) { if(tableName.length < 4) {

View File

@@ -93,6 +93,7 @@ try {
$iCantidad2 = StepTriggerPeer::doCount($oCriteria); $iCantidad2 = StepTriggerPeer::doCount($oCriteria);
$oCriteria = $oProcessMap->getStepTriggersCriteria(-2, $_SESSION['TASK'], 'AFTER'); $oCriteria = $oProcessMap->getStepTriggersCriteria(-2, $_SESSION['TASK'], 'AFTER');
$iCantidad3 = StepTriggerPeer::doCount($oCriteria); $iCantidad3 = StepTriggerPeer::doCount($oCriteria);
$oNode =& $oTree->addChild('-1', '&nbsp;&nbsp;<span onclick="tree.expand(this.parentNode);" style="cursor: pointer;">[<b> ' . G::LoadTranslation('ID_ASSIGN_TASK') . ' </b>] ' . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (<span id="TRIG_'.$aRow['STEP_UID'] . '">' . ($iCantidad1 + $iCantidad2 + $iCantidad3) . '</span>)' . '</span>', array('nodeType'=>'parent')); $oNode =& $oTree->addChild('-1', '&nbsp;&nbsp;<span onclick="tree.expand(this.parentNode);" style="cursor: pointer;">[<b> ' . G::LoadTranslation('ID_ASSIGN_TASK') . ' </b>] ' . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (<span id="TRIG_'.$aRow['STEP_UID'] . '">' . ($iCantidad1 + $iCantidad2 + $iCantidad3) . '</span>)' . '</span>', array('nodeType'=>'parent'));
$oNode->contracted = true; $oNode->contracted = true;
$oAux1 =& $oNode->addChild('before_node', '<span onclick="tree.expand(this.parentNode);showTriggers(\'-1\', \'BEFORE\');" style="cursor: pointer;">' . G::LoadTranslation('ID_BEFORE_ASSIGNMENT') . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (<span id="TRIG_-1_BEFORE">'. $iCantidad1 .'</span>) </span>', array('nodeType'=>'parent')); $oAux1 =& $oNode->addChild('before_node', '<span onclick="tree.expand(this.parentNode);showTriggers(\'-1\', \'BEFORE\');" style="cursor: pointer;">' . G::LoadTranslation('ID_BEFORE_ASSIGNMENT') . ' - ' . G::LoadTranslation('ID_TRIGGERS'). ' (<span id="TRIG_-1_BEFORE">'. $iCantidad1 .'</span>) </span>', array('nodeType'=>'parent'));
@@ -107,7 +108,27 @@ try {
$oAux1->plus = "<span style='cursor:pointer;display:block;width:15;height:10px;' onclick='tree.expand(this.parentNode);showTriggers(\"-2\", \"AFTER\");'></span>"; $oAux1->plus = "<span style='cursor:pointer;display:block;width:15;height:10px;' onclick='tree.expand(this.parentNode);showTriggers(\"-2\", \"AFTER\");'></span>";
$oAux1->contracted = true; $oAux1->contracted = true;
$oAux2 =& $oAux1->addChild('-2_after_node', '<span id="triggersSpan_-2_AFTER"></span>', array('nodeType'=>'parentBlue')); $oAux2 =& $oAux1->addChild('-2_after_node', '<span id="triggersSpan_-2_AFTER"></span>', array('nodeType'=>'parentBlue'));
echo $oTree->render();
$javascript = "
<script type=\"text/javascript\">
//Add css Codemirror
var head = document.getElementsByTagName(\"head\")[0];
var s = document.createElement(\"link\");
s.setAttribute(\"href\", \"/js/codemirror/lib/codemirror.css\");
s.setAttribute(\"type\", \"text/css\");
s.setAttribute(\"rel\", \"stylesheet\");
head.appendChild(s);
var s = document.createElement(\"link\");
s.setAttribute(\"href\", \"/js/codemirror/addon/hint/show-hint.css\");
s.setAttribute(\"type\", \"text/css\");
s.setAttribute(\"rel\", \"stylesheet\");
head.appendChild(s);
</script>
";
echo $javascript . $oTree->render();
} }
catch (Exception $oException) { catch (Exception $oException) {
die($oException->getMessage()); die($oException->getMessage());

View File

@@ -90,6 +90,7 @@
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
var i = 0; var i = 0;
if (typeof(G_Form) == "undefined") {literal}{{/literal} if (typeof(G_Form) == "undefined") {literal}{{/literal}

View File

@@ -2,6 +2,7 @@ var form_{$form->id};
var i; var i;
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}'); form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
var myForm=form_{$form->id}; var myForm=form_{$form->id};

View File

@@ -93,6 +93,7 @@ if (typeof(__aObjects__) === 'undefined') {literal}{{/literal}
{literal}}{/literal} {literal}}{/literal}
function loadForm_{$form->id}(ajaxServer) function loadForm_{$form->id}(ajaxServer)
{literal}{{/literal} {literal}{{/literal}
swSubmitValidateForm = 1;
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded'); if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}'); form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
object_{$form->name} = form_{$form->id}; object_{$form->name} = form_{$form->id};

View File

@@ -3,10 +3,10 @@
<PRO_UID type="private" /> <PRO_UID type="private" />
<DYN_UID type="private" /> <DYN_UID type="private" />
<!--<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>--> <!--<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>-->
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" home="public_html" buttonType="class"> <saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save();return false;" home="public_html" buttonType="class">
<en>Save</en> <en>Save</en>
</saveDyna> </saveDyna>
<saveasDyna type="toolButton" class="ss_sprite button_toolbar ss_disk_multiple" onclick="dynaformEditor.save_as()" buttonType="class"> <saveasDyna type="toolButton" class="ss_sprite button_toolbar ss_disk_multiple" onclick="dynaformEditor.save_as();return false;" buttonType="class">
<en>Save as</en> <en>Save as</en>
</saveasDyna> </saveasDyna>
<!--.--> <!--.-->

View File

@@ -3,10 +3,10 @@
<PRO_UID type="private" /> <PRO_UID type="private" />
<DYN_UID type="private" /> <DYN_UID type="private" />
<!--<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>--> <!--<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>-->
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" buttonType="class"> <saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save();return false;" buttonType="class">
<en>Save</en> <en>Save</en>
</saveDyna> </saveDyna>
<saveasDyna type="toolButton" class="ss_sprite button_toolbar ss_disk_multiple" onclick="dynaformEditor.save_as()" buttonType="class"> <saveasDyna type="toolButton" class="ss_sprite button_toolbar ss_disk_multiple" onclick="dynaformEditor.save_as();return false;" buttonType="class">
<en>Save as</en> <en>Save as</en>
</saveasDyna> </saveasDyna>
<!--.--> <!--.-->

View File

@@ -65,7 +65,7 @@
<en>Script</en> <en>Script</en>
</TRI_WEBBOT> </TRI_WEBBOT>
<BTNCOPYSAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getCode(); triggerSave1(this.form);"> <BTNCOPYSAVE type="button" onclick="document.getElementById('form[TRI_WEBBOT]').value = triggerEditor.getValue(); triggerSave1(this.form);">
<en>Copy/Import and Save</en> <en>Copy/Import and Save</en>
</BTNCOPYSAVE> </BTNCOPYSAVE>