Merged in 3.1 (pull request #4709)
Updating branch HOR-1500 with changes in 3.1 (2016-08-09)
This commit is contained in:
37
build.php
Normal file
37
build.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Process Maker Php Build tool v. 0.3.1
|
||||
* Rev. 05-27-2016
|
||||
*
|
||||
* Use this as an external tool for Phpstorm
|
||||
* Configure as it follows:
|
||||
*
|
||||
* Name: PM php Builder
|
||||
* Group: Process Maker
|
||||
* Description: Process Maker Php Builder.
|
||||
* Tools Settings
|
||||
* Program: $PhpExecutable$
|
||||
* Parameters:
|
||||
* build.php --base_dir=$ProjectFileDir$ --mode=prod --extension
|
||||
* --extensionDir=$ProjectFileDir$/workflow/engine/plugins
|
||||
* Working Directory: $ProjectFileDir$
|
||||
* Please, notice you can change --extensionDir to your own extension folder.
|
||||
*
|
||||
* Also, use the respective directory owner permisions:
|
||||
* ~/processmaker$ sudo chown -R www-data:www-data workflow/public_html/
|
||||
* ~/processmaker$ sudo chown -R www-data:www-data vendor/colosa/MichelangeloFE/build
|
||||
*
|
||||
* Use a shortcut:
|
||||
*
|
||||
* Go to Settings -> Appearance & Behavior -> Keymap, search for ProcessMaker, open the context
|
||||
* menu of the option and select Add Keyboard Shortcut, use whatever shortcut you want, for example Alt+b
|
||||
*
|
||||
* If you need help: php build.php --help
|
||||
*
|
||||
*/
|
||||
include_once('class.Build.php');
|
||||
use Build\Utils\ProcessMakerPhpBuilderHelper;
|
||||
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->utils->echoContent("Config finished, start deploying...");
|
||||
$phpBuilder->buildAll();
|
||||
1397
class.Build.php
Executable file
1397
class.Build.php
Executable file
File diff suppressed because it is too large
Load Diff
@@ -739,6 +739,9 @@ class Cases
|
||||
$cri->addSelectColumn(AppDelegationPeer::TAS_UID);
|
||||
$cri->add(AppDelegationPeer::APP_UID, $sAppUid);
|
||||
$cri->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
|
||||
if(isset($fields['DEL_INDEX'])){
|
||||
$cri->add(AppDelegationPeer::DEL_INDEX, $fields['DEL_INDEX']);
|
||||
}
|
||||
$rsCri = AppDelegationPeer::doSelectRS($cri);
|
||||
$rsCri->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rsCri->next();
|
||||
@@ -908,6 +911,9 @@ class Cases
|
||||
if (isset($Fields['APP_DESCRIPTION'])) {
|
||||
$appFields['APP_DESCRIPTION'] = $Fields['APP_DESCRIPTION'];
|
||||
}
|
||||
if(isset($Fields['DEL_INDEX'])){
|
||||
$appFields['DEL_INDEX'] = $Fields['DEL_INDEX'];
|
||||
}
|
||||
|
||||
$arrayNewCaseTitleAndDescription = $this->newRefreshCaseTitleAndDescription($sAppUid, $appFields, $aApplicationFields);
|
||||
|
||||
@@ -2106,6 +2112,7 @@ class Cases
|
||||
//DONE: Al ya existir un delegation, se puede "calcular" el caseTitle.
|
||||
$Fields = $Application->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$aApplicationFields = $Fields['APP_DATA'];
|
||||
$Fields['DEL_INDEX'] = $iDelIndex;
|
||||
$newValues = $this->newRefreshCaseTitleAndDescription($sAppUid, $Fields, $aApplicationFields);
|
||||
if (!isset($newValues['APP_TITLE'])) {
|
||||
$newValues['APP_TITLE'] = '';
|
||||
@@ -3943,7 +3950,7 @@ class Cases
|
||||
* @return object
|
||||
*/
|
||||
|
||||
public function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null)
|
||||
public function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null, $appTitle = null)
|
||||
{
|
||||
// Check if the case is unassigned
|
||||
if($this->isUnassignedPauseCase($sApplicationUID, $iDelegation)){
|
||||
@@ -3992,11 +3999,12 @@ class Cases
|
||||
$this->getExecuteTriggerProcess($sApplicationUID, 'PAUSED');
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$data = array (
|
||||
'APP_UID' => $sApplicationUID,
|
||||
$data = array(
|
||||
'APP_UID' => $sApplicationUID,
|
||||
'DEL_INDEX' => $iDelegation,
|
||||
'USR_UID' => $sUserUID,
|
||||
'APP_RESTART_DATE' => $sUnpauseDate
|
||||
'USR_UID' => $sUserUID,
|
||||
'APP_RESTART_DATE' => $sUnpauseDate,
|
||||
'APP_TITLE' => ($appTitle != null) ? $appTitle : $aFields['APP_TITLE']
|
||||
);
|
||||
$data = array_merge($aFields, $data);
|
||||
$oListPaused = new ListPaused();
|
||||
|
||||
@@ -1791,7 +1791,6 @@ class PMPluginRegistry
|
||||
return $this->_aOpenReassignCallback;
|
||||
}
|
||||
|
||||
|
||||
public function getPluginsData()
|
||||
{
|
||||
return $this->_aPlugins;
|
||||
@@ -1825,7 +1824,7 @@ class PMPluginRegistry
|
||||
*/
|
||||
public function isEnterprisePlugin($pluginName, $path = null)
|
||||
{
|
||||
$path = (!is_null($path) && $path != '')? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$path = (!is_null($path) && $path != '') ? rtrim($path, '/\\') . PATH_SEP : PATH_PLUGINS;
|
||||
$pluginFile = $pluginName . '.php';
|
||||
|
||||
//Return
|
||||
@@ -1834,5 +1833,20 @@ class PMPluginRegistry
|
||||
str_replace(["\n", "\r", "\t"], ' ', file_get_contents($path . $pluginFile))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this for extensions
|
||||
*
|
||||
* @return array with namespace and plugin folder
|
||||
*/
|
||||
public function getEnabledPlugins()
|
||||
{
|
||||
$enabledPlugins = array();
|
||||
foreach ($this->_aPluginDetails as $row) {
|
||||
if ($row->enabled) {
|
||||
$enabledPlugins[$row->sNamespace] = $row->sPluginFolder;
|
||||
}
|
||||
}
|
||||
return $enabledPlugins;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,12 +26,14 @@ class ListPaused extends BaseListPaused {
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ApplicationPeer::APP_TITLE);
|
||||
$criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$criteria->add(ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL);
|
||||
$dataset = ApplicationPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['APP_TITLE'] = $aRow['APP_TITLE'];
|
||||
if (!isset($data['APP_TITLE'])) {
|
||||
$data['APP_TITLE'] = $aRow['APP_TITLE'];
|
||||
}
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(ProcessPeer::PRO_TITLE);
|
||||
|
||||
@@ -103,7 +103,6 @@ class ListUnassigned extends BaseListUnassigned
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_TITLE );
|
||||
$criteria->addSelectColumn( ApplicationPeer::APP_UPDATE_DATE );
|
||||
$criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
|
||||
$dataset = ApplicationPeer::doSelectRS($criteria);
|
||||
|
||||
@@ -12,7 +12,16 @@ if ($RBAC->userCanAccess("PM_CASES") == 1) {
|
||||
"/images/simplified/folder-grey3.png", null, null, null);
|
||||
$G_TMP_MENU->AddIdRawOption("S_NEW_CASE", "#", G::LoadTranslation("ID_NEW_CASE"),
|
||||
"/images/simplified/plus-set-grey.png", null, null, null);
|
||||
$G_TMP_MENU->AddIdRawOption("S_ADVANCED_SEARCH", "home/appAdvancedSearch", G::LoadTranslation("ID_ADVANCEDSEARCH"),
|
||||
"/images/simplified/advancedSearch.png", null, null, null);
|
||||
}
|
||||
|
||||
if ($RBAC->userCanAccess('PM_ALLCASES') == 1) {
|
||||
$G_TMP_MENU->AddIdRawOption(
|
||||
'S_ADVANCED_SEARCH',
|
||||
'home/appAdvancedSearch',
|
||||
G::LoadTranslation('ID_ADVANCEDSEARCH'),
|
||||
'/images/simplified/advancedSearch.png',
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
@@ -405,8 +405,9 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$APP_UID = $_SESSION['APPLICATION'];
|
||||
$DEL_INDEX = $_SESSION['INDEX'];
|
||||
}
|
||||
$appTitle = $_POST['APP_TITLE'];
|
||||
|
||||
$oCase->pauseCase( $APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate );
|
||||
$oCase->pauseCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate, $appTitle);
|
||||
break;
|
||||
case 'unpauseCase':
|
||||
$sApplicationUID = (isset( $_POST['sApplicationUID'] )) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION'];
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
include_once (PATH_TRUNK."/class.Build.php");
|
||||
use Build\Utils\ProcessMakerPhpBuilderHelper;
|
||||
|
||||
// lets display the items
|
||||
$pluginFile = $_GET['id'];
|
||||
@@ -86,6 +88,16 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
}
|
||||
}
|
||||
closedir( $handle );
|
||||
/**
|
||||
* Calls PMExtensionClass Builder to include Plugins changes.
|
||||
*/
|
||||
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->enabledExtensions = $oPluginRegistry->getEnabledPlugins();
|
||||
if (!empty($phpBuilder->enabledExtensions)) {
|
||||
$phpBuilder->extension = true;
|
||||
}
|
||||
$phpBuilder->buildAll();
|
||||
}
|
||||
|
||||
//$oPluginRegistry->showArrays();
|
||||
|
||||
@@ -344,7 +344,8 @@ function pauseCase(date){
|
||||
APP_UID: rowModel.data.APP_UID,
|
||||
DEL_INDEX: rowModel.data.DEL_INDEX,
|
||||
NOTE_REASON: noteReasonTxt,
|
||||
NOTIFY_PAUSE: notifyReasonVal
|
||||
NOTIFY_PAUSE: notifyReasonVal,
|
||||
APP_TITLE: rowModel.data.APP_TITLE
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user