Merge branch 'master' of github.com:colosa/processmaker

This commit is contained in:
Erik Amaru Ortiz
2013-09-26 15:22:02 -04:00
7 changed files with 96 additions and 12 deletions

View File

@@ -267,6 +267,73 @@ class Installer
break;
}
}
//ACTIVE ENTERPRISE
ini_set('max_execution_time', '0');
ini_set('memory_limit', '256M');
$serv = 'http://';
if (isset($_SERVER['HTTPS']) && trim($_SERVER['HTTPS']) != '') {
$serv = 'https://';
}
$serv .= $_SERVER['SERVER_NAME'];
if (isset($_SERVER['SERVER_PORT']) && trim($_SERVER['SERVER_PORT']) != '') {
$serv .= ':' . $_SERVER['SERVER_PORT'];
}
// create session
$cookiefile = sys_get_temp_dir() . PATH_SEP . 'curl-session';
$fp = fopen($cookiefile, "w");
fclose($fp);
chmod($cookiefile, 0777);
$user = urlencode($this->options['admin']['username']);
$pass = urlencode($this->options['admin']['password']);
$workspace = $this->options['name'];
$lang = SYS_LANG;
$skinName = SYS_SKIN;
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/{$skinName}/login/authentication");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "form[USR_USERNAME]=$user&form[USR_PASSWORD]=$pass&form[USER_LANG]=$lang");
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
$output = curl_exec($ch);
curl_close($ch);
$ch = curl_init();
$postData = array();
// resolv the plugin name
$plugins = glob(PATH_CORE."plugins/*.tar");
if (count($plugins) > 0) {
$pluginName = $plugins[0];
// File to upload/post
$postData['form[PLUGIN_FILENAME]'] = "@{$pluginName}";
curl_setopt($ch, CURLOPT_URL, "$serv/sys{$workspace}/{$lang}/{$skinName}/setup/pluginsImportFile");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
$output = curl_exec($ch);
curl_close($ch);
}
}
}

View File

@@ -14,6 +14,7 @@ var oPanel;
function newDbConnection() {
oPanel = new leimnud.module.panel();
oPanel.options = {
limit :true,
size :{w:450,h:380},
position:{x:0,y:0,center:true},
title :G_STRINGS.ID_DBS_NEW,
@@ -129,6 +130,7 @@ function editDbConnection(DBS_UID)
oPanel = new leimnud.module.panel();
oPanel.options = {
limit :true,
size :{w:450,h:380},
position:{x:0,y:0,center:true},
title :G_STRINGS.ID_DBS_EDIT,
@@ -235,6 +237,7 @@ function testDBConnection()
var myPanel = new leimnud.module.panel();
currentPopupWindow = myPanel;
myPanel.options = {
limit :true,
size:{w:500,h:400},
position:{center:true},
title: G_STRINGS.DBCONNECTIONS_TEST,

View File

@@ -2772,6 +2772,7 @@ function showLogCaseSchedulerList(PRO_UID)
{
mainPanel = new leimnud.module.panel();
mainPanel.options = {
limit :true,
size :{w:640,h:450},
position:{x:0,y:0,center:true},
title :"Case Scheduler Log List",

View File

@@ -70,13 +70,15 @@ $oConf = new Configurations();
$aUsersInvolved = Array();
$ConfEnv = $oConf->getFormats();
G::LoadClass( 'tasks' );
$task = new Task();
$tasks = $task->load($TaskUid);
$rows = $oCases->getUsersToReassign($TaskUid, $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
foreach ($rows as $row) {
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $row );
$aUsersInvolved[] = array ('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
if ($TaskUid != '') {
G::LoadClass( 'tasks' );
$task = new Task();
$tasks = $task->load($TaskUid);
$rows = $oCases->getUsersToReassign($TaskUid, $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
foreach ($rows as $row) {
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $row );
$aUsersInvolved[] = array ('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
}
}
// $oTmp = new stdClass();

View File

@@ -40,7 +40,11 @@ try {
//$oJSON = new Services_JSON();
if (isset($_REQUEST['data'])) {
$oData = Bootstrap::json_decode(stripslashes($_REQUEST['data']));
if($_REQUEST['action']=="addText"||$_REQUEST['action']=="updateText") {
$oData = Bootstrap::json_decode($_REQUEST['data']);
} else {
$oData = Bootstrap::json_decode(stripslashes($_REQUEST['data']));
}
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
$sOutput = '';
$sTask = '';