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

This commit is contained in:
Erik Amaru Ortiz
2013-11-21 16:38:05 -04:00
20 changed files with 562 additions and 83 deletions

View File

@@ -108,8 +108,12 @@ class AdditionalTables extends BaseAdditionalTables
$oDataset = FieldsPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
$this->fields[] = $oDataset->getRow();
while ($oDataset->next()) {
$auxField = $oDataset->getRow();
if ($auxField['FLD_TYPE'] == 'TIMESTAMP') {
$auxField['FLD_TYPE'] = 'DATETIME';
}
$this->fields[] = $auxField;
}
return $this->fields;

View File

@@ -486,7 +486,12 @@ class CaseScheduler extends BaseCaseScheduler
$this->updateDate( $sSchedulerUid, $nSchTimeNextRun, $nSchLastRunTime );
}
} elseif ($sActualDataHour == $dActualSysHour && $sActualDataMinutes <= $dActualSysMinutes) {
$_PORT = (isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != '80') ? ':' . $_SERVER['SERVER_PORT'] : '';
$_PORT = '';
if ( isset($_SERVER['SERVER_PORT']) ) {
$_PORT = ($_SERVER['SERVER_PORT'] != '80') ? ':' . $_SERVER['SERVER_PORT'] : '';
} elseif ( defined('SERVER_PORT') ) {
$_PORT = (SERVER_PORT != '80') ? ':' . SERVER_PORT : '';
}
//$defaultEndpoint = 'http://' . $_SERVER ['SERVER_NAME'] . ':' . $_PORT . '/sys' . SYS_SYS .'/'.SYS_LANG.'/classic/green/services/wsdl2';
$defaultEndpoint = 'http://' . SERVER_NAME . $_PORT . '/sys' . SYS_SYS . '/' . SYS_LANG . '/classic/services/wsdl2';
println( " - Connecting webservice: $defaultEndpoint" );

View File

@@ -754,8 +754,7 @@ class Process extends BaseProcess
usort( $aProcesses, array($this, "ordProcessAsc") );
} else {
usort( $aProcesses, array($this, "ordProcessDesc") );
}
$aProcesses = array_splice($aProcesses, $start, $limit);
}
return $aProcesses;
}
@@ -879,6 +878,9 @@ class Process extends BaseProcess
public function ordProcessAsc ($a, $b)
{
if (($this->sort) == '') {
$this->sort = 'PRO_TITLE';
}
if ($a[$this->sort] > $b[$this->sort]) {
return 1;
} elseif ($a[$this->sort] < $b[$this->sort]) {
@@ -889,7 +891,10 @@ class Process extends BaseProcess
}
public function ordProcessDesc ($a, $b)
{
{
if (($this->sort) == '') {
$this->sort = 'PRO_TITLE';
}
if ($a[$this->sort] > $b[$this->sort]) {
return - 1;
} elseif ($a[$this->sort] < $b[$this->sort]) {