From 7bcd7413a5717d6871293806c5561023c9a6c8f2 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 12 Nov 2012 12:16:19 -0400 Subject: [PATCH 1/6] BUG 10024 Error de visualizacion de nodos de tree con nombres muy largos SOLVED - Missing validation for the text displayed in the container - Added word wrap style --- .../engine/templates/departments/departmentList.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/workflow/engine/templates/departments/departmentList.js b/workflow/engine/templates/departments/departmentList.js index 76b793a90..d83e5f4ac 100755 --- a/workflow/engine/templates/departments/departmentList.js +++ b/workflow/engine/templates/departments/departmentList.js @@ -196,10 +196,15 @@ Ext.onReady(function() { columns:[{ header: _('ID_DEPARTMENT_NAME'), dataIndex: 'DEP_TITLE', - width: 320 + width: 380, + tpl: new Ext.XTemplate('{DEP_TITLE:this.formatDepTitle}', { + formatDepTitle: function(v) { + return '' + v + ''; + } + }) },{ header: _('ID_STATUS'), - width: 100, + width: 70, dataIndex: 'DEP_STATUS', align: 'center', tpl: new Ext.XTemplate('{DEP_STATUS:this.formatStatus}', { @@ -216,7 +221,7 @@ Ext.onReady(function() { dataIndex: 'DEP_MANAGER_NAME' },{ header: _('ID_USERS'), - width: 80, + width: 70, dataIndex: 'DEP_TOTAL_USERS', align: 'center', sortType: 'asFloat' From e929d810424fdfc07d207c384db0aea3d28fb291 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 12 Nov 2012 13:19:32 -0400 Subject: [PATCH 2/6] BUG 10052 Problema al realizar instalacion de cero en tetsing.2 SOLVED - Missing validation whhit PATH_DATA constant in new function isPMUnderUpdating - Add validation when PATH_DATA doesn' exists --- gulliver/system/class.g.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index baab52139..80d8b173b 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5081,6 +5081,9 @@ class G */ public function isPMUnderUpdating($setFlag = 2) { + if (!defined('PATH_DATA')) { + return false; + } $fileCheck = PATH_DATA."UPDATE.dat"; if ($setFlag == 0) { if (file_exists($fileCheck)) { From 9c6a4f18390ee75f2956393a588c119cdc8aea79 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 12 Nov 2012 14:28:25 -0400 Subject: [PATCH 3/6] BUG 10050 Integridad Referencial SOLVED - Added instruction suggested --- gulliver/system/class.dbMaintenance.php | 1 + workflow/engine/classes/class.multipleFilesBackup.php | 1 + workflow/engine/classes/class.wsTools.php | 1 + workflow/engine/classes/model/Content.php | 1 + 4 files changed, 4 insertions(+) diff --git a/gulliver/system/class.dbMaintenance.php b/gulliver/system/class.dbMaintenance.php index 0d68da8ec..d6ea58085 100755 --- a/gulliver/system/class.dbMaintenance.php +++ b/gulliver/system/class.dbMaintenance.php @@ -162,6 +162,7 @@ class DataBaseMaintenance $this->link = mysql_connect( $this->host, $this->user, $this->passwd ); @mysql_query( "SET NAMES 'utf8';" ); + @mysql_query( "SET FOREIGN_KEY_CHECKS=0;" ); if (! $this->link) { throw new Exception( "Couldn't connect to host {$this->host} with user {$this->user}" ); } diff --git a/workflow/engine/classes/class.multipleFilesBackup.php b/workflow/engine/classes/class.multipleFilesBackup.php index ce5da7952..fa955c7bc 100644 --- a/workflow/engine/classes/class.multipleFilesBackup.php +++ b/workflow/engine/classes/class.multipleFilesBackup.php @@ -193,6 +193,7 @@ class multipleFilesBackup CLI::logging( "> Connecting to system database in '$dbHost'\n" ); $link = mysql_connect( $dbHost, $dbUser, $dbPass ); @mysql_query( "SET NAMES 'utf8';" ); + @mysql_query( "SET FOREIGN_KEY_CHECKS=0;" ); if (! $link) { throw new Exception( 'Could not connect to system database: ' . mysql_error() ); } diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index e34d23d23..f1b5b39b5 100755 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -1123,6 +1123,7 @@ class workspaceTools CLI::logging( "> Connecting to system database in '$dbHost'\n" ); $link = mysql_connect( $dbHost, $dbUser, $dbPass ); @mysql_query( "SET NAMES 'utf8';" ); + @mysql_query( "SET FOREIGN_KEY_CHECKS=0;" ); if (! $link) { throw new Exception( 'Could not connect to system database: ' . mysql_error() ); } diff --git a/workflow/engine/classes/model/Content.php b/workflow/engine/classes/model/Content.php index 2e2df381a..ac1c1193d 100755 --- a/workflow/engine/classes/model/Content.php +++ b/workflow/engine/classes/model/Content.php @@ -345,6 +345,7 @@ class Content extends BaseContent mysql_select_db( $workSpace->dbName, $link ); mysql_query( "SET NAMES 'utf8';" ); + mysql_query( "SET FOREIGN_KEY_CHECKS=0;" ); mysql_query( 'SET OPTION SQL_BIG_SELECTS=1' ); $result = mysql_unbuffered_query( $sql, $link ); $list = array (); From 47556c8de877761e0acd97b987be6c4f260fb6e2 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 12 Nov 2012 15:02:55 -0400 Subject: [PATCH 4/6] BUG 10037 Error in ws_sendMessage & ws_sendEmailMessage in wsClient.php SOLVED - Incorrect parameters sent in the functions ws_sendEmailMessage and ws_sendMessage - Now we use and send the correct parameters --- workflow/engine/test/unit/ws/wsClient.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflow/engine/test/unit/ws/wsClient.php b/workflow/engine/test/unit/ws/wsClient.php index d3d68481e..e4ed68247 100755 --- a/workflow/engine/test/unit/ws/wsClient.php +++ b/workflow/engine/test/unit/ws/wsClient.php @@ -142,7 +142,7 @@ function ws_open_with_params($endpoint, $user, $pass) { throw (new Exception($result->message)); } -function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $sBody) { +function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $template) { global $sessionId; global $client; $params = array ( @@ -153,7 +153,7 @@ function ws_sendEmailMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, 'cc' => $ccEmail, 'bcc' => $bccEmail, 'subject' => $sSubject, - 'message' => $sBody + 'template' => $template ); $result = $client->__SoapCall('sendMessage', array ( $params @@ -172,7 +172,7 @@ function ws_sendMessage($caseId, $toEmail, $sSubject, $ccEmail, $bccEmail, $temp 'cc' => $ccEmail, 'bcc' => $bccEmail, 'subject' => $sSubject, - 'message' => $template + 'template' => $template ); $result = $client->__SoapCall('sendMessage', array ( $params From c67cf39f837f10afe63b2d1ebfe0d5cd90d94f06 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Mon, 12 Nov 2012 18:48:15 -0400 Subject: [PATCH 5/6] Added validation when a empty value is sent to mb_strlen function --- gulliver/js/common/core/common.js | 1 + gulliver/js/maborak/core/maborak.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js index f14f3500d..0cd6ab6e6 100755 --- a/gulliver/js/common/core/common.js +++ b/gulliver/js/common/core/common.js @@ -2127,6 +2127,7 @@ function stringReplace(strSearch, stringReplace, str) } var mb_strlen = function(str) { + str = str || ''; var len = 0; for (var i = 0; i < str.length; i++) { len += str.charCodeAt(i) < 0 || str.charCodeAt(i) > 255 ? 2 : 1; diff --git a/gulliver/js/maborak/core/maborak.js b/gulliver/js/maborak/core/maborak.js index 49986a4bd..92a315c83 100644 --- a/gulliver/js/maborak/core/maborak.js +++ b/gulliver/js/maborak/core/maborak.js @@ -792,7 +792,7 @@ else{PMExt.error('Processmaker JS Core Error','The TRANSLATIONS global object is return trn;} function stringReplace(strSearch,stringReplace,str) {var expression=eval("/"+strSearch+"/g");return str.replace(expression,stringReplace);} -var mb_strlen=function(str){var len=0;for(var i=0;i255?2:1;} +var mb_strlen=function(str){str=str||'';var len=0;for(var i=0;i255?2:1;} return len;};var stripNonNumeric=function(str){str+='';var rgx=/^\d|\.|-$/;var out='';for(var i=0;i Date: Mon, 12 Nov 2012 19:16:12 -0400 Subject: [PATCH 6/6] Change the minimun version of PHP required to install PM --- workflow/engine/controllers/installer.php | 2 +- .../templates/installer/installer_cards.js | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index f94a92415..e0a900625 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -127,7 +127,7 @@ class Installer extends Controller $info->memory = new stdclass(); $info->php->version = phpversion(); - $info->php->result = $phpVerNum >= 5.1 ? true : false; + $info->php->result = version_compare(phpversion(), '5.2.10') >= 0 ? true : false; // MYSQL info and verification $info->mysql->result = false; diff --git a/workflow/engine/templates/installer/installer_cards.js b/workflow/engine/templates/installer/installer_cards.js index e9a8fb511..d0b717313 100644 --- a/workflow/engine/templates/installer/installer_cards.js +++ b/workflow/engine/templates/installer/installer_cards.js @@ -86,17 +86,17 @@ Ext.onReady(function(){ Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage); Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage); Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage); - - wizard.onClientValidation(1, - response.pathConfig.result && - response.pathLanguages.result && - response.pathPlugins.result && - response.pathXmlforms.result && - response.pathPublic.result && - response.pathShared.result && + + wizard.onClientValidation(1, + response.pathConfig.result && + response.pathLanguages.result && + response.pathPlugins.result && + response.pathXmlforms.result && + response.pathPublic.result && + response.pathShared.result && response.pathLogFile.result ); - + wizard.showLoadMask(false); permissionInfo.error1 = response.noWritableFiles @@ -147,10 +147,10 @@ Ext.onReady(function(){ success: function(response){ var response = Ext.util.JSON.decode(response.responseText); Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result)); - + if (!response.result) PMExt.notify('WARNING', response.message, 'warning'); - + wizard.onClientValidation(3, response.result); wizard.showLoadMask(false); }, @@ -216,7 +216,7 @@ Ext.onReady(function(){ Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg); Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg); Ext.get('rpDatabaseSpan').dom.innerHTML = (response.rpDatabaseExists ? existMsg : noExistsMsg); - + var dbFlag = ((!response.wfDatabaseExists && !response.rbDatabaseExists && !response.rpDatabaseExists) || Ext.getCmp('deleteDB').getValue()); wizard.onClientValidation(4, dbFlag); @@ -270,7 +270,7 @@ Ext.onReady(function(){ bodyStyle : 'padding:10px;font-size:1.2em;', html: step1_txt }, - + { region: 'center', xtype : 'fieldset', @@ -278,7 +278,7 @@ Ext.onReady(function(){ items:[ { xtype : 'displayfield', - fieldLabel: 'PHP Version >= 5.1', + fieldLabel: 'PHP Version >= 5.2.10', id : 'php' }, { @@ -464,7 +464,7 @@ Ext.onReady(function(){ } } ); - + // third card with input field email-address steps[setIndex++] = new Ext.ux.Wiz.Card({ @@ -512,8 +512,8 @@ Ext.onReady(function(){ show: function() { setTimeout(function(){ var iAgree = Ext.getCmp('agreeCheckbox').getValue(); - - wizard.onClientValidation(2, iAgree); + + wizard.onClientValidation(2, iAgree); }, 100); } }