Merge branch 'develop' of https://bitbucket.org/colosa/processmaker into feature/PMCORE-1444

This commit is contained in:
Henry Jordan
2020-06-15 17:41:52 +00:00
99 changed files with 5762 additions and 1462 deletions

View File

@@ -2,6 +2,7 @@
use ProcessMaker\BusinessModel\User as BusinessModelUser;
use ProcessMaker\BusinessModel\WebEntryEvent;
use ProcessMaker\Cases\CasesTrait;
/*----------------------------------********---------------------------------*/
use ProcessMaker\ChangeLog\ChangeLog;
/*----------------------------------********---------------------------------*/
@@ -16,6 +17,7 @@ use ProcessMaker\Util\DateTime;
*/
class Cases
{
use CasesTrait;
private $appSolr = null;
public $dir = 'ASC';
public $sort = 'APP_MSG_DATE';

View File

@@ -5,6 +5,7 @@
*/
use ProcessMaker\Model\Application as ModelApplication;
use ProcessMaker\Model\SubApplication as ModelSubApplication;
class Derivation
{
@@ -888,7 +889,7 @@ class Derivation
define( 'TASK_FINISH_TASK', - 2 );
}
$this->case = new cases();
$this->case = new Cases();
//Get data for this DEL_INDEX current
$appFields = $this->case->loadCase( $currentDelegation['APP_UID'], $currentDelegation['DEL_INDEX'] );
@@ -1163,7 +1164,6 @@ class Derivation
$this->verifyIsCaseChild($currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"]);
}
$flagUpdateCase = true;
}
//The variable $iNewDelIndex will be true if we created a new index the variable
@@ -1204,7 +1204,7 @@ class Derivation
* @param array $appFields
* @param array $aSP
*
* @return integer $iNewDelIndex
* @return integer
* @throws /Exception
*/
function doDerivation ($currentDelegation, $nextDel, $appFields, $aSP = null)
@@ -1338,84 +1338,10 @@ class Derivation
//if there are SubProcess to create
if (isset($aSP)) {
//Check if is SelfService the task in the SubProcess
$isSelfService = (empty($aSP['USR_UID'])) ? true : false;
// Create case in the subprocess
$this->subProcessCreation($aSP, $appFields, $currentDelegation, $iNewDelIndex, $iAppThreadIndex);
//Create the new case in the sub-process
//Set the initial date to null the time its created
$aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields, $isSelfService);
//Load the TAS_UID related to the SubProcess
$taskNextDel = TaskPeer::retrieveByPK($aSP["TAS_UID"]); //Sub-Process
//Copy case variables to sub-process case
$aFields = unserialize( $aSP['SP_VARIABLES_OUT'] );
$aNewFields = array ();
$aOldFields = $this->case->loadCase( $aNewCase['APPLICATION'] );
foreach ($aFields as $sOriginField => $sTargetField) {
$sOriginField = trim($sOriginField, " @#%?$=&");
$sTargetField = trim($sTargetField, " @#%?$=&");
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
if (array_key_exists($sOriginField . '_label', $appFields['APP_DATA'])) {
$aNewFields[$sTargetField . '_label'] = $appFields['APP_DATA'][$sOriginField . '_label'];
}
}
//We will to update the new case
$aOldFields['APP_DATA'] = array_merge( $aOldFields['APP_DATA'], $aNewFields );
$aOldFields['APP_STATUS'] = 'TO_DO';
$this->case->updateCase(
$aNewCase['APPLICATION'],
$aOldFields
);
//Create a registry in SUB_APPLICATION table
$aSubApplication = array (
'APP_UID' => $aNewCase['APPLICATION'],
'APP_PARENT' => $currentDelegation['APP_UID'],
'DEL_INDEX_PARENT' => $iNewDelIndex,
'DEL_THREAD_PARENT' => $iAppThreadIndex,
'SA_STATUS' => 'ACTIVE',
'SA_VALUES_OUT' => serialize($aNewFields),
'SA_INIT_DATE' => date('Y-m-d H:i:s')
);
if ($aSP['SP_SYNCHRONOUS'] == 0) {
$aSubApplication['SA_STATUS'] = 'FINISHED';
$aSubApplication['SA_FINISH_DATE'] = $aSubApplication['SA_INIT_DATE'];
}
$oSubApplication = new SubApplication();
$oSubApplication->create( $aSubApplication );
//Update the AppDelegation to execute the update trigger
$AppDelegation = AppDelegationPeer::retrieveByPK( $aNewCase['APPLICATION'], $aNewCase['INDEX'] );
$AppDelegation->save();
//Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") {
$nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#");
if (isset($aOldFields["APP_DATA"][$nextTaskGroupVariable])) {
$dataVariable = $aOldFields["APP_DATA"][$nextTaskGroupVariable];
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
if (!empty($dataVariable)) {
$appAssignSelfServiceValue = new AppAssignSelfServiceValue();
$appAssignSelfServiceValue->create($aNewCase["APPLICATION"], $aNewCase["INDEX"], array("PRO_UID" => $aNewCase["PROCESS"], "TAS_UID" => $aSP["TAS_UID"], "GRP_UID" => ""), $dataVariable);
}
}
}
//We will to send the notifications
$sendNotificationsMobile = $this->sendNotificationsMobile($aOldFields, $aSP, $aNewCase['INDEX']);
$nextTaskData = $taskNextDel->toArray(BasePeer::TYPE_FIELDNAME);
$nextTaskData['USR_UID'] = $aSP['USR_UID'];
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $aNewCase['INDEX']);
//If is ASYNCHRONOUS we will to route the case master
// If is ASYNCHRONOUS we will to route the case master
if ($aSP['SP_SYNCHRONOUS'] == 0) {
$this->case->setDelInitDate( $currentDelegation['APP_UID'], $iNewDelIndex );
$aDeriveTasks = $this->prepareInformation(
@@ -1476,6 +1402,102 @@ class Derivation
return $iNewDelIndex;
}
/**
* Create the sub-process
*
* @param array $subProcessInfo
* @param array $appFields
* @param array $currentDelegation
* @param int $delIndex
* @param int $threadIndex
*
* @return void
*/
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
{
// Check if is SelfService the task in the SubProcess
$isSelfService = empty($subProcessInfo['USR_UID']) ? true : false;
// Create the new case in the sub-process
// Set the initial date to null the time its created
// The DelThreadStatus will create with CLOSED value for avoid to open the case without all the execution
$newCase = $this->case->startCase($subProcessInfo['TAS_UID'], $subProcessInfo['USR_UID'], true, $appFields, $isSelfService);
// Load the TAS_UID related to the SubProcess
$taskNextDel = TaskPeer::retrieveByPK($subProcessInfo["TAS_UID"]); //Sub-Process
// Copy case variables to sub-process case
$fields = unserialize($subProcessInfo['SP_VARIABLES_OUT']);
$newFields = [];
$oldFields = $this->case->loadCase($newCase['APPLICATION']);
foreach ($fields as $originField => $targetField) {
$originField = trim($originField, " @#%?$=&");
$targetField = trim($targetField, " @#%?$=&");
$newFields[$targetField] = isset($appFields['APP_DATA'][$originField]) ? $appFields['APP_DATA'][$originField] : '';
if (array_key_exists($originField . '_label', $appFields['APP_DATA'])) {
$newFields[$targetField . '_label'] = $appFields['APP_DATA'][$originField . '_label'];
}
}
// We will to update the new case
$oldFields['APP_DATA'] = array_merge($oldFields['APP_DATA'], $newFields);
$oldFields['APP_STATUS'] = 'TO_DO';
$this->case->updateCase(
$newCase['APPLICATION'],
$oldFields
);
// Create a registry in SUB_APPLICATION table
$attributes = [
'APP_UID' => $newCase['APPLICATION'],
'APP_PARENT' => $currentDelegation['APP_UID'],
'DEL_INDEX_PARENT' => $delIndex,
'DEL_THREAD_PARENT' => $threadIndex,
'SA_STATUS' => 'ACTIVE',
'SA_VALUES_OUT' => serialize($newFields),
'SA_INIT_DATE' => date('Y-m-d H:i:s')
];
if ($subProcessInfo['SP_SYNCHRONOUS'] == 0) {
$attributes['SA_STATUS'] = 'FINISHED';
$attributes['SA_FINISH_DATE'] = $attributes['SA_INIT_DATE'];
}
$subprocess = ModelSubApplication::create($attributes);
// Update the AppDelegation to execute the update trigger
// Update the DelThreadStatus, the thread is ready for continue
$appDelegation = AppDelegationPeer::retrieveByPK($newCase['APPLICATION'], $newCase['INDEX']);
$appDelegation->setDelThreadStatus('OPEN');
$appDelegation->save();
// Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
$tasGroupVariable = $taskNextDel->getTasGroupVariable();
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && !empty(trim($tasGroupVariable))) {
$nextTaskGroupVariable = trim($tasGroupVariable, " @#");
if (isset($oldFields["APP_DATA"][$nextTaskGroupVariable])) {
$dataVariable = $oldFields["APP_DATA"][$nextTaskGroupVariable];
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
if (!empty($dataVariable)) {
$appAssignSelfServiceValue = new AppAssignSelfServiceValue();
$appAssignSelfServiceValue->create(
$newCase["APPLICATION"],
$newCase["INDEX"],
["PRO_UID" => $newCase["PROCESS"], "TAS_UID" => $subProcessInfo["TAS_UID"], "GRP_UID" => ""],
$dataVariable
);
}
}
}
// We will to send the notifications
$sendNotificationsMobile = $this->sendNotificationsMobile($oldFields, $subProcessInfo, $newCase['INDEX']);
$nextTaskData = $taskNextDel->toArray(BasePeer::TYPE_FIELDNAME);
$nextTaskData['USR_UID'] = $subProcessInfo['USR_UID'];
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $newCase['INDEX']);
}
/**
* This function returns the current user Checking cases where USR_ID exists or checking a subprocess (SYNCHRONOUS)
* @param $nextDel

View File

@@ -29,6 +29,7 @@ class PmDynaform
public $lang = SYS_LANG;
public $translations = null;
public $onPropertyRead = "onPropertyReadFormInstance";
public $onAfterPropertyRead = "onAfterPropertyReadFormInstance";
public $pathRTLCss = '';
public $record = null;
public $records = null;
@@ -545,6 +546,7 @@ class PmDynaform
if (isset($this->fields["APP_DATA"][$json->name . "_label"])) {
$json->data->label = $this->fields["APP_DATA"][$json->name . "_label"];
}
$this->setDependentOptionsForDatetime($json, $this->fields);
}
if ($key === "type" && ($value === "file") && isset($this->fields["APP_DATA"]["APPLICATION"])) {
$oCriteriaAppDocument = new Criteria("workflow");
@@ -771,6 +773,11 @@ class PmDynaform
}
}
}
//read event after
$fn = $this->onAfterPropertyRead;
if (is_callable($fn) || function_exists($fn)) {
$fn($json, $key, $value);
}
}
}
}
@@ -2489,4 +2496,38 @@ class PmDynaform
$json->dataSchema[$key] = $columnsData;
}
}
/**
* Sets the dependentOptions property for datetime control, if it contains dependent fields.
* @param stdClass $json
* @param array $fields
* @return void
*/
private function setDependentOptionsForDatetime(stdClass &$json, array $fields = []): void
{
if (!isset($json->type)) {
return;
}
if ($json->type !== 'datetime') {
return;
}
$json->dependentOptions = '';
$backup = $this->onAfterPropertyRead;
$properties = [
'defaultDate' => $json->defaultDate,
'minDate' => $json->minDate,
'maxDate' => $json->maxDate
];
$this->onAfterPropertyRead = function(stdClass &$json, $key, $value) use($backup, $properties) {
if (isset($json->type) && $json->type === 'datetime' && $key === "dependentOptions") {
$json->dependentOptions = new stdClass();
foreach ($properties as $property => $value) {
if (is_string($value) && in_array(substr($value, 0, 2), self::$prefixs)) {
$json->dependentOptions->{$property} = $value;
}
}
$this->onAfterPropertyRead = $backup;
}
};
}
}

