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;ilink = 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/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)) { 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 (); 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/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' 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); } } 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