Merge remote branch 'upstream/master'
This commit is contained in:
@@ -512,16 +512,11 @@ class Cases
|
||||
try {
|
||||
$oApp = new Application;
|
||||
$aFields = $oApp->Load($sAppUid);
|
||||
//$aFields = $oApp->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$appData = @unserialize($aFields['APP_DATA']);
|
||||
|
||||
// BUG 8134, FIX!// for single/double quote troubles // Unserialize with utf8 content get trouble
|
||||
if ($appData === false) {
|
||||
$appData = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $aFields['APP_DATA']);
|
||||
$appData = @unserialize($appData);
|
||||
}
|
||||
$appData = self::unserializeData($aFields['APP_DATA']);
|
||||
|
||||
$aFields['APP_DATA'] = G::array_merges(G::getSystemConstants(), $appData);
|
||||
|
||||
switch ($oApp->getAppStatus()) {
|
||||
case 'COMPLETED':
|
||||
$aFields['STATUS'] = G::LoadTranslation('ID_COMPLETED');
|
||||
@@ -6456,13 +6451,13 @@ class Cases
|
||||
$row[] = $aUser['USR_UID'];
|
||||
}
|
||||
}
|
||||
|
||||
global $RBAC;
|
||||
//Adding the actual user if this has the PM_REASSIGNCASE permission assigned.
|
||||
|
||||
global $RBAC;
|
||||
//Adding the actual user if this has the PM_REASSIGNCASE permission assigned.
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
if(!in_array($RBAC->aUserInfo['USER_INFO']['USR_UID'], $row)){
|
||||
$row[] = $RBAC->aUserInfo['USER_INFO']['USR_UID'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require_once 'classes/model/Users.php';
|
||||
@@ -6728,4 +6723,16 @@ class Cases
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function unserializeData($data) {
|
||||
$unserializedData = @unserialize($data);
|
||||
|
||||
// BUG 8134, FIX!// for single/double quote troubles // Unserialize with utf8 content get trouble
|
||||
if ($unserializedData === false) {
|
||||
$unserializedData = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $data);
|
||||
$unserializedData = @unserialize($unserializedData);
|
||||
}
|
||||
|
||||
return $unserializedData;
|
||||
}
|
||||
}
|
||||
@@ -3339,6 +3339,7 @@ class processMap
|
||||
$oCriteria->addJoin(ProcessUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, 'SUPERVISOR');
|
||||
$oCriteria->add(ProcessUserPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, "CLOSED", Criteria::NOT_EQUAL);
|
||||
$oCriteria->addAscendingOrderByColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
@@ -361,6 +361,8 @@ class AppCacheView extends BaseAppCacheView
|
||||
$c2 = new Criteria();
|
||||
$c2->clearSelectColumns();
|
||||
$c2->addSelectColumn(AppDelegationPeer::APP_UID);
|
||||
$c2->addSelectColumn(ApplicationPeer::APP_DATA);
|
||||
$c2->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
|
||||
$c2->add(AppDelegationPeer::TAS_UID, $row['TAS_UID']);
|
||||
$c2->add(AppDelegationPeer::USR_UID, '');
|
||||
$c2->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
@@ -368,10 +370,11 @@ class AppCacheView extends BaseAppCacheView
|
||||
$rs2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs2->next();
|
||||
while ($row2 = $rs2->getRow()) {
|
||||
$caseData = $caseInstance->LoadCase($row2['APP_UID']);
|
||||
if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
|
||||
if (trim($caseData['APP_DATA'][$tasGroupVariable]) != '') {
|
||||
if (in_array(trim($caseData['APP_DATA'][$tasGroupVariable]), $aGroups)) {
|
||||
$caseData = $caseInstance->unserializeData($row2['APP_DATA']);
|
||||
|
||||
if (isset($caseData[$tasGroupVariable])) {
|
||||
if (trim($caseData[$tasGroupVariable]) != '') {
|
||||
if (in_array(trim($caseData[$tasGroupVariable]), $aGroups)) {
|
||||
$cases[] = $row2['APP_UID'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ class DynaformMapBuilder
|
||||
|
||||
$tMap->addColumn('DYN_FILENAME', 'DynFilename', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('DYN_CONTENT', 'DynContent', 'string', CreoleTypes::LONGVARCHAR, false, null);
|
||||
|
||||
$tMap->addValidator('DYN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'xmlform|grid', 'Please select a valid dynaform type.');
|
||||
|
||||
} // doBuild()
|
||||
|
||||
@@ -51,6 +51,12 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $dyn_filename = '';
|
||||
|
||||
/**
|
||||
* The value for the dyn_content field.
|
||||
* @var string
|
||||
*/
|
||||
protected $dyn_content;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -109,6 +115,17 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
return $this->dyn_filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [dyn_content] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDynContent()
|
||||
{
|
||||
|
||||
return $this->dyn_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [dyn_uid] column.
|
||||
*
|
||||
@@ -197,6 +214,28 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
} // setDynFilename()
|
||||
|
||||
/**
|
||||
* Set the value of [dyn_content] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setDynContent($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->dyn_content !== $v) {
|
||||
$this->dyn_content = $v;
|
||||
$this->modifiedColumns[] = DynaformPeer::DYN_CONTENT;
|
||||
}
|
||||
|
||||
} // setDynContent()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -222,12 +261,14 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
$this->dyn_filename = $rs->getString($startcol + 3);
|
||||
|
||||
$this->dyn_content = $rs->getString($startcol + 4);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 4; // 4 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 5; // 5 = DynaformPeer::NUM_COLUMNS - DynaformPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Dynaform object", $e);
|
||||
@@ -443,6 +484,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
case 3:
|
||||
return $this->getDynFilename();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getDynContent();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -467,6 +511,7 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$keys[1] => $this->getProUid(),
|
||||
$keys[2] => $this->getDynType(),
|
||||
$keys[3] => $this->getDynFilename(),
|
||||
$keys[4] => $this->getDynContent(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -510,6 +555,9 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
case 3:
|
||||
$this->setDynFilename($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setDynContent($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -549,6 +597,10 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$this->setDynFilename($arr[$keys[3]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[4], $arr)) {
|
||||
$this->setDynContent($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -576,6 +628,10 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
$criteria->add(DynaformPeer::DYN_FILENAME, $this->dyn_filename);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(DynaformPeer::DYN_CONTENT)) {
|
||||
$criteria->add(DynaformPeer::DYN_CONTENT, $this->dyn_content);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -636,6 +692,8 @@ abstract class BaseDynaform extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setDynFilename($this->dyn_filename);
|
||||
|
||||
$copyObj->setDynContent($this->dyn_content);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseDynaformPeer
|
||||
const CLASS_DEFAULT = 'classes.model.Dynaform';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 4;
|
||||
const NUM_COLUMNS = 5;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -43,6 +43,9 @@ abstract class BaseDynaformPeer
|
||||
/** the column name for the DYN_FILENAME field */
|
||||
const DYN_FILENAME = 'DYNAFORM.DYN_FILENAME';
|
||||
|
||||
/** the column name for the DYN_CONTENT field */
|
||||
const DYN_CONTENT = 'DYNAFORM.DYN_CONTENT';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -54,10 +57,10 @@ abstract class BaseDynaformPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID, DynaformPeer::PRO_UID, DynaformPeer::DYN_TYPE, DynaformPeer::DYN_FILENAME, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid', 'ProUid', 'DynType', 'DynFilename', 'DynContent', ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID, DynaformPeer::PRO_UID, DynaformPeer::DYN_TYPE, DynaformPeer::DYN_FILENAME, DynaformPeer::DYN_CONTENT, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID', 'PRO_UID', 'DYN_TYPE', 'DYN_FILENAME', 'DYN_CONTENT', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -67,10 +70,10 @@ abstract class BaseDynaformPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID => 0, DynaformPeer::PRO_UID => 1, DynaformPeer::DYN_TYPE => 2, DynaformPeer::DYN_FILENAME => 3, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID' => 0, 'PRO_UID' => 1, 'DYN_TYPE' => 2, 'DYN_FILENAME' => 3, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DynUid' => 0, 'ProUid' => 1, 'DynType' => 2, 'DynFilename' => 3, 'DynContent' => 4, ),
|
||||
BasePeer::TYPE_COLNAME => array (DynaformPeer::DYN_UID => 0, DynaformPeer::PRO_UID => 1, DynaformPeer::DYN_TYPE => 2, DynaformPeer::DYN_FILENAME => 3, DynaformPeer::DYN_CONTENT => 4, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('DYN_UID' => 0, 'PRO_UID' => 1, 'DYN_TYPE' => 2, 'DYN_FILENAME' => 3, 'DYN_CONTENT' => 4, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -179,6 +182,8 @@ abstract class BaseDynaformPeer
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
|
||||
|
||||
$criteria->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(DYNAFORM.DYN_UID)';
|
||||
|
||||
@@ -348,8 +348,8 @@ abstract class BaseHolidayPeer
|
||||
$criteria = $values->buildCriteria(); // build Criteria from Holiday object
|
||||
}
|
||||
|
||||
$criteria->remove(HolidayPeer::HLD_UID); // remove pkey col since this table uses auto-increment
|
||||
|
||||
//$criteria->remove(HolidayPeer::HLD_UID); // remove pkey col since this table uses auto-increment
|
||||
|
||||
|
||||
// Set the correct dbName
|
||||
$criteria->setDbName(self::DATABASE_NAME);
|
||||
|
||||
@@ -151,7 +151,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
* The value for the out_doc_open_type field.
|
||||
* @var int
|
||||
*/
|
||||
protected $out_doc_open_type = 0;
|
||||
protected $out_doc_open_type = 1;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
@@ -853,7 +853,7 @@ abstract class BaseOutputDocument extends BaseObject implements Persistent
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->out_doc_open_type !== $v || $v === 0) {
|
||||
if ($this->out_doc_open_type !== $v || $v === 1) {
|
||||
$this->out_doc_open_type = $v;
|
||||
$this->modifiedColumns[] = OutputDocumentPeer::OUT_DOC_OPEN_TYPE;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ abstract class BaseWebEntry extends BaseObject implements Persistent
|
||||
* The value for the we_data field.
|
||||
* @var string
|
||||
*/
|
||||
protected $we_data = '';
|
||||
protected $we_data;
|
||||
|
||||
/**
|
||||
* The value for the we_create_usr_uid field.
|
||||
@@ -456,7 +456,7 @@ abstract class BaseWebEntry extends BaseObject implements Persistent
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->we_data !== $v || $v === '') {
|
||||
if ($this->we_data !== $v) {
|
||||
$this->we_data = $v;
|
||||
$this->modifiedColumns[] = WebEntryPeer::WE_DATA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user