View File

@@ -1,8 +1,8 @@
<?php
use App\Jobs\GenerateReportTable;
use Illuminate\Support\Facades\DB;
use ProcessMaker\Core\MultiProcOpen;
use ProcessMaker\Commands\PopulateTableReport;
use ProcessMaker\Core\JobsManager;
use ProcessMaker\Model\Application;
/**
@@ -205,6 +205,9 @@ class ReportTables
*/
public function populateTable($tableName, $connectionShortName = 'report', $type = 'NORMAL', $fields = [], $proUid = '', $grid = '')
{
$config = System::getSystemConfiguration();
$reportTableBatchRegeneration = $config['report_table_batch_regeneration'];
$tableName = $this->sPrefix . $tableName;
//we have to do the propel connection
$database = $this->chooseDB($connectionShortName);
@@ -222,7 +225,7 @@ class ReportTables
$applications = Application::getByProUid($proUid);
$i = 1;
$queryValues = "";
$numberRecords = 1000;
$numberRecords = $reportTableBatchRegeneration;
$n = count($applications);
foreach ($applications as $application) {
$appData = $case->unserializeData($application->APP_DATA);
@@ -262,11 +265,12 @@ class ReportTables
$queryValues = rtrim($queryValues, ",");
$query = $headQuery . $queryValues;
$queryValues = "";
$workspace = config("system.workspace");
$processesManager = new MultiProcOpen();
$processesManager->chunk(1, 1, function($size, $start, $limit) use ($query, $workspace) {
return new PopulateTableReport($workspace, $query);
});
//add to queue
$closure = function() use($query) {
DB::insert($query);
};
JobsManager::getSingleton()->dispatch(GenerateReportTable::class, $closure);
}
} else {
if (isset($appData[$grid])) {
@@ -304,11 +308,12 @@ class ReportTables
$queryValues = rtrim($queryValues, ",");
$query = $headQuery . $queryValues;
$queryValues = "";
$workspace = config("system.workspace");
$processesManager = new MultiProcOpen();
$processesManager->chunk(1, 1, function($size, $start, $limit) use ($query, $workspace) {
return new PopulateTableReport($workspace, $query);
});
//add to queue
$closure = function() use($query) {
DB::insert($query);
};
JobsManager::getSingleton()->dispatch(GenerateReportTable::class, $closure);
}
}
}

View File

