Merge branch 'master' of git://github.com/colosa/processmaker into BUG-11603
This commit is contained in:
48
workflow/engine/bin/tasks/cliHotfix.php
Normal file
48
workflow/engine/bin/tasks/cliHotfix.php
Normal 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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,18 @@ EOT
|
||||
CLI::taskArg('workspace-name', true, true);
|
||||
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
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1960,6 +1960,12 @@ class Cases
|
||||
G::LoadClass('derivation');
|
||||
$oDerivation = new Derivation();
|
||||
$oDerivation->setTasLastAssigned($sTasUid, $sUsrUid);
|
||||
|
||||
// Execute Events
|
||||
require_once 'classes/model/Event.php';
|
||||
$event = new Event();
|
||||
$event->createAppEvents($sProUid, $sAppUid, $iDelIndex, $sTasUid);
|
||||
|
||||
//update searchindex
|
||||
if ($this->appSolr != null) {
|
||||
$this->appSolr->updateApplicationSearchIndex($sAppUid);
|
||||
|
||||
@@ -543,6 +543,18 @@ class dynaformEditorAjax extends dynaformEditor implements iDynaformEditorAjax
|
||||
public function set_htmlcode($A, $htmlcode)
|
||||
{
|
||||
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("{", "{", $value);
|
||||
$aTagVar = str_replace("}", "}", $aTagVar);
|
||||
$aTagVar = str_replace("$", "$", $aTagVar);
|
||||
$htmlcode = str_replace($value, $aTagVar, $htmlcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
$file = G::decrypt($A, URL_KEY);
|
||||
$form = new Form($file, PATH_DYNAFORM, SYS_LANG, true);
|
||||
$filename = substr($form->fileName, 0, - 3) . ($form->type === 'xmlform' ? '' : '.' . $form->type) . 'html';
|
||||
|
||||
@@ -1096,10 +1096,10 @@ class System
|
||||
|
||||
$md5 = array ();
|
||||
if ($readGlobalIniFile) {
|
||||
$md5[] = md5_file( $globalIniFile );
|
||||
$md5[] = @md5_file( $globalIniFile );
|
||||
}
|
||||
if ($readWsIniFile) {
|
||||
$md5[] = md5_file( $wsIniFile );
|
||||
$md5[] = @md5_file( $wsIniFile );
|
||||
}
|
||||
$hash = implode( '-', $md5 );
|
||||
|
||||
|
||||
@@ -89,7 +89,14 @@ class workspaceTools
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Updating cases directories structure
|
||||
*
|
||||
*/
|
||||
public function updateStructureDirectories($workSpace = SYS_SYS)
|
||||
{
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating cases directories structure...\n");
|
||||
$this->upgradeCasesDirectoryStructure($workSpace);
|
||||
@@ -548,7 +555,7 @@ class workspaceTools
|
||||
rmdir($UIdDir);//remove the diretory itself, G::rm_dir cannot do it
|
||||
} else {
|
||||
CLI::logging(CLI::error("Error: Failure at coping from $UIdDir...\n"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
CLI::logging("$UIdDir is empty, removing it\n");
|
||||
rmdir($UIdDir);//remove the diretory itself
|
||||
@@ -575,7 +582,7 @@ class workspaceTools
|
||||
unlink($file[$index]);
|
||||
} else {
|
||||
CLI::logging(CLI::error("Error: Failure at copy $file[$index] files...\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -583,13 +590,17 @@ class workspaceTools
|
||||
$this->initPropel(true);
|
||||
G::LoadClass("configuration");
|
||||
$conf = new Configurations();
|
||||
if ($conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||
$conf->setDirectoryStructureVer(2);
|
||||
CLI::logging(CLI::info("Version Directory Structure is 2 now.\n"));
|
||||
} else {
|
||||
CLI::logging(CLI::error("Error: found at try to use ENVIRONMENT_SETTINGS row.\n"));
|
||||
return;
|
||||
if (!$conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||
$conf->aConfig = array ("format" => '@userName (@firstName @lastName)',
|
||||
"dateFormat" => 'd/m/Y',
|
||||
"startCaseHideProcessInf" => false,
|
||||
"casesListDateFormat" => 'Y-m-d H:i:s',
|
||||
"casesListRowNumber" => 25,
|
||||
"casesListRefreshTime" => 120 );
|
||||
$conf->saveConfig( 'ENVIRONMENT_SETTINGS', '' );
|
||||
}
|
||||
$conf->setDirectoryStructureVer(2);
|
||||
CLI::logging(CLI::info("Version Directory Structure is 2 now.\n"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -622,7 +633,7 @@ class workspaceTools
|
||||
$this->upgradeData();
|
||||
p11835::execute();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade this workspace database from a schema
|
||||
@@ -1180,12 +1191,12 @@ class workspaceTools
|
||||
if (isset($srcWorkspace) && !in_array("$srcWorkspace.meta", array_map(BASENAME, $metaFiles))) {
|
||||
throw new Exception("Workspace $srcWorkspace not found in backup");
|
||||
}
|
||||
|
||||
|
||||
$version = System::getVersion();
|
||||
$version = explode('-', $version);
|
||||
$versionPresent = ( isset($version[0])) ? $version[0] : '';
|
||||
CLI::logging(CLI::warning("
|
||||
Note.- If you try to execute a restore from a generated backup on a recent version of Processmaker
|
||||
Note.- If you try to execute a restore from a generated backup on a recent version of Processmaker
|
||||
than version you are using currently to restore it, it may be occur errors on the restore process,
|
||||
it shouldn't be restaured generated backups on later versions than version when the restore is executed") . "\n");
|
||||
|
||||
@@ -1285,7 +1296,7 @@ class workspaceTools
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
|
||||
|
||||
|
||||
|
||||
mysql_close($link);
|
||||
}
|
||||
@@ -1296,5 +1307,55 @@ class workspaceTools
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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->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')) {
|
||||
$oSpool->sendMail();
|
||||
}
|
||||
|
||||
@@ -260,6 +260,7 @@ class Translation extends BaseTranslation
|
||||
$POFile = new i18n_PO( $languageFile );
|
||||
$POFile->readInit();
|
||||
while ($rowTranslation = $POFile->getTranslation()) {
|
||||
$context = '';
|
||||
foreach ($POFile->translatorComments as $a => $aux) {
|
||||
$aux = trim( $aux );
|
||||
if ($aux == 'TRANSLATION') {
|
||||
@@ -281,7 +282,7 @@ class Translation extends BaseTranslation
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($identifier == 'TRANSLATION') {
|
||||
if ($identifier == 'TRANSLATION' && $context != '') {
|
||||
list ($category, $id) = explode( '/', $context );
|
||||
$translation[$id] = $rowTranslation['msgstr'] ;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
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"
|
||||
"PO-Revision-Date: 2013-06-05 13:33:25\n"
|
||||
"PO-Revision-Date: 2013-06-26 12:29:31\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Colosa Developers Team <developers@colosa.com>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -5236,8 +5236,8 @@ msgstr "Off"
|
||||
# TRANSLATION
|
||||
# LABEL/ID_NO_SELECTION_WARNING
|
||||
#: LABEL/ID_NO_SELECTION_WARNING
|
||||
msgid "Select a item from the list please."
|
||||
msgstr "Select a item from the list please."
|
||||
msgid "One item should be selected in order to execute the action."
|
||||
msgstr "One item should be selected in order to execute the action."
|
||||
|
||||
# TRANSLATION
|
||||
# JAVASCRIPT/ID_REQUIRED_NAME_TRIGGERS
|
||||
@@ -12940,8 +12940,8 @@ msgstr "Could not create the installation log"
|
||||
# TRANSLATION
|
||||
# LABEL/ID_PREVIUS
|
||||
#: LABEL/ID_PREVIUS
|
||||
msgid "Previus"
|
||||
msgstr "Previus"
|
||||
msgid "[LABEL/ID_PREVIUS] Previous"
|
||||
msgstr "Previous"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_UPLOAD_COMPLETE
|
||||
@@ -14905,6 +14905,30 @@ msgstr "You forgot the name of the Case Scheduler"
|
||||
msgid "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
|
||||
#: text - ADD_TAB_NAME
|
||||
|
||||
@@ -360,11 +360,6 @@ class Home extends Controller
|
||||
$_SESSION['STEP_POSITION'] = 0;
|
||||
$_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();
|
||||
$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
|
||||
|
||||
@@ -3150,7 +3150,7 @@ SELECT 'LABEL','ID_ON','en','On','2013-05-15'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_OFF','en','Off','2013-05-15'
|
||||
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
|
||||
SELECT 'JAVASCRIPT','ID_REQUIRED_NAME_TRIGGERS','en','You forgot the title of the trigger','2013-05-15'
|
||||
UNION ALL
|
||||
@@ -5750,7 +5750,7 @@ SELECT 'LABEL','ID_DOES_NOT_EXIST','en','does not exist','2013-03-07'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_CREATE_LOG_INSTALLATION','en','Could not create the installation log','2013-03-07'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_PREVIUS','en','Previus','2013-03-07'
|
||||
SELECT 'LABEL','ID_PREVIUS','en','Previous','2013-06-13'
|
||||
UNION ALL
|
||||
SELECT 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2013-03-07'
|
||||
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'
|
||||
UNION ALL
|
||||
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])
|
||||
|
||||
@@ -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_ON','en','On','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_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') ,
|
||||
@@ -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_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_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_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') ,
|
||||
@@ -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
|
||||
|
||||
( '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
|
||||
('AD','','',' ','') ,
|
||||
|
||||
@@ -58,23 +58,36 @@ if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||
|
||||
$delIndex = array();
|
||||
$respMess = "";
|
||||
if (count($respView['MSGS_HISTORY'])>0) {
|
||||
$respMess = $respView['MSGS_HISTORY']['PERMISSION'];
|
||||
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX'];
|
||||
|
||||
if (count($respView["MSGS_HISTORY"]) > 0) {
|
||||
$respMess = $respView["MSGS_HISTORY"]["PERMISSION"];
|
||||
|
||||
if (isset($respView["MSGS_HISTORY"]["DEL_INDEX"])) {
|
||||
$delIndex = $respView["MSGS_HISTORY"]["DEL_INDEX"];
|
||||
}
|
||||
|
||||
} else {
|
||||
if (count($respBlock['MSGS_HISTORY'])>0) {
|
||||
$respMess = $respBlock['MSGS_HISTORY']['PERMISSION'];
|
||||
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX'];
|
||||
if (count($respBlock["MSGS_HISTORY"]) > 0) {
|
||||
$respMess = $respBlock["MSGS_HISTORY"]["PERMISSION"];
|
||||
|
||||
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
|
||||
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
|
||||
}
|
||||
|
||||
} else {
|
||||
if (count($respResend['MSGS_HISTORY'])>0) {
|
||||
$respMess = $respResend['MSGS_HISTORY']['PERMISSION'];
|
||||
$delIndex = $respView['MSGS_HISTORY']['DEL_INDEX'];
|
||||
if (count($respResend["MSGS_HISTORY"]) > 0) {
|
||||
|
||||
$respMess = $respResend["MSGS_HISTORY"]["PERMISSION"];
|
||||
|
||||
if (isset($respBlock["MSGS_HISTORY"]["DEL_INDEX"])) {
|
||||
$delIndex = $respBlock["MSGS_HISTORY"]["DEL_INDEX"];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($appMessageArray as $index => $value) {
|
||||
if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) &&
|
||||
if (($appMessageArray[$index]['APP_MSG_SHOW_MESSAGE'] == 1 && $respMess != 'BLOCK' ) &&
|
||||
($appMessageArray[$index]['DEL_INDEX'] == 0 || in_array($appMessageArray[$index]['DEL_INDEX'], $delIndex ))) {
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
||||
if ($respMess == 'BLOCK' || $respMess == '') {
|
||||
|
||||
@@ -250,11 +250,6 @@ function startCase ()
|
||||
|
||||
$_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();
|
||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||
|
||||
|
||||
@@ -184,7 +184,11 @@ try {
|
||||
//Obtain previous and next step - End
|
||||
|
||||
$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)) . '\'; ');
|
||||
|
||||
@@ -34,25 +34,21 @@ if (isset($_REQUEST['dynaformEditorParams'])) {
|
||||
if (isset($_REQUEST['dynaformRestoreValues'])) {
|
||||
|
||||
$aRetValues = unserialize(stripslashes(base64_decode($_REQUEST['dynaformRestoreValues'])));
|
||||
|
||||
if (isset($aRetValues['APP_DATA'])) {
|
||||
$_SESSION['APP_DATA'] = $aRetValues['APP_DATA'];
|
||||
|
||||
if (isset($aRetValues['APP_DATA']['APPLICATION'])) {
|
||||
$_SESSION['APPLICATION'] = $aRetValues['APP_DATA']['APPLICATION'];
|
||||
}
|
||||
if (isset($aRetValues['APP_DATA']['PROCESS'])) {
|
||||
$_SESSION['PROCESS'] = $aRetValues['APP_DATA']['PROCESS'];
|
||||
}
|
||||
if (isset($aRetValues['APP_DATA']['TASK'])) {
|
||||
$_SESSION['TASK'] = $aRetValues['APP_DATA']['TASK'];
|
||||
}
|
||||
if (isset($aRetValues['APP_DATA']['INDEX'])) {
|
||||
$_SESSION['INDEX'] = $aRetValues['APP_DATA']['INDEX'];
|
||||
}
|
||||
if (isset($aRetValues['APP_DATA']['TRIGGER_DEBUG'])) {
|
||||
$_SESSION['TRIGGER_DEBUG'] = $aRetValues['APP_DATA']['TRIGGER_DEBUG'];
|
||||
}
|
||||
|
||||
if (isset($aRetValues['APPLICATION'])) {
|
||||
$_SESSION['APPLICATION'] = $aRetValues['APPLICATION'];
|
||||
}
|
||||
if (isset($aRetValues['PROCESS'])) {
|
||||
$_SESSION['PROCESS'] = $aRetValues['PROCESS'];
|
||||
}
|
||||
if (isset($aRetValues['TASK'])) {
|
||||
$_SESSION['TASK'] = $aRetValues['TASK'];
|
||||
}
|
||||
if (isset($aRetValues['INDEX'])) {
|
||||
$_SESSION['INDEX'] = $aRetValues['INDEX'];
|
||||
}
|
||||
if (isset($aRetValues['TRIGGER_DEBUG'])) {
|
||||
$_SESSION['TRIGGER_DEBUG'] = $aRetValues['TRIGGER_DEBUG'];
|
||||
}
|
||||
}
|
||||
die(G::json_encode($response));
|
||||
@@ -36,10 +36,15 @@ switch ($request) {
|
||||
break;
|
||||
case "save":
|
||||
$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", "" );
|
||||
|
||||
$response = new stdclass();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<form id="form[{$form->id}]" name="form[{$form->name}]" action="{$form->action}" method="post" style="margin:0px;" class="formSearch">
|
||||
<table class="borderForm" id="{$form->name}" name="{$form->name}" class="basicTable" width='{$form->width}' cellspacing="0" cellpadding="0" style="display:none;width:{$form->width};">
|
||||
<tr>
|
||||
<td valign='top'>
|
||||
<td valign='top'>
|
||||
{if isset($form->title) && $form->title !=='' }
|
||||
<table class="Header" width='100%'>
|
||||
<tr>
|
||||
@@ -70,6 +70,7 @@ var form_{$form->id};
|
||||
var i;
|
||||
function loadForm_{$form->id}(ajaxServer)
|
||||
{literal}{{/literal}
|
||||
swSubmitValidateForm = 1;
|
||||
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}');
|
||||
var myForm=form_{$form->id};
|
||||
|
||||
@@ -80,6 +80,7 @@ var form_{$form->id};
|
||||
var i;
|
||||
function loadForm_{$form->id}(ajaxServer)
|
||||
{literal}{{/literal}
|
||||
swSubmitValidateForm = 1;
|
||||
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
|
||||
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
|
||||
var myForm=form_{$form->id};
|
||||
|
||||
@@ -979,15 +979,16 @@ function createReportTable()
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//validate process
|
||||
if(Ext.getCmp('PROCESS').getValue().trim() == '') {
|
||||
Ext.getCmp('PROCESS').focus();
|
||||
PMExt.error(_('ID_ERROR'), _('ID_PROCESS_IS_REQUIRED'), function(){
|
||||
Ext.getCmp('PROCESS').focus();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//validate process
|
||||
PRO_UID = (PRO_UID !== false) ? PRO_UID : ((Ext.getCmp('PROCESS').getValue().trim() != '') ? Ext.getCmp('PROCESS').getValue().trim() : '');
|
||||
if(PRO_UID == '') {
|
||||
Ext.getCmp('PROCESS').focus();
|
||||
PMExt.error(_('ID_ERROR'), _('ID_PROCESS_IS_REQUIRED'), function(){
|
||||
Ext.getCmp('PROCESS').focus();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// validate table name length
|
||||
if(tableName.length < 4) {
|
||||
|
||||
@@ -93,6 +93,7 @@ try {
|
||||
$iCantidad2 = StepTriggerPeer::doCount($oCriteria);
|
||||
$oCriteria = $oProcessMap->getStepTriggersCriteria(-2, $_SESSION['TASK'], 'AFTER');
|
||||
$iCantidad3 = StepTriggerPeer::doCount($oCriteria);
|
||||
|
||||
$oNode =& $oTree->addChild('-1', ' <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;
|
||||
$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->contracted = true;
|
||||
$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) {
|
||||
die($oException->getMessage());
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
|
||||
function loadForm_{$form->id}(ajaxServer)
|
||||
{literal}{{/literal}
|
||||
swSubmitValidateForm = 1;
|
||||
var i = 0;
|
||||
|
||||
if (typeof(G_Form) == "undefined") {literal}{{/literal}
|
||||
|
||||
@@ -2,6 +2,7 @@ var form_{$form->id};
|
||||
var i;
|
||||
function loadForm_{$form->id}(ajaxServer)
|
||||
{literal}{{/literal}
|
||||
swSubmitValidateForm = 1;
|
||||
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
|
||||
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
|
||||
var myForm=form_{$form->id};
|
||||
|
||||
@@ -93,6 +93,7 @@ if (typeof(__aObjects__) === 'undefined') {literal}{{/literal}
|
||||
{literal}}{/literal}
|
||||
function loadForm_{$form->id}(ajaxServer)
|
||||
{literal}{{/literal}
|
||||
swSubmitValidateForm = 1;
|
||||
if (typeof(G_Form)==='undefined') return alert('form.js was not loaded');
|
||||
form_{$form->id}=new G_Form(document.getElementById('{$form->id}'),'{$form->id}');
|
||||
object_{$form->name} = form_{$form->id};
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<!--<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>
|
||||
</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>
|
||||
</saveasDyna>
|
||||
<!--.-->
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<!--<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>
|
||||
</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>
|
||||
</saveasDyna>
|
||||
<!--.-->
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<en>Script</en>
|
||||
</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>
|
||||
</BTNCOPYSAVE>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
readOnly: true
|
||||
});
|
||||
triggerEditor.setSize(400,200);
|
||||
|
||||
|
||||
function cancel()
|
||||
{
|
||||
currentPopupWindow.remove();
|
||||
|
||||
Reference in New Issue
Block a user