Merged in 3.1 (pull request #4737)

Updating branch HOR-1500 with last changes in 3.1 (2016-08-11)
This commit is contained in:
Julio Cesar Laura Avendaño
2016-08-11 15:42:38 -04:00
6 changed files with 180 additions and 56 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -60,8 +60,6 @@ include_once 'phing/system/util/Register.php';
*/
class Phing {
const inclDir = 'include_path';
/** The default build file name */
const DEFAULT_BUILD_FILENAME = "build.xml";
@@ -860,9 +858,7 @@ class Phing {
}
$firstPath = explode(":", implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
if (is_dir($firstPath[0])) {
$sPath = implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts))
$inclDir = self::inclDir;
ini_set($inclDir, $sPath);
ini_set('include_path', implode(PATH_SEPARATOR, array_merge($new_parts, $curr_parts)));
}
}
}

View File

@@ -3129,6 +3129,13 @@ class wsBase
$g->sessionVarRestore();
return $result;
}
$oAppThread = new AppThread();
$cant = $oAppThread->countStatus($caseUid, 'OPEN');
if($cant > 1){
$result = new wsResponse( 100, G::LoadTranslation( "ID_CASE_CANCELLED_PARALLEL" ) );
$g->sessionVarRestore();
return $result;
}
$case = new Cases();
$case->cancelCase( $caseUid, $delIndex, $userUid );

View File

@@ -114,5 +114,15 @@ class AppThread extends BaseAppThread
throw($oError);
}
}
public function countStatus($appUid, $status='OPEN'){
$c = new Criteria('workflow');
$c->clearSelectColumns();
$c->addSelectColumn( AppThreadPeer::APP_THREAD_PARENT );
$c->add(AppThreadPeer::APP_UID, $appUid );
$c->add(AppThreadPeer::APP_THREAD_STATUS , $status );
$cant = AppThreadPeer::doCount($c);
return $cant;
}
}

View File

@@ -498,7 +498,7 @@ class Translation extends BaseTranslation
}
}
return $environments;
return $this->sortByColumn($environments, 'LANGUAGE');
/*
G::LoadSystem('dbMaintenance');
@@ -520,6 +520,31 @@ class Translation extends BaseTranslation
*/
}
/**
* Sorts an array according to a specified column
* Params : array $table
* string $colname
* bool $numeric
**/
public function sortByColumn($table, $colname) {
$tn = $ts = $temp_num = $temp_str = array();
foreach ($table as $key => $row) {
if(is_numeric(substr($row[$colname], 0, 1))) {
$tn[$key] = $row[$colname];
$temp_num[$key] = $row;
}
else {
$ts[$key] = $row[$colname];
$temp_str[$key] = $row;
}
}
unset($table);
array_multisort($tn, SORT_ASC, SORT_NUMERIC, $temp_num);
array_multisort($ts, SORT_ASC, SORT_STRING, $temp_str);
return array_merge($temp_num, $temp_str);
}
public function getInfoFromPOFile ($file)
{
G::loadClass( 'i18n_po' );

View File

@@ -5,7 +5,7 @@ use \G;
class Variable
{
public $variableTypes = array('string', 'integer', 'float', 'boolean', 'datetime', 'grid', 'array', 'file');
private $variableTypes = ['string', 'integer', 'float', 'boolean', 'datetime', 'grid', 'array', 'file', 'multiplefile'];
/**
* Create Variable for a Process