@@ -1,6 +1,8 @@
<?php
use App\Jobs\EmailEvent;
use Illuminate\Support\Facades\Crypt;
use ProcessMaker\BusinessModel\Cases as BmCases;
use ProcessMaker\BusinessModel\EmailServer;
/*----------------------------------********---------------------------------*/
use ProcessMaker\ChangeLog\ChangeLog;
@@ -1028,7 +1030,7 @@ class WsBase
switch ($appMsgType) {
case WsBase::MESSAGE_TYPE_EMAIL_EVENT:
case WsBase::MESSAGE_TYPE_PM_FUNCTION:
JobsManager::getSingleton()->dispatch('EmailEvent', $closure);
JobsManager::getSingleton()->dispatch(EmailEvent::class, $closure);
$result = new WsResponse(0, G::loadTranslation('ID_MESSAGE_SENT') . ": " . $to);
break;
default :
@@ -3419,16 +3421,17 @@ class WsBase
/**
* Add case note
*
* @param string caseUid : ID of the case.
* @param string processUid : ID of the process.
* @param string taskUid : ID of the task.
* @param string userUid : The unique ID of the user who will add note case.
* @param string note : Note of the case.
* @param int sendMail : Optional parameter. If set to 1, will send an email to all participants in the case.
* @param string $caseUid, ID of the case.
* @param string $processUid, ID of the process.
* @param string $taskUid, ID of the task.
* @param string $userUid, The unique ID of the user who will add note case.
* @param string $note, Note of the case.
* @param int $sendMail, Optional parameter. If set to 1, will send an email to all participants in the case.
* @param array $files, Optional parameter. This is an array of files.
*
* @return $result will return an object
* @return object
*/
public function addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1)
public function addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1, $files = [])
{
try {
if (empty($caseUid)) {
@@ -3473,8 +3476,8 @@ class WsBase
}
//Add note case
$appNote = new AppNotes();
$response = $appNote->addCaseNote($caseUid, $userUid, $note, $sendMail);
$appNote = new BmCases();
$response = $appNote->addNote($caseUid, $userUid, $note, $sendMail, $files);
//Response
$result = new WsResponse(0, G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY"));

View File

@@ -249,15 +249,16 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
if (is_null(config('database.connections.' . $DBConnectionUID . '.driver'))) {
// Force to load the external connections
DbConnections::loadAdditionalConnections();
if (config('database.connections.' . $DBConnectionUID . '.driver') !== 'oracle') {
// If the connections drivers are "mysql", "pgsql" or "sqlsrv" we're using Laravel
$con = DB::connection($DBConnectionUID);
$con->beginTransaction();
} else {
// If the connection driver is "oracle" we're using the native oci8 functions
$con = Propel::getConnection($DBConnectionUID);
$con->begin();
}
}
if (config('database.connections.' . $DBConnectionUID . '.driver') !== 'oracle') {
// If the connections drivers are "mysql", "pgsql" or "sqlsrv" we're using Laravel
$con = DB::connection($DBConnectionUID);
$con->beginTransaction();
} else {
// If the connection driver is "oracle" we are using the native oci8 functions
$con = Propel::getConnection($DBConnectionUID);
$con->begin();
}
$blackList = System::getQueryBlackList();
@@ -459,6 +460,123 @@ function evaluateFunction($aGrid, $sExpresion)
return $aGrid;
}
/**
*
* @method
*
* Executes operations in the grid fields, such as sum, average, median, minimum, maximun,
* stantard deviation, variance, percentile, count, count distinct
*
* @name PMFTotalCalculation
* @label PMFTotalCalculation Function
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFTotalCalculation.28.29
* @param array | $grid | Grid | The input grid.
* @param string (32) | $field | Name of field | The name of the field.
* @param string (32) | $function | Operation.
* @return int|float|array | $result | Result | Result according of the function
*
*/
function PMFTotalCalculation($grid, $field, $function)
{
$systemConfiguration = Bootstrap::getSystemConfiguration();
$floatPointNumber = $systemConfiguration['pmftotalcalculation_floating_point_number'];
$function = strtolower($function);
$totalRows = count($grid);
$result = 0;
$sum = 0;
switch ($function) {
case "sum":
for ($i = 1; $i <= $totalRows; $i += 1) {
$result += $grid[$i][$field];
}
break;
case "average":
for ($i = 1; $i <= $totalRows; $i += 1) {
$result += $grid[$i][$field];
}
$result = $result / $totalRows;
break;
case "median":
$arrayAux = [];
for ($i = 1; $i <= $totalRows; $i += 1) {
$arrayAux[] = $grid[$i][$field];
}
sort($arrayAux);
$term = ($totalRows + 1) / 2;
if ($totalRows % 2 === 0) {
$term = floor($term);
$result = ($arrayAux[$term - 1] + $arrayAux[$term]) / 2;
} else {
$result = $arrayAux[$term - 1];
}
break;
case "minimum":
$result = $grid[1][$field];
for ($i = 2; $i <= $totalRows; $i += 1) {
if ($grid[$i][$field] < $result) {
$result = $grid[$i][$field];
}
}
break;
case "maximum":
$result = $grid[1][$field];
for ($i = 2; $i <= $totalRows; $i += 1) {
if ($grid[$i][$field] > $result) {
$result = $grid[$i][$field];
}
}
break;
case "standarddeviation":
$mean = 0;
for ($i = 1; $i <= $totalRows; $i += 1) {
$mean += $grid[$i][$field];
}
$mean = $mean / $totalRows;
for ($i = 1; $i <= $totalRows; $i += 1) {
$result += pow($grid[$i][$field] - $mean, 2);
}
$result = sqrt($result / $totalRows);
break;
case "variance":
$mean = 0;
for ($i = 1; $i <= $totalRows; $i += 1) {
$mean += $grid[$i][$field];
}
$mean = $mean / $totalRows;
for ($i = 1; $i <= $totalRows; $i += 1) {
$result += pow($grid[$i][$field] - $mean, 2);
}
$result = $result / $totalRows;
break;
case "percentile":
$result = [];
$arrayAux = [];
for ($i = 1; $i <= $totalRows; $i += 1) {
$sum += $grid[$i][$field];
$arrayAux[$i] = $grid[$i][$field];
}
for ($i = 1; $i <= count($arrayAux); $i += 1) {
$result[$i] = round(($arrayAux[$i] * 100) / $sum, $floatPointNumber);
}
break;
case "count":
$result = $totalRows;
break;
case "countdistinct":
$arrayAux = [];
for ($i = 1; $i <= $totalRows; $i += 1) {
$arrayAux[] = $grid[$i][$field];
}
$result = count(array_count_values($arrayAux));
break;
}
if ($function !== "percentile") {
return round($result, $floatPointNumber);
}
return $result;
}
/**
* Web Services Functions *
*/
@@ -2899,13 +3017,15 @@ function PMFUnpauseCase ($caseUid, $delIndex, $userUid)
* @param string(32) | $userUid | ID user | The unique ID of the user who will add note case.
* @param string | $note | Note of the case | Note of the case.
* @param int | $sendMail = 1 | Send mail | Optional parameter. If set to 1, will send an email to all participants in the case.
* @param array | $files | Array of files | An array of files (full paths) to be attached to the case notes.
*
* @return int | $result | Result of the add a case note | Returns 1 if the note has been added to the case.; otherwise, returns 0 if an error occurred.
*
*/
function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1)
function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1, $files = [])
{
$ws = new WsBase();
$result = $ws->addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail);
$result = $ws->addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail, $files);
if ($result->status_code == 0) {
return 1;

View File

@@ -2,9 +2,14 @@
use ProcessMaker\Plugins\PluginRegistry;
spl_autoload_register(function($sClassName) {
if (!empty(config("system.workspace"))) {
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
/**
* The helper 'config()' is loaded via 'spl_autoload_register()' in unit testing.
* The helper is pulled out to avoid an infinite loop.
*/
$workspace = config("system.workspace", null);
spl_autoload_register(function($sClassName) use($workspace) {
if (!empty($workspace)) {
$sPath = PATH_DB . $workspace . PATH_SEP . 'classes' . PATH_SEP;
if (file_exists($sPath . $sClassName . '.php')) {
require_once $sPath . $sClassName . '.php';
}

View File

@@ -1,8 +1,9 @@
<?php
use App\Jobs\GenerateReportTable;
use Illuminate\Support\Facades\DB;
use ProcessMaker\Commands\GenerateDataReport;
use ProcessMaker\Core\MultiProcOpen;
use ProcessMaker\Core\JobsManager;
use ProcessMaker\Core\System;
use ProcessMaker\Model\Application;
use ProcessMaker\Model\Fields;
@@ -735,28 +736,23 @@ class AdditionalTables extends BaseAdditionalTables
$workspace = config("system.workspace");
$pathWorkspace = PATH_WORKSPACE;
$n = Application::count();
$processesManager = new MultiProcOpen();
$processesManager->chunk($n, 1000, function($size, $start, $limit) use(
$workspace,
$tableName,
$type,
$processUid,
$gridKey,
$addTabUid,
$className,
$pathWorkspace) {
return new GenerateDataReport(
$workspace,
$tableName,
$type,
$processUid,
$gridKey,
$addTabUid,
$className,
$pathWorkspace,
$start,
$limit);
});
//batch process
$config = System::getSystemConfiguration();
$reportTableBatchRegeneration = $config['report_table_batch_regeneration'];
$size = $n;
$start = 0;
$limit = $reportTableBatchRegeneration;
for ($i = 1; $start < $size; $i++) {
$closure = function() use($workspace, $tableName, $type, $processUid, $gridKey, $addTabUid, $className, $pathWorkspace, $start, $limit) {
$workspaceTools = new WorkspaceTools($workspace);
$workspaceTools->generateDataReport($tableName, $type, $processUid, $gridKey, $addTabUid, $className, $pathWorkspace, $start, $limit);
};
JobsManager::getSingleton()->dispatch(GenerateReportTable::class, $closure);
$start = $i * $limit;
}
}
/**

View File

@@ -181,6 +181,9 @@ class AppDelegation extends BaseAppDelegation
$criteriaUpdate->add(AppDelegationPeer::DEL_LAST_INDEX, 0);
BasePeer::doUpdate($criteria, $criteriaUpdate, Propel::getConnection('workflow'));
// Define the status of the thread, if is subprocess we need to CLOSED the thread
$theadStatus = !$isSubprocess ? 'OPEN' : 'CLOSED';
$this->setAppUid($sAppUid);
$this->setProUid($sProUid);
$this->setTasUid($sTasUid);
@@ -191,7 +194,7 @@ class AppDelegation extends BaseAppDelegation
$this->setDelType('NORMAL');
$this->setDelPriority(($iPriority != '' ? $iPriority : '3'));
$this->setDelThread($sAppThread);
$this->setDelThreadStatus('OPEN');
$this->setDelThreadStatus($theadStatus);
$this->setDelDelegateDate('now');
$this->setAppNumber($appNumber);
$this->setTasId($taskId);

View File

@@ -1,6 +1,7 @@
<?php
use ProcessMaker\Core\System;
use ProcessMaker\Model\Documents;
use ProcessMaker\Util\DateTime;
/**
@@ -180,21 +181,29 @@ class AppNotes extends BaseAppNotes
* @param string $noteRecipients
* @param string $from
* @param integer $delIndex
* @param integer $noteId
* @return void
* @throws Exception
*
* @see AppNotes->addCaseNote()
* @see AppNotes->postNewNote()
* @see workflow/engine/src/ProcessMaker/Util/helpers.php::postNote()
*/
public function sendNoteNotification ($appUid, $usrUid, $noteContent, $noteRecipients, $from = '', $delIndex = 0)
*/
public function sendNoteNotification(
$appUid,
$usrUid,
$noteContent,
$noteRecipients,
$from = '',
$delIndex = 0,
$noteId = 0
)
{
try {
$configuration = System::getEmailConfiguration();
$msgError = "";
if (! isset( $configuration['MESS_ENABLED'] ) || $configuration['MESS_ENABLED'] != '1') {
if (!isset($configuration['MESS_ENABLED']) || $configuration['MESS_ENABLED'] != '1') {
$msgError = "The default configuration wasn't defined";
$configuration['MESS_ENGINE'] = '';
}
@@ -211,20 +220,31 @@ class AppNotes extends BaseAppNotes
$cases = new Cases();
$fieldCase = $cases->loadCase($appUid, $delIndex);
$configNoteNotification['subject'] = G::LoadTranslation('ID_MESSAGE_SUBJECT_NOTE_NOTIFICATION') . " @#APP_TITLE ";
//Define the body for the notification
$configNoteNotification['body'] = $this->getBodyCaseNote($authorName, $noteContent);
$body = nl2br(G::replaceDataField($configNoteNotification['body'], $fieldCase, 'mysql', false));
// Get the files related to the specific case note
if ($noteId !== 0) {
$attachFileLinks = $this->getAttachedFilesFromTheCaseNote($noteId);
}
if (!empty($attachFileLinks)) {
$body = $body . "<br />" . G::LoadTranslation('ID_ATTACHED_FILES') . ":&nbsp; <br />" . implode("<br />", $attachFileLinks);
}
$users = new Users();
$recipientsArray = explode(",", $noteRecipients);
foreach ($recipientsArray as $recipientUid) {
$userInfo = $users->load($recipientUid);
$to = ((($userInfo['USR_FIRSTNAME'] != '') || ($userInfo['USR_LASTNAME'] != '')) ? $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'] . ' ' : '') . '<' . $userInfo['USR_EMAIL'] . '>';
$ifUserNameDefined = $userInfo['USR_FIRSTNAME'] != '' || $userInfo['USR_LASTNAME'] != '';
$to = ($ifUserNameDefined ? $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'] . ' ' : '') . '<' . $userInfo['USR_EMAIL'] . '>';
$spool = new SpoolRun();
$spool->setConfig($configuration);
$messageArray = AppMessage::buildMessageRow(
$parameters = [
'',
$appUid,
$delIndex,
@@ -244,7 +264,8 @@ class AppNotes extends BaseAppNotes
(isset($fieldCase['APP_NUMBER'])) ? $fieldCase['APP_NUMBER'] : 0,
(isset($fieldCase['PRO_ID'])) ? $fieldCase['PRO_ID'] : 0,
(isset($fieldCase['TAS_ID'])) ? $fieldCase['TAS_ID'] : 0
);
];
$messageArray = AppMessage::buildMessageRow(...$parameters);
$spool->create($messageArray);
if ($msgError == '') {
@@ -252,14 +273,30 @@ class AppNotes extends BaseAppNotes
$spool->sendMail();
}
}
}
//Send derivation notification - End
} catch (Exception $exception) {
throw $exception;
}
}
/**
* Get attached files from a specific case note
* @param int $docId
* @return array
*/
public function getAttachedFilesFromTheCaseNote(int $docId): array
{
$attachFileLinks = [];
$url = System::getServerMainPath();
$result = Documents::getFiles($docId);
foreach ($result as $item) {
$href = $url . "/cases/casesShowCaseNotes?a={$item['APP_DOC_UID']}&v={$item['DOC_VERSION']}";
$attachFileLinks[] = "<a href='{$href}'>{$item['APP_DOC_FILENAME']}</a>";
}
return $attachFileLinks;
}
public function addCaseNote($applicationUid, $userUid, $note, $sendMail)
{
$response = $this->postNewNote($applicationUid, $userUid, $note, false);

View File

@@ -81,6 +81,8 @@ class AppDocumentMapBuilder
$tMap->addColumn('DOC_UID', 'DocUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('DOC_ID', 'DocId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('USR_UID', 'UsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('APP_DOC_TYPE', 'AppDocType', 'string', CreoleTypes::VARCHAR, true, 32);
@@ -127,7 +129,7 @@ class AppDocumentMapBuilder
$tMap->addValidator('USR_UID', 'required', 'propel.validator.RequiredValidator', '', 'User UID is required.');
$tMap->addValidator('APP_DOC_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'INPUT|OUTPUT|ATTACHED', 'Please select a valid document type.');
$tMap->addValidator('APP_DOC_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'INPUT|OUTPUT|ATTACHED|CASE_NOTE', 'Please select a valid document type.');
$tMap->addValidator('APP_DOC_TYPE', 'required', 'propel.validator.RequiredValidator', '', 'Application Document Type is required.');

View File

@@ -77,7 +77,7 @@ class AppMessageMapBuilder
$tMap->addColumn('APP_MSG_TYPE_ID', 'AppMsgTypeId', 'int', CreoleTypes::TINYINT, false, null);
$tMap->addColumn('APP_MSG_SUBJECT', 'AppMsgSubject', 'string', CreoleTypes::VARCHAR, true, 150);
$tMap->addColumn('APP_MSG_SUBJECT', 'AppMsgSubject', 'string', CreoleTypes::VARCHAR, true, 998);
$tMap->addColumn('APP_MSG_FROM', 'AppMsgFrom', 'string', CreoleTypes::VARCHAR, true, 100);

View File

@@ -63,7 +63,9 @@ class AppNotesMapBuilder
$tMap = $this->dbMap->addTable('APP_NOTES');
$tMap->setPhpName('AppNotes');
$tMap->setUseIdGenerator(false);
$tMap->setUseIdGenerator(true);
$tMap->addColumn('NOTE_ID', 'NoteId', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);

View File

@@ -75,6 +75,12 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
*/
protected $doc_uid = '';
/**
* The value for the doc_id field.
* @var int
*/
protected $doc_id = 0;
/**
* The value for the usr_uid field.
* @var string
@@ -255,6 +261,17 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
return $this->doc_uid;
}
/**
* Get the [doc_id] column value.
*
* @return int
*/
public function getDocId()
{
return $this->doc_id;
}
/**
* Get the [usr_uid] column value.
*
@@ -616,6 +633,28 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
} // setDocUid()
/**
* Set the value of [doc_id] column.
*
* @param int $v new value
* @return void
*/
public function setDocId($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->doc_id !== $v || $v === 0) {
$this->doc_id = $v;
$this->modifiedColumns[] = AppDocumentPeer::DOC_ID;
}
} // setDocId()
/**
* Set the value of [usr_uid] column.
*
@@ -949,38 +988,40 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
$this->doc_uid = $rs->getString($startcol + 7);
$this->usr_uid = $rs->getString($startcol + 8);
$this->doc_id = $rs->getInt($startcol + 8);
$this->app_doc_type = $rs->getString($startcol + 9);
$this->usr_uid = $rs->getString($startcol + 9);
$this->app_doc_create_date = $rs->getTimestamp($startcol + 10, null);
$this->app_doc_type = $rs->getString($startcol + 10);
$this->app_doc_index = $rs->getInt($startcol + 11);
$this->app_doc_create_date = $rs->getTimestamp($startcol + 11, null);
$this->folder_uid = $rs->getString($startcol + 12);
$this->app_doc_index = $rs->getInt($startcol + 12);
$this->app_doc_plugin = $rs->getString($startcol + 13);
$this->folder_uid = $rs->getString($startcol + 13);
$this->app_doc_tags = $rs->getString($startcol + 14);
$this->app_doc_plugin = $rs->getString($startcol + 14);
$this->app_doc_status = $rs->getString($startcol + 15);
$this->app_doc_tags = $rs->getString($startcol + 15);
$this->app_doc_status_date = $rs->getTimestamp($startcol + 16, null);
$this->app_doc_status = $rs->getString($startcol + 16);
$this->app_doc_fieldname = $rs->getString($startcol + 17);
$this->app_doc_status_date = $rs->getTimestamp($startcol + 17, null);
$this->app_doc_drive_download = $rs->getString($startcol + 18);
$this->app_doc_fieldname = $rs->getString($startcol + 18);
$this->sync_with_drive = $rs->getString($startcol + 19);
$this->app_doc_drive_download = $rs->getString($startcol + 19);
$this->sync_permissions = $rs->getString($startcol + 20);
$this->sync_with_drive = $rs->getString($startcol + 20);
$this->sync_permissions = $rs->getString($startcol + 21);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 21; // 21 = AppDocumentPeer::NUM_COLUMNS - AppDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 22; // 22 = AppDocumentPeer::NUM_COLUMNS - AppDocumentPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AppDocument object", $e);
@@ -1209,42 +1250,45 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
return $this->getDocUid();
break;
case 8:
return $this->getUsrUid();
return $this->getDocId();
break;
case 9:
return $this->getAppDocType();
return $this->getUsrUid();
break;
case 10:
return $this->getAppDocCreateDate();
return $this->getAppDocType();
break;
case 11:
return $this->getAppDocIndex();
return $this->getAppDocCreateDate();
break;
case 12:
return $this->getFolderUid();
return $this->getAppDocIndex();
break;
case 13:
return $this->getAppDocPlugin();
return $this->getFolderUid();
break;
case 14:
return $this->getAppDocTags();
return $this->getAppDocPlugin();
break;
case 15:
return $this->getAppDocStatus();
return $this->getAppDocTags();
break;
case 16:
return $this->getAppDocStatusDate();
return $this->getAppDocStatus();
break;
case 17:
return $this->getAppDocFieldname();
return $this->getAppDocStatusDate();
break;
case 18:
return $this->getAppDocDriveDownload();
return $this->getAppDocFieldname();
break;
case 19:
return $this->getSyncWithDrive();
return $this->getAppDocDriveDownload();
break;
case 20:
return $this->getSyncWithDrive();
break;
case 21:
return $this->getSyncPermissions();
break;
default:
@@ -1275,19 +1319,20 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
$keys[5] => $this->getAppUid(),
$keys[6] => $this->getDelIndex(),
$keys[7] => $this->getDocUid(),
$keys[8] => $this->getUsrUid(),
$keys[9] => $this->getAppDocType(),
$keys[10] => $this->getAppDocCreateDate(),
$keys[11] => $this->getAppDocIndex(),
$keys[12] => $this->getFolderUid(),
$keys[13] => $this->getAppDocPlugin(),
$keys[14] => $this->getAppDocTags(),
$keys[15] => $this->getAppDocStatus(),
$keys[16] => $this->getAppDocStatusDate(),
$keys[17] => $this->getAppDocFieldname(),
$keys[18] => $this->getAppDocDriveDownload(),
$keys[19] => $this->getSyncWithDrive(),
$keys[20] => $this->getSyncPermissions(),
$keys[8] => $this->getDocId(),
$keys[9] => $this->getUsrUid(),
$keys[10] => $this->getAppDocType(),
$keys[11] => $this->getAppDocCreateDate(),
$keys[12] => $this->getAppDocIndex(),
$keys[13] => $this->getFolderUid(),
$keys[14] => $this->getAppDocPlugin(),
$keys[15] => $this->getAppDocTags(),
$keys[16] => $this->getAppDocStatus(),
$keys[17] => $this->getAppDocStatusDate(),
$keys[18] => $this->getAppDocFieldname(),
$keys[19] => $this->getAppDocDriveDownload(),
$keys[20] => $this->getSyncWithDrive(),
$keys[21] => $this->getSyncPermissions(),
);
return $result;
}
@@ -1344,42 +1389,45 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
$this->setDocUid($value);
break;
case 8:
$this->setUsrUid($value);
$this->setDocId($value);
break;
case 9:
$this->setAppDocType($value);
$this->setUsrUid($value);
break;
case 10:
$this->setAppDocCreateDate($value);
$this->setAppDocType($value);
break;
case 11:
$this->setAppDocIndex($value);
$this->setAppDocCreateDate($value);
break;
case 12:
$this->setFolderUid($value);
$this->setAppDocIndex($value);
break;
case 13:
$this->setAppDocPlugin($value);
$this->setFolderUid($value);
break;
case 14:
$this->setAppDocTags($value);
$this->setAppDocPlugin($value);
break;
case 15:
$this->setAppDocStatus($value);
$this->setAppDocTags($value);
break;
case 16:
$this->setAppDocStatusDate($value);
$this->setAppDocStatus($value);
break;
case 17:
$this->setAppDocFieldname($value);
$this->setAppDocStatusDate($value);
break;
case 18:
$this->setAppDocDriveDownload($value);
$this->setAppDocFieldname($value);
break;
case 19:
$this->setSyncWithDrive($value);
$this->setAppDocDriveDownload($value);
break;
case 20:
$this->setSyncWithDrive($value);
break;
case 21:
$this->setSyncPermissions($value);
break;
} // switch()
@@ -1438,55 +1486,59 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
}
if (array_key_exists($keys[8], $arr)) {
$this->setUsrUid($arr[$keys[8]]);
$this->setDocId($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setAppDocType($arr[$keys[9]]);
$this->setUsrUid($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setAppDocCreateDate($arr[$keys[10]]);
$this->setAppDocType($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setAppDocIndex($arr[$keys[11]]);
$this->setAppDocCreateDate($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setFolderUid($arr[$keys[12]]);
$this->setAppDocIndex($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setAppDocPlugin($arr[$keys[13]]);
$this->setFolderUid($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setAppDocTags($arr[$keys[14]]);
$this->setAppDocPlugin($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setAppDocStatus($arr[$keys[15]]);
$this->setAppDocTags($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setAppDocStatusDate($arr[$keys[16]]);
$this->setAppDocStatus($arr[$keys[16]]);
}
if (array_key_exists($keys[17], $arr)) {
$this->setAppDocFieldname($arr[$keys[17]]);
$this->setAppDocStatusDate($arr[$keys[17]]);
}
if (array_key_exists($keys[18], $arr)) {
$this->setAppDocDriveDownload($arr[$keys[18]]);
$this->setAppDocFieldname($arr[$keys[18]]);
}
if (array_key_exists($keys[19], $arr)) {
$this->setSyncWithDrive($arr[$keys[19]]);
$this->setAppDocDriveDownload($arr[$keys[19]]);
}
if (array_key_exists($keys[20], $arr)) {
$this->setSyncPermissions($arr[$keys[20]]);
$this->setSyncWithDrive($arr[$keys[20]]);
}
if (array_key_exists($keys[21], $arr)) {
$this->setSyncPermissions($arr[$keys[21]]);
}
}
@@ -1532,6 +1584,10 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
$criteria->add(AppDocumentPeer::DOC_UID, $this->doc_uid);
}
if ($this->isColumnModified(AppDocumentPeer::DOC_ID)) {
$criteria->add(AppDocumentPeer::DOC_ID, $this->doc_id);
}
if ($this->isColumnModified(AppDocumentPeer::USR_UID)) {
$criteria->add(AppDocumentPeer::USR_UID, $this->usr_uid);
}
@@ -1662,6 +1718,8 @@ abstract class BaseAppDocument extends BaseObject implements Persistent
$copyObj->setDocUid($this->doc_uid);
$copyObj->setDocId($this->doc_id);
$copyObj->setUsrUid($this->usr_uid);
$copyObj->setAppDocType($this->app_doc_type);

View File

@@ -25,7 +25,7 @@ abstract class BaseAppDocumentPeer
const CLASS_DEFAULT = 'classes.model.AppDocument';
/** The total number of columns. */
const NUM_COLUMNS = 21;
const NUM_COLUMNS = 22;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -55,6 +55,9 @@ abstract class BaseAppDocumentPeer
/** the column name for the DOC_UID field */
const DOC_UID = 'APP_DOCUMENT.DOC_UID';
/** the column name for the DOC_ID field */
const DOC_ID = 'APP_DOCUMENT.DOC_ID';
/** the column name for the USR_UID field */
const USR_UID = 'APP_DOCUMENT.USR_UID';
@@ -105,10 +108,10 @@ abstract class BaseAppDocumentPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppDocUid', 'AppDocFilename', 'AppDocTitle', 'AppDocComment', 'DocVersion', 'AppUid', 'DelIndex', 'DocUid', 'UsrUid', 'AppDocType', 'AppDocCreateDate', 'AppDocIndex', 'FolderUid', 'AppDocPlugin', 'AppDocTags', 'AppDocStatus', 'AppDocStatusDate', 'AppDocFieldname', 'AppDocDriveDownload', 'SyncWithDrive', 'SyncPermissions', ),
BasePeer::TYPE_COLNAME => array (AppDocumentPeer::APP_DOC_UID, AppDocumentPeer::APP_DOC_FILENAME, AppDocumentPeer::APP_DOC_TITLE, AppDocumentPeer::APP_DOC_COMMENT, AppDocumentPeer::DOC_VERSION, AppDocumentPeer::APP_UID, AppDocumentPeer::DEL_INDEX, AppDocumentPeer::DOC_UID, AppDocumentPeer::USR_UID, AppDocumentPeer::APP_DOC_TYPE, AppDocumentPeer::APP_DOC_CREATE_DATE, AppDocumentPeer::APP_DOC_INDEX, AppDocumentPeer::FOLDER_UID, AppDocumentPeer::APP_DOC_PLUGIN, AppDocumentPeer::APP_DOC_TAGS, AppDocumentPeer::APP_DOC_STATUS, AppDocumentPeer::APP_DOC_STATUS_DATE, AppDocumentPeer::APP_DOC_FIELDNAME, AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD, AppDocumentPeer::SYNC_WITH_DRIVE, AppDocumentPeer::SYNC_PERMISSIONS, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DOC_UID', 'APP_DOC_FILENAME', 'APP_DOC_TITLE', 'APP_DOC_COMMENT', 'DOC_VERSION', 'APP_UID', 'DEL_INDEX', 'DOC_UID', 'USR_UID', 'APP_DOC_TYPE', 'APP_DOC_CREATE_DATE', 'APP_DOC_INDEX', 'FOLDER_UID', 'APP_DOC_PLUGIN', 'APP_DOC_TAGS', 'APP_DOC_STATUS', 'APP_DOC_STATUS_DATE', 'APP_DOC_FIELDNAME', 'APP_DOC_DRIVE_DOWNLOAD', 'SYNC_WITH_DRIVE', 'SYNC_PERMISSIONS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
BasePeer::TYPE_PHPNAME => array ('AppDocUid', 'AppDocFilename', 'AppDocTitle', 'AppDocComment', 'DocVersion', 'AppUid', 'DelIndex', 'DocUid', 'DocId', 'UsrUid', 'AppDocType', 'AppDocCreateDate', 'AppDocIndex', 'FolderUid', 'AppDocPlugin', 'AppDocTags', 'AppDocStatus', 'AppDocStatusDate', 'AppDocFieldname', 'AppDocDriveDownload', 'SyncWithDrive', 'SyncPermissions', ),
BasePeer::TYPE_COLNAME => array (AppDocumentPeer::APP_DOC_UID, AppDocumentPeer::APP_DOC_FILENAME, AppDocumentPeer::APP_DOC_TITLE, AppDocumentPeer::APP_DOC_COMMENT, AppDocumentPeer::DOC_VERSION, AppDocumentPeer::APP_UID, AppDocumentPeer::DEL_INDEX, AppDocumentPeer::DOC_UID, AppDocumentPeer::DOC_ID, AppDocumentPeer::USR_UID, AppDocumentPeer::APP_DOC_TYPE, AppDocumentPeer::APP_DOC_CREATE_DATE, AppDocumentPeer::APP_DOC_INDEX, AppDocumentPeer::FOLDER_UID, AppDocumentPeer::APP_DOC_PLUGIN, AppDocumentPeer::APP_DOC_TAGS, AppDocumentPeer::APP_DOC_STATUS, AppDocumentPeer::APP_DOC_STATUS_DATE, AppDocumentPeer::APP_DOC_FIELDNAME, AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD, AppDocumentPeer::SYNC_WITH_DRIVE, AppDocumentPeer::SYNC_PERMISSIONS, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DOC_UID', 'APP_DOC_FILENAME', 'APP_DOC_TITLE', 'APP_DOC_COMMENT', 'DOC_VERSION', 'APP_UID', 'DEL_INDEX', 'DOC_UID', 'DOC_ID', 'USR_UID', 'APP_DOC_TYPE', 'APP_DOC_CREATE_DATE', 'APP_DOC_INDEX', 'FOLDER_UID', 'APP_DOC_PLUGIN', 'APP_DOC_TAGS', 'APP_DOC_STATUS', 'APP_DOC_STATUS_DATE', 'APP_DOC_FIELDNAME', 'APP_DOC_DRIVE_DOWNLOAD', 'SYNC_WITH_DRIVE', 'SYNC_PERMISSIONS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
@@ -118,10 +121,10 @@ abstract class BaseAppDocumentPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppDocUid' => 0, 'AppDocFilename' => 1, 'AppDocTitle' => 2, 'AppDocComment' => 3, 'DocVersion' => 4, 'AppUid' => 5, 'DelIndex' => 6, 'DocUid' => 7, 'UsrUid' => 8, 'AppDocType' => 9, 'AppDocCreateDate' => 10, 'AppDocIndex' => 11, 'FolderUid' => 12, 'AppDocPlugin' => 13, 'AppDocTags' => 14, 'AppDocStatus' => 15, 'AppDocStatusDate' => 16, 'AppDocFieldname' => 17, 'AppDocDriveDownload' => 18, 'SyncWithDrive' => 19, 'SyncPermissions' => 20, ),
BasePeer::TYPE_COLNAME => array (AppDocumentPeer::APP_DOC_UID => 0, AppDocumentPeer::APP_DOC_FILENAME => 1, AppDocumentPeer::APP_DOC_TITLE => 2, AppDocumentPeer::APP_DOC_COMMENT => 3, AppDocumentPeer::DOC_VERSION => 4, AppDocumentPeer::APP_UID => 5, AppDocumentPeer::DEL_INDEX => 6, AppDocumentPeer::DOC_UID => 7, AppDocumentPeer::USR_UID => 8, AppDocumentPeer::APP_DOC_TYPE => 9, AppDocumentPeer::APP_DOC_CREATE_DATE => 10, AppDocumentPeer::APP_DOC_INDEX => 11, AppDocumentPeer::FOLDER_UID => 12, AppDocumentPeer::APP_DOC_PLUGIN => 13, AppDocumentPeer::APP_DOC_TAGS => 14, AppDocumentPeer::APP_DOC_STATUS => 15, AppDocumentPeer::APP_DOC_STATUS_DATE => 16, AppDocumentPeer::APP_DOC_FIELDNAME => 17, AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD => 18, AppDocumentPeer::SYNC_WITH_DRIVE => 19, AppDocumentPeer::SYNC_PERMISSIONS => 20, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DOC_UID' => 0, 'APP_DOC_FILENAME' => 1, 'APP_DOC_TITLE' => 2, 'APP_DOC_COMMENT' => 3, 'DOC_VERSION' => 4, 'APP_UID' => 5, 'DEL_INDEX' => 6, 'DOC_UID' => 7, 'USR_UID' => 8, 'APP_DOC_TYPE' => 9, 'APP_DOC_CREATE_DATE' => 10, 'APP_DOC_INDEX' => 11, 'FOLDER_UID' => 12, 'APP_DOC_PLUGIN' => 13, 'APP_DOC_TAGS' => 14, 'APP_DOC_STATUS' => 15, 'APP_DOC_STATUS_DATE' => 16, 'APP_DOC_FIELDNAME' => 17, 'APP_DOC_DRIVE_DOWNLOAD' => 18, 'SYNC_WITH_DRIVE' => 19, 'SYNC_PERMISSIONS' => 20, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, )
BasePeer::TYPE_PHPNAME => array ('AppDocUid' => 0, 'AppDocFilename' => 1, 'AppDocTitle' => 2, 'AppDocComment' => 3, 'DocVersion' => 4, 'AppUid' => 5, 'DelIndex' => 6, 'DocUid' => 7, 'DocId' => 8, 'UsrUid' => 9, 'AppDocType' => 10, 'AppDocCreateDate' => 11, 'AppDocIndex' => 12, 'FolderUid' => 13, 'AppDocPlugin' => 14, 'AppDocTags' => 15, 'AppDocStatus' => 16, 'AppDocStatusDate' => 17, 'AppDocFieldname' => 18, 'AppDocDriveDownload' => 19, 'SyncWithDrive' => 20, 'SyncPermissions' => 21, ),
BasePeer::TYPE_COLNAME => array (AppDocumentPeer::APP_DOC_UID => 0, AppDocumentPeer::APP_DOC_FILENAME => 1, AppDocumentPeer::APP_DOC_TITLE => 2, AppDocumentPeer::APP_DOC_COMMENT => 3, AppDocumentPeer::DOC_VERSION => 4, AppDocumentPeer::APP_UID => 5, AppDocumentPeer::DEL_INDEX => 6, AppDocumentPeer::DOC_UID => 7, AppDocumentPeer::DOC_ID => 8, AppDocumentPeer::USR_UID => 9, AppDocumentPeer::APP_DOC_TYPE => 10, AppDocumentPeer::APP_DOC_CREATE_DATE => 11, AppDocumentPeer::APP_DOC_INDEX => 12, AppDocumentPeer::FOLDER_UID => 13, AppDocumentPeer::APP_DOC_PLUGIN => 14, AppDocumentPeer::APP_DOC_TAGS => 15, AppDocumentPeer::APP_DOC_STATUS => 16, AppDocumentPeer::APP_DOC_STATUS_DATE => 17, AppDocumentPeer::APP_DOC_FIELDNAME => 18, AppDocumentPeer::APP_DOC_DRIVE_DOWNLOAD => 19, AppDocumentPeer::SYNC_WITH_DRIVE => 20, AppDocumentPeer::SYNC_PERMISSIONS => 21, ),
BasePeer::TYPE_FIELDNAME => array ('APP_DOC_UID' => 0, 'APP_DOC_FILENAME' => 1, 'APP_DOC_TITLE' => 2, 'APP_DOC_COMMENT' => 3, 'DOC_VERSION' => 4, 'APP_UID' => 5, 'DEL_INDEX' => 6, 'DOC_UID' => 7, 'DOC_ID' => 8, 'USR_UID' => 9, 'APP_DOC_TYPE' => 10, 'APP_DOC_CREATE_DATE' => 11, 'APP_DOC_INDEX' => 12, 'FOLDER_UID' => 13, 'APP_DOC_PLUGIN' => 14, 'APP_DOC_TAGS' => 15, 'APP_DOC_STATUS' => 16, 'APP_DOC_STATUS_DATE' => 17, 'APP_DOC_FIELDNAME' => 18, 'APP_DOC_DRIVE_DOWNLOAD' => 19, 'SYNC_WITH_DRIVE' => 20, 'SYNC_PERMISSIONS' => 21, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, )
);
/**
@@ -238,6 +241,8 @@ abstract class BaseAppDocumentPeer
$criteria->addSelectColumn(AppDocumentPeer::DOC_UID);
$criteria->addSelectColumn(AppDocumentPeer::DOC_ID);
$criteria->addSelectColumn(AppDocumentPeer::USR_UID);
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_TYPE);

View File

@@ -27,6 +27,12 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
*/
protected static $peer;
/**
* The value for the note_id field.
* @var int
*/
protected $note_id;
/**
* The value for the app_uid field.
* @var string
@@ -101,6 +107,17 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
*/
protected $alreadyInValidation = false;
/**
* Get the [note_id] column value.
*
* @return int
*/
public function getNoteId()
{
return $this->note_id;
}
/**
* Get the [app_uid] column value.
*
@@ -232,6 +249,28 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
return $this->note_recipients;
}
/**
* Set the value of [note_id] column.
*
* @param int $v new value
* @return void
*/
public function setNoteId($v)
{
// Since the native PHP type for this column is integer,
// we will cast the input value to an int (if it is not).
if ($v !== null && !is_int($v) && is_numeric($v)) {
$v = (int) $v;
}
if ($this->note_id !== $v) {
$this->note_id = $v;
$this->modifiedColumns[] = AppNotesPeer::NOTE_ID;
}
} // setNoteId()
/**
* Set the value of [app_uid] column.
*
@@ -476,32 +515,34 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
{
try {
$this->app_uid = $rs->getString($startcol + 0);
$this->note_id = $rs->getInt($startcol + 0);
$this->usr_uid = $rs->getString($startcol + 1);
$this->app_uid = $rs->getString($startcol + 1);
$this->note_date = $rs->getTimestamp($startcol + 2, null);
$this->usr_uid = $rs->getString($startcol + 2);
$this->note_content = $rs->getString($startcol + 3);
$this->note_date = $rs->getTimestamp($startcol + 3, null);
$this->note_type = $rs->getString($startcol + 4);
$this->note_content = $rs->getString($startcol + 4);
$this->note_availability = $rs->getString($startcol + 5);
$this->note_type = $rs->getString($startcol + 5);
$this->note_origin_obj = $rs->getString($startcol + 6);
$this->note_availability = $rs->getString($startcol + 6);
$this->note_affected_obj1 = $rs->getString($startcol + 7);
$this->note_origin_obj = $rs->getString($startcol + 7);
$this->note_affected_obj2 = $rs->getString($startcol + 8);
$this->note_affected_obj1 = $rs->getString($startcol + 8);
$this->note_recipients = $rs->getString($startcol + 9);
$this->note_affected_obj2 = $rs->getString($startcol + 9);
$this->note_recipients = $rs->getString($startcol + 10);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 10; // 10 = AppNotesPeer::NUM_COLUMNS - AppNotesPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 11; // 11 = AppNotesPeer::NUM_COLUMNS - AppNotesPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating AppNotes object", $e);
@@ -706,33 +747,36 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
{
switch($pos) {
case 0:
return $this->getAppUid();
return $this->getNoteId();
break;
case 1:
return $this->getUsrUid();
return $this->getAppUid();
break;
case 2:
return $this->getNoteDate();
return $this->getUsrUid();
break;
case 3:
return $this->getNoteContent();
return $this->getNoteDate();
break;
case 4:
return $this->getNoteType();
return $this->getNoteContent();
break;
case 5:
return $this->getNoteAvailability();
return $this->getNoteType();
break;
case 6:
return $this->getNoteOriginObj();
return $this->getNoteAvailability();
break;
case 7:
return $this->getNoteAffectedObj1();
return $this->getNoteOriginObj();
break;
case 8:
return $this->getNoteAffectedObj2();
return $this->getNoteAffectedObj1();
break;
case 9:
return $this->getNoteAffectedObj2();
break;
case 10:
return $this->getNoteRecipients();
break;
default:
@@ -755,16 +799,17 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
{
$keys = AppNotesPeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getAppUid(),
$keys[1] => $this->getUsrUid(),
$keys[2] => $this->getNoteDate(),
$keys[3] => $this->getNoteContent(),
$keys[4] => $this->getNoteType(),
$keys[5] => $this->getNoteAvailability(),
$keys[6] => $this->getNoteOriginObj(),
$keys[7] => $this->getNoteAffectedObj1(),
$keys[8] => $this->getNoteAffectedObj2(),
$keys[9] => $this->getNoteRecipients(),
$keys[0] => $this->getNoteId(),
$keys[1] => $this->getAppUid(),
$keys[2] => $this->getUsrUid(),
$keys[3] => $this->getNoteDate(),
$keys[4] => $this->getNoteContent(),
$keys[5] => $this->getNoteType(),
$keys[6] => $this->getNoteAvailability(),
$keys[7] => $this->getNoteOriginObj(),
$keys[8] => $this->getNoteAffectedObj1(),
$keys[9] => $this->getNoteAffectedObj2(),
$keys[10] => $this->getNoteRecipients(),
);
return $result;
}
@@ -797,33 +842,36 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
{
switch($pos) {
case 0:
$this->setAppUid($value);
$this->setNoteId($value);
break;
case 1:
$this->setUsrUid($value);
$this->setAppUid($value);
break;
case 2:
$this->setNoteDate($value);
$this->setUsrUid($value);
break;
case 3:
$this->setNoteContent($value);
$this->setNoteDate($value);
break;
case 4:
$this->setNoteType($value);
$this->setNoteContent($value);
break;
case 5:
$this->setNoteAvailability($value);
$this->setNoteType($value);
break;
case 6:
$this->setNoteOriginObj($value);
$this->setNoteAvailability($value);
break;
case 7:
$this->setNoteAffectedObj1($value);
$this->setNoteOriginObj($value);
break;
case 8:
$this->setNoteAffectedObj2($value);
$this->setNoteAffectedObj1($value);
break;
case 9:
$this->setNoteAffectedObj2($value);
break;
case 10:
$this->setNoteRecipients($value);
break;
} // switch()
@@ -850,43 +898,47 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
$keys = AppNotesPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setAppUid($arr[$keys[0]]);
$this->setNoteId($arr[$keys[0]]);
}
if (array_key_exists($keys[1], $arr)) {
$this->setUsrUid($arr[$keys[1]]);
$this->setAppUid($arr[$keys[1]]);
}
if (array_key_exists($keys[2], $arr)) {
$this->setNoteDate($arr[$keys[2]]);
$this->setUsrUid($arr[$keys[2]]);
}
if (array_key_exists($keys[3], $arr)) {
$this->setNoteContent($arr[$keys[3]]);
$this->setNoteDate($arr[$keys[3]]);
}
if (array_key_exists($keys[4], $arr)) {
$this->setNoteType($arr[$keys[4]]);
$this->setNoteContent($arr[$keys[4]]);
}
if (array_key_exists($keys[5], $arr)) {
$this->setNoteAvailability($arr[$keys[5]]);
$this->setNoteType($arr[$keys[5]]);
}
if (array_key_exists($keys[6], $arr)) {
$this->setNoteOriginObj($arr[$keys[6]]);
$this->setNoteAvailability($arr[$keys[6]]);
}
if (array_key_exists($keys[7], $arr)) {
$this->setNoteAffectedObj1($arr[$keys[7]]);
$this->setNoteOriginObj($arr[$keys[7]]);
}
if (array_key_exists($keys[8], $arr)) {
$this->setNoteAffectedObj2($arr[$keys[8]]);
$this->setNoteAffectedObj1($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setNoteRecipients($arr[$keys[9]]);
$this->setNoteAffectedObj2($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setNoteRecipients($arr[$keys[10]]);
}
}
@@ -900,6 +952,10 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
{
$criteria = new Criteria(AppNotesPeer::DATABASE_NAME);
if ($this->isColumnModified(AppNotesPeer::NOTE_ID)) {
$criteria->add(AppNotesPeer::NOTE_ID, $this->note_id);
}
if ($this->isColumnModified(AppNotesPeer::APP_UID)) {
$criteria->add(AppNotesPeer::APP_UID, $this->app_uid);
}
@@ -997,6 +1053,8 @@ abstract class BaseAppNotes extends BaseObject implements Persistent
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setNoteId($this->note_id);
$copyObj->setAppUid($this->app_uid);
$copyObj->setUsrUid($this->usr_uid);

View File

@@ -25,12 +25,15 @@ abstract class BaseAppNotesPeer
const CLASS_DEFAULT = 'classes.model.AppNotes';
/** The total number of columns. */
const NUM_COLUMNS = 10;
const NUM_COLUMNS = 11;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the NOTE_ID field */
const NOTE_ID = 'APP_NOTES.NOTE_ID';
/** the column name for the APP_UID field */
const APP_UID = 'APP_NOTES.APP_UID';
@@ -72,10 +75,10 @@ abstract class BaseAppNotesPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('AppUid', 'UsrUid', 'NoteDate', 'NoteContent', 'NoteType', 'NoteAvailability', 'NoteOriginObj', 'NoteAffectedObj1', 'NoteAffectedObj2', 'NoteRecipients', ),
BasePeer::TYPE_COLNAME => array (AppNotesPeer::APP_UID, AppNotesPeer::USR_UID, AppNotesPeer::NOTE_DATE, AppNotesPeer::NOTE_CONTENT, AppNotesPeer::NOTE_TYPE, AppNotesPeer::NOTE_AVAILABILITY, AppNotesPeer::NOTE_ORIGIN_OBJ, AppNotesPeer::NOTE_AFFECTED_OBJ1, AppNotesPeer::NOTE_AFFECTED_OBJ2, AppNotesPeer::NOTE_RECIPIENTS, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID', 'USR_UID', 'NOTE_DATE', 'NOTE_CONTENT', 'NOTE_TYPE', 'NOTE_AVAILABILITY', 'NOTE_ORIGIN_OBJ', 'NOTE_AFFECTED_OBJ1', 'NOTE_AFFECTED_OBJ2', 'NOTE_RECIPIENTS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
BasePeer::TYPE_PHPNAME => array ('NoteId', 'AppUid', 'UsrUid', 'NoteDate', 'NoteContent', 'NoteType', 'NoteAvailability', 'NoteOriginObj', 'NoteAffectedObj1', 'NoteAffectedObj2', 'NoteRecipients', ),
BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID, AppNotesPeer::APP_UID, AppNotesPeer::USR_UID, AppNotesPeer::NOTE_DATE, AppNotesPeer::NOTE_CONTENT, AppNotesPeer::NOTE_TYPE, AppNotesPeer::NOTE_AVAILABILITY, AppNotesPeer::NOTE_ORIGIN_OBJ, AppNotesPeer::NOTE_AFFECTED_OBJ1, AppNotesPeer::NOTE_AFFECTED_OBJ2, AppNotesPeer::NOTE_RECIPIENTS, ),
BasePeer::TYPE_FIELDNAME => array ('NOTE_ID', 'APP_UID', 'USR_UID', 'NOTE_DATE', 'NOTE_CONTENT', 'NOTE_TYPE', 'NOTE_AVAILABILITY', 'NOTE_ORIGIN_OBJ', 'NOTE_AFFECTED_OBJ1', 'NOTE_AFFECTED_OBJ2', 'NOTE_RECIPIENTS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@@ -85,10 +88,10 @@ abstract class BaseAppNotesPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('AppUid' => 0, 'UsrUid' => 1, 'NoteDate' => 2, 'NoteContent' => 3, 'NoteType' => 4, 'NoteAvailability' => 5, 'NoteOriginObj' => 6, 'NoteAffectedObj1' => 7, 'NoteAffectedObj2' => 8, 'NoteRecipients' => 9, ),
BasePeer::TYPE_COLNAME => array (AppNotesPeer::APP_UID => 0, AppNotesPeer::USR_UID => 1, AppNotesPeer::NOTE_DATE => 2, AppNotesPeer::NOTE_CONTENT => 3, AppNotesPeer::NOTE_TYPE => 4, AppNotesPeer::NOTE_AVAILABILITY => 5, AppNotesPeer::NOTE_ORIGIN_OBJ => 6, AppNotesPeer::NOTE_AFFECTED_OBJ1 => 7, AppNotesPeer::NOTE_AFFECTED_OBJ2 => 8, AppNotesPeer::NOTE_RECIPIENTS => 9, ),
BasePeer::TYPE_FIELDNAME => array ('APP_UID' => 0, 'USR_UID' => 1, 'NOTE_DATE' => 2, 'NOTE_CONTENT' => 3, 'NOTE_TYPE' => 4, 'NOTE_AVAILABILITY' => 5, 'NOTE_ORIGIN_OBJ' => 6, 'NOTE_AFFECTED_OBJ1' => 7, 'NOTE_AFFECTED_OBJ2' => 8, 'NOTE_RECIPIENTS' => 9, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
BasePeer::TYPE_PHPNAME => array ('NoteId' => 0, 'AppUid' => 1, 'UsrUid' => 2, 'NoteDate' => 3, 'NoteContent' => 4, 'NoteType' => 5, 'NoteAvailability' => 6, 'NoteOriginObj' => 7, 'NoteAffectedObj1' => 8, 'NoteAffectedObj2' => 9, 'NoteRecipients' => 10, ),
BasePeer::TYPE_COLNAME => array (AppNotesPeer::NOTE_ID => 0, AppNotesPeer::APP_UID => 1, AppNotesPeer::USR_UID => 2, AppNotesPeer::NOTE_DATE => 3, AppNotesPeer::NOTE_CONTENT => 4, AppNotesPeer::NOTE_TYPE => 5, AppNotesPeer::NOTE_AVAILABILITY => 6, AppNotesPeer::NOTE_ORIGIN_OBJ => 7, AppNotesPeer::NOTE_AFFECTED_OBJ1 => 8, AppNotesPeer::NOTE_AFFECTED_OBJ2 => 9, AppNotesPeer::NOTE_RECIPIENTS => 10, ),
BasePeer::TYPE_FIELDNAME => array ('NOTE_ID' => 0, 'APP_UID' => 1, 'USR_UID' => 2, 'NOTE_DATE' => 3, 'NOTE_CONTENT' => 4, 'NOTE_TYPE' => 5, 'NOTE_AVAILABILITY' => 6, 'NOTE_ORIGIN_OBJ' => 7, 'NOTE_AFFECTED_OBJ1' => 8, 'NOTE_AFFECTED_OBJ2' => 9, 'NOTE_RECIPIENTS' => 10, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, )
);
/**
@@ -189,6 +192,8 @@ abstract class BaseAppNotesPeer
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(AppNotesPeer::NOTE_ID);
$criteria->addSelectColumn(AppNotesPeer::APP_UID);
$criteria->addSelectColumn(AppNotesPeer::USR_UID);

View File

@@ -579,9 +579,6 @@ abstract class BaseEmailServerPeer
}
} else {
if ($obj->isNew() || $obj->isColumnModified(EmailServerPeer::MESS_ENGINE))
$columns[EmailServerPeer::MESS_ENGINE] = $obj->getMessEngine();
}
return BasePeer::doValidate(EmailServerPeer::DATABASE_NAME, EmailServerPeer::TABLE_NAME, $columns);