Merge branch 'master' into pm_wysiwyg

This commit is contained in:
user
2012-11-13 09:23:22 -04:00
11 changed files with 38 additions and 25 deletions

View File

@@ -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;

View File

@@ -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;i<str.length;i++){len+=str.charCodeAt(i)<0||str.charCodeAt(i)>255?2:1;}
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;}
return len;};var stripNonNumeric=function(str){str+='';var rgx=/^\d|\.|-$/;var out='';for(var i=0;i<str.length;i++){if(rgx.test(str.charAt(i))){if(!((str.charAt(i)=='.'&&out.indexOf('.')!=-1)||(str.charAt(i)=='-'&&out.length!=0))){out+=str.charAt(i);}}}
return out;};
var TimeToFade=1000.0;function fade(eid,inOut){inOut=(typeof(inOut)!='undefined')?true:false;var element=document.getElementById(eid);if(element==null)

View File

@@ -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}" );
}

View File

@@ -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)) {

View File

@@ -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() );
}

View File

@@ -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() );
}

View File

@@ -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 ();

View File

@@ -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;

View File

@@ -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 '<span style="white-space:normal !important;word-wrap: break-word;">' + v + '</span>';
}
})
},{
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'

View File

@@ -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);
}
}

View File

@@ -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