Merge remote branch 'pm/master'
This commit is contained in:
@@ -358,7 +358,7 @@ class WebApplication
|
||||
|
||||
//if (! $isPluginRequest) { // if it is not a request for a plugin endpoint
|
||||
// hook to get rest api classes from plugins
|
||||
if (class_exists('PMPluginRegistry')) {
|
||||
if (class_exists('PMPluginRegistry') && file_exists(PATH_DATA_SITE . 'plugin.singleton')) {
|
||||
$pluginRegistry = \PMPluginRegistry::loadSingleton(PATH_DATA_SITE . 'plugin.singleton');
|
||||
$plugins = $pluginRegistry->getRegisteredRestServices();
|
||||
|
||||
|
||||
@@ -922,6 +922,9 @@ class workspaceTools
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$checkData = $licensedFeatures->addNewFeatures($checkData);
|
||||
|
||||
$catalog = new Catalog();
|
||||
$checkData = $catalog->registerRows($checkData);
|
||||
/*----------------------------------********---------------------------------*/
|
||||
foreach ($checkData as $checkThis) {
|
||||
$this->updateThisRegistry($checkThis);
|
||||
|
||||
@@ -16,6 +16,8 @@ require_once 'classes/model/om/BaseCatalog.php';
|
||||
*/
|
||||
class Catalog extends BaseCatalog
|
||||
{
|
||||
private $records = array();
|
||||
|
||||
public function load ($catUid, $catType)
|
||||
{
|
||||
try {
|
||||
@@ -107,5 +109,105 @@ class Catalog extends BaseCatalog
|
||||
throw $error;
|
||||
}
|
||||
}
|
||||
private function dataCatalog ()
|
||||
{
|
||||
$this->records[] = array('10','ID_BARS','GRAPHIC','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('20','ID_LINES','GRAPHIC','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('100','ID_MONTH','PERIODICITY','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('200','ID_QUARTER','PERIODICITY','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('300','ID_SEMESTER','PERIODICITY','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('400','ID_YEAR','PERIODICITY','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('1010','ID_PROCESS_EFFICIENCE','INDICATOR','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('1030','ID_EMPLYEE_EFFICIENCIE','INDICATOR','','','2015-03-04','2015-03-04');
|
||||
$this->records[] = array('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04');
|
||||
}
|
||||
public function registerRows($data)
|
||||
{
|
||||
$this->dataCatalog();
|
||||
$newData = array();
|
||||
|
||||
$criteria = new Criteria();
|
||||
$criteria->clearSelectColumns();
|
||||
$criteria->addSelectColumn(CatalogPeer::CAT_UID);
|
||||
$criteria->addSelectColumn(CatalogPeer::CAT_TYPE);
|
||||
$rs = CatalogPeer::doSelectRS($criteria);
|
||||
$dataCatalog = array();
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
$dataCatalog[] = $row;
|
||||
}
|
||||
|
||||
foreach($this->records as $k => $record) {
|
||||
$flag = false;
|
||||
|
||||
foreach ($dataCatalog as $key => $catalog) {
|
||||
if ($record[0] == $catalog[0] && $record[2] == $catalog[1]) {
|
||||
$flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($flag) {
|
||||
continue;
|
||||
}
|
||||
$newData[] = array (
|
||||
'db' => 'wf',
|
||||
'table' => 'CATALOG',
|
||||
'keys' =>
|
||||
array (
|
||||
0 => 'CAT_UID',
|
||||
1 => 'CAT_TYPE'
|
||||
),
|
||||
'data' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'field' => 'CAT_UID',
|
||||
'type' => 'text',
|
||||
'value' => $record[0],
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'field' => 'CAT_LABEL_ID',
|
||||
'type' => 'text',
|
||||
'value' => $record[1],
|
||||
),
|
||||
2 =>
|
||||
array (
|
||||
'field' => 'CAT_TYPE',
|
||||
'type' => 'text',
|
||||
'value' => $record[2],
|
||||
),
|
||||
3 =>
|
||||
array (
|
||||
'field' => 'CAT_FLAG',
|
||||
'type' => 'text',
|
||||
'value' => $record[3],
|
||||
),
|
||||
4 =>
|
||||
array (
|
||||
'field' => 'CAT_OBSERVATION',
|
||||
'type' => 'text',
|
||||
'value' => $record[4],
|
||||
),
|
||||
5 =>
|
||||
array (
|
||||
'field' => 'CAT_CREATE_DATE',
|
||||
'type' => 'text',
|
||||
'value' => $record[5],
|
||||
),
|
||||
6 =>
|
||||
array (
|
||||
'field' => 'CAT_UPDATE_DATE',
|
||||
'type' => 'text',
|
||||
'value' => $record[6],
|
||||
)
|
||||
),
|
||||
'action' => 1,
|
||||
);
|
||||
|
||||
}
|
||||
return array_merge($data, $newData);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ class ListCanceled extends BaseListCanceled {
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListCanceledPeer::doSelectRS($criteria);
|
||||
$dataset = ListCanceledPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
while ($dataset->next()) {
|
||||
|
||||
@@ -284,7 +284,7 @@ class ListCompleted extends BaseListCompleted
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListCompletedPeer::doSelectRS($criteria);
|
||||
$dataset = ListCompletedPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
while ($dataset->next()) {
|
||||
|
||||
@@ -102,7 +102,7 @@ class ListInbox extends BaseListInbox
|
||||
$users->refreshTotal($data['USR_UID'], 'add', 'inbox');
|
||||
|
||||
$listParticipatedLast = new ListParticipatedLast();
|
||||
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID']);
|
||||
$listParticipatedLast->remove($data['APP_UID'], $data['USR_UID'], $data['DEL_INDEX']);
|
||||
|
||||
//Update - WHERE
|
||||
$criteriaWhere = new Criteria("workflow");
|
||||
@@ -444,7 +444,7 @@ class ListInbox extends BaseListInbox
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListInboxPeer::doSelectRS($criteria);
|
||||
$dataset = ListInboxPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
|
||||
@@ -259,7 +259,7 @@ class ListMyInbox extends BaseListMyInbox
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListMyInboxPeer::doSelectRS($criteria);
|
||||
$dataset = ListMyInboxPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
|
||||
@@ -214,7 +214,7 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListParticipatedHistoryPeer::doSelectRS($criteria);
|
||||
$dataset = ListParticipatedHistoryPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
|
||||
@@ -285,7 +285,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
|
||||
$dataset = ListParticipatedLastPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
$aPriorities = array ('1' => 'VL','2' => 'L','3' => 'N','4' => 'H','5' => 'VH');
|
||||
|
||||
@@ -328,7 +328,7 @@ class ListPaused extends BaseListPaused {
|
||||
$criteria->setOffset( $start );
|
||||
}
|
||||
|
||||
$dataset = ListPausedPeer::doSelectRS($criteria);
|
||||
$dataset = ListPausedPeer::doSelectRS($criteria, Propel::getDbConnection('workflow_ro') );
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$data = array();
|
||||
while ($dataset->next()) {
|
||||
|
||||
@@ -59977,7 +59977,7 @@ INSERT INTO CATALOG (CAT_UID, CAT_LABEL_ID, CAT_TYPE, CAT_FLAG, CAT_OBSERVATION,
|
||||
('400','ID_YEAR','PERIODICITY','','','2015-03-04','2015-03-04'),
|
||||
('1010','ID_PROCESS_EFFICIENCE','INDICATOR','','','2015-03-04','2015-03-04'),
|
||||
('1030','ID_EMPLYEE_EFFICIENCIE','INDICATOR','','','2015-03-04','2015-03-04'),
|
||||
('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04'),
|
||||
('1050','ID_OVER_DUE','INDICATOR','%','Unit for displaying','2015-03-04','2015-03-04');
|
||||
|
||||
INSERT INTO ADDONS_MANAGER (ADDON_DESCRIPTION,ADDON_ID,ADDON_NAME,ADDON_NICK,ADDON_PUBLISHER,ADDON_RELEASE_TYPE,ADDON_STATUS,STORE_ID,ADDON_TYPE,ADDON_DOWNLOAD_URL,ADDON_VERSION,ADDON_DOWNLOAD_PROGRESS) VALUES
|
||||
('Enables de Actions By Email feature.','actionsByEmail','actionsByEmail','actionsByEmail','Colosa','localRegistry','ready','00000000000000000000000000010004','features','','','0'),
|
||||
|
||||
@@ -2812,7 +2812,6 @@ CREATE TABLE `CATALOG`
|
||||
`CAT_OBSERVATION` MEDIUMTEXT,
|
||||
`CAT_CREATE_DATE` DATETIME NOT NULL,
|
||||
`CAT_UPDATE_DATE` DATETIME,
|
||||
`CAT_STATUS` TINYINT default 1 NOT NULL,
|
||||
PRIMARY KEY (`CAT_UID`, `CAT_TYPE`),
|
||||
KEY `indexType`( `CAT_TYPE`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions catalog.';
|
||||
|
||||
@@ -293,16 +293,16 @@ class MessageEventDefinition
|
||||
|
||||
$messageEventDefinitionUid = \ProcessMaker\Util\Common::generateUID();
|
||||
|
||||
if (isset($arrayData["MSGED_VARIABLES"])) {
|
||||
$arrayData["MSGED_VARIABLES"] = serialize($arrayData["MSGED_VARIABLES"]);
|
||||
}
|
||||
|
||||
$messageEventDefinition->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
$messageEventDefinition->setMsgedUid($messageEventDefinitionUid);
|
||||
$messageEventDefinition->setPrjUid($projectUid);
|
||||
$messageEventDefinition->setMsgedUsrUid("00000000000000000000000000000001"); //admin
|
||||
|
||||
if (isset($arrayData["MSGED_VARIABLES"])) {
|
||||
$messageEventDefinition->setMsgedVariables(serialize($arrayData["MSGED_VARIABLES"]));
|
||||
}
|
||||
|
||||
if ($messageEventDefinition->validate()) {
|
||||
$cnn->begin();
|
||||
|
||||
@@ -375,7 +375,7 @@ class MessageEventDefinition
|
||||
}
|
||||
|
||||
if (isset($arrayData["MSGED_VARIABLES"])) {
|
||||
$messageEventDefinition->setMsgedVariables(serialize($arrayData["MSGED_VARIABLES"]));
|
||||
$arrayData["MSGED_VARIABLES"] = serialize($arrayData["MSGED_VARIABLES"]);
|
||||
}
|
||||
|
||||
$messageEventDefinition->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
||||
@@ -632,4 +632,3 @@ class MessageEventDefinition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user