Solving conflicts merging with develop branch
This commit is contained in:
@@ -357,6 +357,7 @@ class PmDynaform
|
||||
$option->value = isset($row[0]) ? $row[0] : "";
|
||||
$option->label = isset($row[1]) ? $row[1] : "";
|
||||
$json->optionsSql[] = $option;
|
||||
$json->queryOutputData[] = $option;
|
||||
}
|
||||
}
|
||||
if ($value === "suggest" && isset($json->queryField) && $json->queryField == true) {
|
||||
|
||||
@@ -1017,6 +1017,9 @@ class Processes
|
||||
$map[$val['DYN_UID']] = $newGuid;
|
||||
$oData->dynaforms[$key]['DYN_UID'] = $newGuid;
|
||||
unset($oData->dynaforms[$key]['DYN_ID']);
|
||||
|
||||
//this is important when UID's is updated
|
||||
$oData->dynaforms[$key]['DYN_FILENAME'] = $oData->dynaforms[$key]['PRO_UID'] . "/" . $oData->dynaforms[$key]['DYN_UID'];
|
||||
}
|
||||
|
||||
$oData->uid["DYNAFORM"] = $map;
|
||||
|
||||
@@ -1086,6 +1086,7 @@ class AdditionalTables extends BaseAdditionalTables
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_DESCRIPTION);
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_TYPE);
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_TAG);
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_OFFLINE);
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::PRO_UID);
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::DBS_UID);
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ class Translation extends BaseTranslation
|
||||
}
|
||||
|
||||
$res['cacheFileMafe'] = $cacheFileMafe;
|
||||
$res['languague'] = count($cacheFileMafe);
|
||||
$res['languague'] = (is_array($cacheFileMafe) || $cacheFileMafe instanceof Countable) ? count($cacheFileMafe) : 0;
|
||||
$res['rowsMafeJS'] = count( $translation );
|
||||
return $res;
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -97,6 +97,10 @@ class AdditionalTablesMapBuilder
|
||||
|
||||
$tMap->addColumn('ADD_TAB_TAG', 'AddTabTag', 'string', CreoleTypes::VARCHAR, false, 256);
|
||||
|
||||
$tMap->addColumn('ADD_TAB_OFFLINE', 'AddTabOffline', 'int', CreoleTypes::TINYINT, true, null);
|
||||
|
||||
$tMap->addColumn('ADD_TAB_UPDATE_DATE', 'AddTabUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // AdditionalTablesMapBuilder
|
||||
|
||||
@@ -123,6 +123,18 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $add_tab_tag = '';
|
||||
|
||||
/**
|
||||
* The value for the add_tab_offline field.
|
||||
* @var int
|
||||
*/
|
||||
protected $add_tab_offline = 0;
|
||||
|
||||
/**
|
||||
* The value for the add_tab_update_date field.
|
||||
* @var int
|
||||
*/
|
||||
protected $add_tab_update_date;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -313,6 +325,49 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
return $this->add_tab_tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [add_tab_offline] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAddTabOffline()
|
||||
{
|
||||
|
||||
return $this->add_tab_offline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] [add_tab_update_date] column value.
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the integer unix timestamp will be returned.
|
||||
* @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
|
||||
* @throws PropelException - if unable to convert the date/time to timestamp.
|
||||
*/
|
||||
public function getAddTabUpdateDate($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
|
||||
if ($this->add_tab_update_date === null || $this->add_tab_update_date === '') {
|
||||
return null;
|
||||
} elseif (!is_int($this->add_tab_update_date)) {
|
||||
// a non-timestamp value was set externally, so we convert it
|
||||
$ts = strtotime($this->add_tab_update_date);
|
||||
if ($ts === -1 || $ts === false) {
|
||||
throw new PropelException("Unable to parse value of [add_tab_update_date] as date/time value: " .
|
||||
var_export($this->add_tab_update_date, true));
|
||||
}
|
||||
} else {
|
||||
$ts = $this->add_tab_update_date;
|
||||
}
|
||||
if ($format === null) {
|
||||
return $ts;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $ts);
|
||||
} else {
|
||||
return date($format, $ts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [add_tab_uid] column.
|
||||
*
|
||||
@@ -665,6 +720,57 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
|
||||
} // setAddTabTag()
|
||||
|
||||
/**
|
||||
* Set the value of [add_tab_offline] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAddTabOffline($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->add_tab_offline !== $v || $v === 0) {
|
||||
$this->add_tab_offline = $v;
|
||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_OFFLINE;
|
||||
}
|
||||
|
||||
} // setAddTabOffline()
|
||||
|
||||
/**
|
||||
* Set the value of [add_tab_update_date] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setAddTabUpdateDate($v)
|
||||
{
|
||||
|
||||
if ($v !== null && !is_int($v)) {
|
||||
$ts = strtotime($v);
|
||||
//Date/time accepts null values
|
||||
if ($v == '') {
|
||||
$ts = null;
|
||||
}
|
||||
if ($ts === -1 || $ts === false) {
|
||||
throw new PropelException("Unable to parse date/time value for [add_tab_update_date] from input: " .
|
||||
var_export($v, true));
|
||||
}
|
||||
} else {
|
||||
$ts = $v;
|
||||
}
|
||||
if ($this->add_tab_update_date !== $ts) {
|
||||
$this->add_tab_update_date = $ts;
|
||||
$this->modifiedColumns[] = AdditionalTablesPeer::ADD_TAB_UPDATE_DATE;
|
||||
}
|
||||
|
||||
} // setAddTabUpdateDate()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -714,12 +820,16 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
|
||||
$this->add_tab_tag = $rs->getString($startcol + 15);
|
||||
|
||||
$this->add_tab_offline = $rs->getInt($startcol + 16);
|
||||
|
||||
$this->add_tab_update_date = $rs->getTimestamp($startcol + 17, null);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 16; // 16 = AdditionalTablesPeer::NUM_COLUMNS - AdditionalTablesPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 18; // 18 = AdditionalTablesPeer::NUM_COLUMNS - AdditionalTablesPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating AdditionalTables object", $e);
|
||||
@@ -971,6 +1081,12 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
case 15:
|
||||
return $this->getAddTabTag();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getAddTabOffline();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getAddTabUpdateDate();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -1007,6 +1123,8 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
$keys[13] => $this->getAddTabType(),
|
||||
$keys[14] => $this->getAddTabGrid(),
|
||||
$keys[15] => $this->getAddTabTag(),
|
||||
$keys[16] => $this->getAddTabOffline(),
|
||||
$keys[17] => $this->getAddTabUpdateDate(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -1086,6 +1204,12 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
case 15:
|
||||
$this->setAddTabTag($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setAddTabOffline($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setAddTabUpdateDate($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -1173,6 +1297,14 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
$this->setAddTabTag($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[16], $arr)) {
|
||||
$this->setAddTabOffline($arr[$keys[16]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[17], $arr)) {
|
||||
$this->setAddTabUpdateDate($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1248,6 +1380,14 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
$criteria->add(AdditionalTablesPeer::ADD_TAB_TAG, $this->add_tab_tag);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_OFFLINE)) {
|
||||
$criteria->add(AdditionalTablesPeer::ADD_TAB_OFFLINE, $this->add_tab_offline);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(AdditionalTablesPeer::ADD_TAB_UPDATE_DATE)) {
|
||||
$criteria->add(AdditionalTablesPeer::ADD_TAB_UPDATE_DATE, $this->add_tab_update_date);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -1332,6 +1472,10 @@ abstract class BaseAdditionalTables extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setAddTabTag($this->add_tab_tag);
|
||||
|
||||
$copyObj->setAddTabOffline($this->add_tab_offline);
|
||||
|
||||
$copyObj->setAddTabUpdateDate($this->add_tab_update_date);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseAdditionalTablesPeer
|
||||
const CLASS_DEFAULT = 'classes.model.AdditionalTables';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 16;
|
||||
const NUM_COLUMNS = 18;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -79,6 +79,12 @@ abstract class BaseAdditionalTablesPeer
|
||||
/** the column name for the ADD_TAB_TAG field */
|
||||
const ADD_TAB_TAG = 'ADDITIONAL_TABLES.ADD_TAB_TAG';
|
||||
|
||||
/** the column name for the ADD_TAB_OFFLINE field */
|
||||
const ADD_TAB_OFFLINE = 'ADDITIONAL_TABLES.ADD_TAB_OFFLINE';
|
||||
|
||||
/** the column name for the ADD_TAB_UPDATE_DATE field */
|
||||
const ADD_TAB_UPDATE_DATE = 'ADDITIONAL_TABLES.ADD_TAB_UPDATE_DATE';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -90,10 +96,10 @@ abstract class BaseAdditionalTablesPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid', 'AddTabName', 'AddTabClassName', 'AddTabDescription', 'AddTabSdwLogInsert', 'AddTabSdwLogUpdate', 'AddTabSdwLogDelete', 'AddTabSdwLogSelect', 'AddTabSdwMaxLength', 'AddTabSdwAutoDelete', 'AddTabPlgUid', 'DbsUid', 'ProUid', 'AddTabType', 'AddTabGrid', 'AddTabTag', ),
|
||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID, AdditionalTablesPeer::ADD_TAB_NAME, AdditionalTablesPeer::ADD_TAB_CLASS_NAME, AdditionalTablesPeer::ADD_TAB_DESCRIPTION, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, AdditionalTablesPeer::ADD_TAB_PLG_UID, AdditionalTablesPeer::DBS_UID, AdditionalTablesPeer::PRO_UID, AdditionalTablesPeer::ADD_TAB_TYPE, AdditionalTablesPeer::ADD_TAB_GRID, AdditionalTablesPeer::ADD_TAB_TAG, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID', 'ADD_TAB_NAME', 'ADD_TAB_CLASS_NAME', 'ADD_TAB_DESCRIPTION', 'ADD_TAB_SDW_LOG_INSERT', 'ADD_TAB_SDW_LOG_UPDATE', 'ADD_TAB_SDW_LOG_DELETE', 'ADD_TAB_SDW_LOG_SELECT', 'ADD_TAB_SDW_MAX_LENGTH', 'ADD_TAB_SDW_AUTO_DELETE', 'ADD_TAB_PLG_UID', 'DBS_UID', 'PRO_UID', 'ADD_TAB_TYPE', 'ADD_TAB_GRID', 'ADD_TAB_TAG', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid', 'AddTabName', 'AddTabClassName', 'AddTabDescription', 'AddTabSdwLogInsert', 'AddTabSdwLogUpdate', 'AddTabSdwLogDelete', 'AddTabSdwLogSelect', 'AddTabSdwMaxLength', 'AddTabSdwAutoDelete', 'AddTabPlgUid', 'DbsUid', 'ProUid', 'AddTabType', 'AddTabGrid', 'AddTabTag', 'AddTabOffline', 'AddTabUpdateDate', ),
|
||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID, AdditionalTablesPeer::ADD_TAB_NAME, AdditionalTablesPeer::ADD_TAB_CLASS_NAME, AdditionalTablesPeer::ADD_TAB_DESCRIPTION, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE, AdditionalTablesPeer::ADD_TAB_PLG_UID, AdditionalTablesPeer::DBS_UID, AdditionalTablesPeer::PRO_UID, AdditionalTablesPeer::ADD_TAB_TYPE, AdditionalTablesPeer::ADD_TAB_GRID, AdditionalTablesPeer::ADD_TAB_TAG, AdditionalTablesPeer::ADD_TAB_OFFLINE, AdditionalTablesPeer::ADD_TAB_UPDATE_DATE, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID', 'ADD_TAB_NAME', 'ADD_TAB_CLASS_NAME', 'ADD_TAB_DESCRIPTION', 'ADD_TAB_SDW_LOG_INSERT', 'ADD_TAB_SDW_LOG_UPDATE', 'ADD_TAB_SDW_LOG_DELETE', 'ADD_TAB_SDW_LOG_SELECT', 'ADD_TAB_SDW_MAX_LENGTH', 'ADD_TAB_SDW_AUTO_DELETE', 'ADD_TAB_PLG_UID', 'DBS_UID', 'PRO_UID', 'ADD_TAB_TYPE', 'ADD_TAB_GRID', 'ADD_TAB_TAG', 'ADD_TAB_OFFLINE', 'ADD_TAB_UPDATE_DATE', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -103,10 +109,10 @@ abstract class BaseAdditionalTablesPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid' => 0, 'AddTabName' => 1, 'AddTabClassName' => 2, 'AddTabDescription' => 3, 'AddTabSdwLogInsert' => 4, 'AddTabSdwLogUpdate' => 5, 'AddTabSdwLogDelete' => 6, 'AddTabSdwLogSelect' => 7, 'AddTabSdwMaxLength' => 8, 'AddTabSdwAutoDelete' => 9, 'AddTabPlgUid' => 10, 'DbsUid' => 11, 'ProUid' => 12, 'AddTabType' => 13, 'AddTabGrid' => 14, 'AddTabTag' => 15, ),
|
||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID => 0, AdditionalTablesPeer::ADD_TAB_NAME => 1, AdditionalTablesPeer::ADD_TAB_CLASS_NAME => 2, AdditionalTablesPeer::ADD_TAB_DESCRIPTION => 3, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT => 4, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE => 5, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE => 6, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT => 7, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH => 8, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE => 9, AdditionalTablesPeer::ADD_TAB_PLG_UID => 10, AdditionalTablesPeer::DBS_UID => 11, AdditionalTablesPeer::PRO_UID => 12, AdditionalTablesPeer::ADD_TAB_TYPE => 13, AdditionalTablesPeer::ADD_TAB_GRID => 14, AdditionalTablesPeer::ADD_TAB_TAG => 15, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID' => 0, 'ADD_TAB_NAME' => 1, 'ADD_TAB_CLASS_NAME' => 2, 'ADD_TAB_DESCRIPTION' => 3, 'ADD_TAB_SDW_LOG_INSERT' => 4, 'ADD_TAB_SDW_LOG_UPDATE' => 5, 'ADD_TAB_SDW_LOG_DELETE' => 6, 'ADD_TAB_SDW_LOG_SELECT' => 7, 'ADD_TAB_SDW_MAX_LENGTH' => 8, 'ADD_TAB_SDW_AUTO_DELETE' => 9, 'ADD_TAB_PLG_UID' => 10, 'DBS_UID' => 11, 'PRO_UID' => 12, 'ADD_TAB_TYPE' => 13, 'ADD_TAB_GRID' => 14, 'ADD_TAB_TAG' => 15, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
|
||||
BasePeer::TYPE_PHPNAME => array ('AddTabUid' => 0, 'AddTabName' => 1, 'AddTabClassName' => 2, 'AddTabDescription' => 3, 'AddTabSdwLogInsert' => 4, 'AddTabSdwLogUpdate' => 5, 'AddTabSdwLogDelete' => 6, 'AddTabSdwLogSelect' => 7, 'AddTabSdwMaxLength' => 8, 'AddTabSdwAutoDelete' => 9, 'AddTabPlgUid' => 10, 'DbsUid' => 11, 'ProUid' => 12, 'AddTabType' => 13, 'AddTabGrid' => 14, 'AddTabTag' => 15, 'AddTabOffline' => 16, 'AddTabUpdateDate' => 17, ),
|
||||
BasePeer::TYPE_COLNAME => array (AdditionalTablesPeer::ADD_TAB_UID => 0, AdditionalTablesPeer::ADD_TAB_NAME => 1, AdditionalTablesPeer::ADD_TAB_CLASS_NAME => 2, AdditionalTablesPeer::ADD_TAB_DESCRIPTION => 3, AdditionalTablesPeer::ADD_TAB_SDW_LOG_INSERT => 4, AdditionalTablesPeer::ADD_TAB_SDW_LOG_UPDATE => 5, AdditionalTablesPeer::ADD_TAB_SDW_LOG_DELETE => 6, AdditionalTablesPeer::ADD_TAB_SDW_LOG_SELECT => 7, AdditionalTablesPeer::ADD_TAB_SDW_MAX_LENGTH => 8, AdditionalTablesPeer::ADD_TAB_SDW_AUTO_DELETE => 9, AdditionalTablesPeer::ADD_TAB_PLG_UID => 10, AdditionalTablesPeer::DBS_UID => 11, AdditionalTablesPeer::PRO_UID => 12, AdditionalTablesPeer::ADD_TAB_TYPE => 13, AdditionalTablesPeer::ADD_TAB_GRID => 14, AdditionalTablesPeer::ADD_TAB_TAG => 15, AdditionalTablesPeer::ADD_TAB_OFFLINE => 16, AdditionalTablesPeer::ADD_TAB_UPDATE_DATE => 17, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('ADD_TAB_UID' => 0, 'ADD_TAB_NAME' => 1, 'ADD_TAB_CLASS_NAME' => 2, 'ADD_TAB_DESCRIPTION' => 3, 'ADD_TAB_SDW_LOG_INSERT' => 4, 'ADD_TAB_SDW_LOG_UPDATE' => 5, 'ADD_TAB_SDW_LOG_DELETE' => 6, 'ADD_TAB_SDW_LOG_SELECT' => 7, 'ADD_TAB_SDW_MAX_LENGTH' => 8, 'ADD_TAB_SDW_AUTO_DELETE' => 9, 'ADD_TAB_PLG_UID' => 10, 'DBS_UID' => 11, 'PRO_UID' => 12, 'ADD_TAB_TYPE' => 13, 'ADD_TAB_GRID' => 14, 'ADD_TAB_TAG' => 15, 'ADD_TAB_OFFLINE' => 16, 'ADD_TAB_UPDATE_DATE' => 17, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -239,6 +245,10 @@ abstract class BaseAdditionalTablesPeer
|
||||
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_TAG);
|
||||
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_OFFLINE);
|
||||
|
||||
$criteria->addSelectColumn(AdditionalTablesPeer::ADD_TAB_UPDATE_DATE);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(ADDITIONAL_TABLES.ADD_TAB_UID)';
|
||||
|
||||
@@ -2522,6 +2522,8 @@
|
||||
<column name="ADD_TAB_TYPE" type="VARCHAR" size="32" required="false" default=""/>
|
||||
<column name="ADD_TAB_GRID" type="VARCHAR" size="256" required="false" default=""/>
|
||||
<column name="ADD_TAB_TAG" type="VARCHAR" size="256" required="false" default=""/>
|
||||
<column name="ADD_TAB_OFFLINE" type="TINYINT" required="true" default="0"/>
|
||||
<column name="ADD_TAB_UPDATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<index name="indexAdditionalProcess">
|
||||
<index-column name="PRO_UID"/>
|
||||
</index>
|
||||
|
||||
@@ -2755,6 +2755,18 @@ msgstr "AVAILABLE GROUPS"
|
||||
msgid "AVAILABLE MEMBERS"
|
||||
msgstr "AVAILABLE MEMBERS"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_AVAILABLE_OFFLINE
|
||||
#: LABEL/ID_AVAILABLE_OFFLINE
|
||||
msgid "Available offline"
|
||||
msgstr "Available offline"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_AVAILABLE_OFFLINE_THE_MOBILE_APPLICATIONS
|
||||
#: LABEL/ID_AVAILABLE_OFFLINE_THE_MOBILE_APPLICATIONS
|
||||
msgid "Available offline, the mobile applications will download this table for offline use"
|
||||
msgstr "Available offline, the mobile applications will download this table for offline use"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_AVAILABLE_PERMISSIONS
|
||||
#: LABEL/ID_AVAILABLE_PERMISSIONS
|
||||
@@ -20075,6 +20087,24 @@ msgstr "User has been updated successfully"
|
||||
msgid "Off"
|
||||
msgstr "Off"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_OFFLINE_TABLES
|
||||
#: LABEL/ID_OFFLINE_TABLES
|
||||
msgid "Offline Tables"
|
||||
msgstr "Offline Tables"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_OFFLINE_TABLES_ENABLE
|
||||
#: LABEL/ID_OFFLINE_TABLES_ENABLE
|
||||
msgid "Set Offline"
|
||||
msgstr "Set Offline"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_OFFLINE_TABLES_DISABLE
|
||||
#: LABEL/ID_OFFLINE_TABLES_DISABLE
|
||||
msgid "Set Online"
|
||||
msgstr "Set Online"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_OF_THE_MONTH
|
||||
#: LABEL/ID_OF_THE_MONTH
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\AdditionalTables as AdditionalTablesModel;
|
||||
use ProcessMaker\Validation\ExceptionRestApi;
|
||||
use ProcessMaker\Validation\ValidationUploadedFiles;
|
||||
|
||||
@@ -218,6 +219,34 @@ class pmTablesProxy extends HttpProxyController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the offline property.
|
||||
* @param stdClass $httpData
|
||||
* @return stdClass
|
||||
*/
|
||||
public function updateOffline(stdClass $httpData): stdClass
|
||||
{
|
||||
$result = new stdClass();
|
||||
try {
|
||||
$array = G::json_decode(stripslashes($httpData->rows));
|
||||
$data = [];
|
||||
$enable = false;
|
||||
foreach ($array as $value) {
|
||||
if ($value->type !== "NORMAL") {
|
||||
$data[] = $value->id;
|
||||
$enable = $value->offline ? 1 : 0;
|
||||
}
|
||||
}
|
||||
AdditionalTablesModel::updatePropertyOffline($data, $enable);
|
||||
$result->success = true;
|
||||
$result->message = $enable ? G::LoadTranslation("ID_ENABLE") : G::LoadTranslation("ID_DISABLE");
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->message = $e->getMessage();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* delete pm table
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
INSERT INTO USERS (USR_UID,USR_USERNAME,USR_PASSWORD,USR_FIRSTNAME,USR_LASTNAME,USR_EMAIL,USR_DUE_DATE,USR_CREATE_DATE,USR_UPDATE_DATE,USR_STATUS,USR_COUNTRY,USR_CITY,USR_LOCATION,USR_ADDRESS,USR_PHONE,USR_FAX,USR_CELLULAR,USR_ZIP_CODE,DEP_UID,USR_POSITION,USR_RESUME,USR_BIRTHDAY,USR_ROLE,USR_REPORTS_TO,USR_REPLACED_BY ) VALUES
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator',' ', 'admin@processmaker.com','2020-01-01','1999-11-30 00:00:00','2008-05-23 18:36:19','ACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Administrator', '','1999-02-25','PROCESSMAKER_ADMIN','',''),
|
||||
('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator',' ','admin@processmaker.com',DATE_ADD(curdate(), INTERVAL 1 YEAR),'1999-11-30 00:00:00','2008-05-23 18:36:19','ACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Administrator', '','1999-02-25','PROCESSMAKER_ADMIN','',''),
|
||||
('00000000000000000000000000000002','guest','674ba9750749d735ec9787d606170d78','Guest',' ', 'guest@processmaker.com','2030-01-01','2009-02-01 12:24:36','2009-02-01 12:24:36','INACTIVE', 'US','FL','MMK','','', '1-305-402-0282','1-305-675-1400','','','Guest', '','2009-02-01','PROCESSMAKER_GUEST','','');
|
||||
|
||||
INSERT INTO CONTENT (CON_CATEGORY,CON_PARENT,CON_ID,CON_LANG,CON_VALUE) VALUES
|
||||
@@ -57261,6 +57261,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_AVAILABLE_FIELDS','en','Available Fields','2014-01-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_GROUPS','en','AVAILABLE GROUPS','2014-01-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_MEMBERS','en','AVAILABLE MEMBERS','2014-01-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_OFFLINE','en','Available offline','2019-10-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_OFFLINE_THE_MOBILE_APPLICATIONS','en','Available offline, the mobile applications will download this table for offline use','2019-10-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_PERMISSIONS','en','AVAILABLE PERMISSIONS','2014-01-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_TRIGGERS','en','Available Triggers','2014-01-15') ,
|
||||
( 'LABEL','ID_AVAILABLE_USERS','en','AVAILABLE USERS','2014-01-15') ,
|
||||
@@ -60214,6 +60216,9 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_OBJECT_REMOVE','en','Object has been removed successfully','2014-01-15') ,
|
||||
( 'LABEL','ID_OBJECT_UPDATE','en','User has been updated successfully','2014-01-15') ,
|
||||
( 'LABEL','ID_OFF','en','Off','2014-01-15') ,
|
||||
( 'LABEL','ID_OFFLINE_TABLES','en','Offline Tables','2019-12-19') ,
|
||||
( 'LABEL','ID_OFFLINE_TABLES_ENABLE','en','Set Offline Tables','2019-12-19') ,
|
||||
( 'LABEL','ID_OFFLINE_TABLES_DISABLE','en','Set Online Tables','2019-12-19') ,
|
||||
( 'LABEL','ID_OF_THE_MONTH','en','of the month(s)','2014-01-15') ,
|
||||
( 'LABEL','ID_OK','en','Ok','2015-09-17') ,
|
||||
( 'LABEL','ID_OLD_VERSION','en','old version','2014-01-15') ,
|
||||
|
||||
@@ -1162,6 +1162,8 @@ CREATE TABLE `ADDITIONAL_TABLES`
|
||||
`ADD_TAB_TYPE` VARCHAR(32) default '',
|
||||
`ADD_TAB_GRID` VARCHAR(256) default '',
|
||||
`ADD_TAB_TAG` VARCHAR(256) default '',
|
||||
`ADD_TAB_OFFLINE` TINYINT default 0 NOT NULL,
|
||||
`ADD_TAB_UPDATE_DATE` DATETIME NOT NULL,
|
||||
PRIMARY KEY (`ADD_TAB_UID`),
|
||||
KEY `indexAdditionalProcess`(`PRO_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
|
||||
@@ -268,41 +268,44 @@ if (isset($_POST["PRO_FILENAME"]) &&
|
||||
try {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$objectsToImport = '';
|
||||
// only uploadFileNewProcessExist
|
||||
if (version_compare($data['version'], '3.0', '>') && isset($_POST['objectsToImport']) && $_POST['objectsToImport'] === '' && $_POST['IMPORT_OPTION']==="1") {
|
||||
$objectImport = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objectImport = $ids->getIdObjectList($objectImport);
|
||||
$granularImport = true;
|
||||
$result = array(
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $objectImport,
|
||||
"project_type_aux" => ''
|
||||
);
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
if (version_compare($data['version'], '3.0', '>')) {
|
||||
$dataObject = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$exportObjects = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$idObjectList = $exportObjects->getIdObjectList($dataObject);
|
||||
|
||||
if (version_compare($data['version'], '3.0', '>') && $_POST['IMPORT_OPTION']==="3") {
|
||||
$objectsToImport = [];
|
||||
$objects = (isset($data['objects'])) ? explode('|', $data['objects']) : "";
|
||||
$ids = new \ProcessMaker\BusinessModel\Migrator\ExportObjects();
|
||||
$objects = $ids->getIdObjectList($objects);
|
||||
foreach ($objects as $object) {
|
||||
$objectsToImport[] = (object)array('id' => $object, 'action' => 'replace');
|
||||
// only uploadFileNewProcessExist
|
||||
if (isset($_POST['objectsToImport']) && $_POST['objectsToImport'] === '' && $_POST['IMPORT_OPTION'] === "1") {
|
||||
$granularImport = true;
|
||||
$result = [
|
||||
"success" => true,
|
||||
"catchMessage" => '',
|
||||
"ExistProcessInDatabase" => 0,
|
||||
"ExistGroupsInDatabase" => 0,
|
||||
"notExistProcessInDatabase" => 0,
|
||||
"affectedGroups" => '',
|
||||
"sNewProUid" => '',
|
||||
"project_type" => 'bpmn',
|
||||
"isGranularImport" => $granularImport,
|
||||
"objectGranularImport" => $idObjectList,
|
||||
"project_type_aux" => ''
|
||||
];
|
||||
echo G::json_encode($result);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
$actionImport = "merge";
|
||||
if ($_POST['IMPORT_OPTION'] === "3") {
|
||||
$actionImport = "replace";
|
||||
}
|
||||
|
||||
$objectsToImport = [];
|
||||
foreach ($idObjectList as $object) {
|
||||
$objectsToImport[] = (object) ['id' => $object, 'action' => $actionImport];
|
||||
}
|
||||
|
||||
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
|
||||
$objectsToImport = G::json_decode($_POST['objectsToImport']);
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$prjUid = $importer->import($option, $optionGroup, false, $objectsToImport);
|
||||
|
||||
@@ -696,9 +696,8 @@ class Light
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$iDocVersion = $oAppDocument->getDocVersion();
|
||||
$info = pathinfo($oAppDocument->getAppDocFilename());
|
||||
$ext = (isset($info['extension']) ? $info['extension'] : '');//BUG fix: must handle files without any extension
|
||||
$ext = (isset($info['extension']) ? $info['extension'] : ''); //BUG fix: must handle files without any extension
|
||||
|
||||
//$app_uid = G::getPathFromUID($oAppDocument->Fields['APP_UID']);
|
||||
$file = G::getPathFromFileUID($oAppDocument->Fields['APP_UID'], $sAppDocUid);
|
||||
|
||||
$realPath = PATH_DOCUMENT . G::getPathFromUID($app_uid) . '/' . $file[0] . $file[1] . '_' . $iDocVersion . '.' . $ext;
|
||||
@@ -1358,12 +1357,14 @@ class Light
|
||||
*/
|
||||
public function getConfiguration($params)
|
||||
{
|
||||
$response = [];
|
||||
|
||||
$sysConf = Bootstrap::getSystemConfiguration('', '', config("system.workspace"));
|
||||
$multiTimeZone = false;
|
||||
//Set Time Zone
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (\PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
$multiTimeZone = (int)($sysConf['system_utc_time_zone']) == 1;
|
||||
$multiTimeZone = (int) ($sysConf['system_utc_time_zone']) == 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$tz = isset($_SESSION['USR_TIME_ZONE']) ? $_SESSION['USR_TIME_ZONE'] : $sysConf['time_zone'];
|
||||
@@ -1423,6 +1424,8 @@ class Light
|
||||
$response['tz'] = isset($_SESSION['USR_TIME_ZONE']) ? $_SESSION['USR_TIME_ZONE'] : $sysConf['time_zone'];
|
||||
}
|
||||
|
||||
$response['mobile_offline_tables_download_interval'] = $sysConf['mobile_offline_tables_download_interval'];
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
@@ -1431,13 +1434,13 @@ class Light
|
||||
switch (substr($size_str, -1)) {
|
||||
case 'M':
|
||||
case 'm':
|
||||
return (int)$size_str * 1048576;
|
||||
return (int) $size_str * 1048576;
|
||||
case 'K':
|
||||
case 'k':
|
||||
return (int)$size_str * 1024;
|
||||
return (int) $size_str * 1024;
|
||||
case 'G':
|
||||
case 'g':
|
||||
return (int)$size_str * 1073741824;
|
||||
return (int) $size_str * 1073741824;
|
||||
default:
|
||||
return $size_str;
|
||||
}
|
||||
|
||||
@@ -486,7 +486,9 @@ class ReportTable
|
||||
'DBS_UID' => ($arrayData['REP_TAB_CONNECTION']) ? $arrayData['REP_TAB_CONNECTION'] : 'workflow',
|
||||
'PRO_UID' => $arrayData['PRO_UID'],
|
||||
'ADD_TAB_TYPE' => $arrayData['REP_TAB_TYPE'],
|
||||
'ADD_TAB_GRID' => $arrayData['REP_TAB_GRID']
|
||||
'ADD_TAB_GRID' => $arrayData['REP_TAB_GRID'],
|
||||
'ADD_TAB_OFFLINE' => !empty($arrayData['REP_TAB_OFFLINE']) ?? 0,
|
||||
'ADD_TAB_UPDATE_DATE' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
|
||||
if ($arrayData['REP_TAB_UID'] == '' || (isset($arrayData['forceUid']) && $arrayData['forceUid'])) {
|
||||
@@ -806,6 +808,8 @@ class ReportTable
|
||||
$tableData->REP_TAB_CONNECTION = $contentSchema['DBS_UID'];
|
||||
$tableData->REP_TAB_TYPE = (isset($contentSchema['ADD_TAB_TYPE'])) ? $contentSchema['ADD_TAB_TYPE'] : '';
|
||||
$tableData->REP_TAB_GRID = (isset($contentSchema['ADD_TAB_GRID'])) ? $contentSchema['ADD_TAB_GRID'] : '';
|
||||
$tableData->REP_TAB_OFFLINE = (isset($contentSchema['ADD_TAB_OFFLINE'])) ? $contentSchema['ADD_TAB_OFFLINE'] : '0';
|
||||
$tableData->REP_TAB_UPDATE_DATE = date('Y-m-d H:i:s');
|
||||
$tableData->columns = G::json_encode($columns);
|
||||
$tableData->forceUid = true;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class Table
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTables($pro_uid = '', $reportFlag = false)
|
||||
public function getTables($pro_uid = '', $reportFlag = false, $offline = false)
|
||||
{
|
||||
//VALIDATION
|
||||
if ($reportFlag) {
|
||||
@@ -87,6 +87,7 @@ class Table
|
||||
$tabData['PMT_UID'] = $tab_uid;
|
||||
$tabData['PMT_TAB_NAME'] = $table['ADD_TAB_NAME'];
|
||||
$tabData['PMT_TAB_DESCRIPTION'] = $table['ADD_TAB_DESCRIPTION'];
|
||||
$tabData['PMT_TAB_OFFLINE'] = $table['ADD_TAB_OFFLINE'];
|
||||
$tabData['PMT_TAB_CLASS_NAME'] = $table['ADD_TAB_CLASS_NAME'];
|
||||
$tabData['PMT_NUM_ROWS'] = $tableData['count'];
|
||||
}
|
||||
@@ -384,6 +385,8 @@ class Table
|
||||
'ADD_TAB_NAME' => $dataValidate['REP_TAB_NAME'],
|
||||
'ADD_TAB_CLASS_NAME' => $repTabClassName,
|
||||
'ADD_TAB_DESCRIPTION' => $dataValidate['REP_TAB_DSC'],
|
||||
'ADD_TAB_OFFLINE' => 0,
|
||||
'ADD_TAB_UPDATE_DATE' => date('Y-m-d H:i:s'),
|
||||
'ADD_TAB_PLG_UID' => '',
|
||||
'DBS_UID' => ($dataValidate['REP_TAB_CONNECTION'] ? $dataValidate['REP_TAB_CONNECTION'] : 'workflow'),
|
||||
'PRO_UID' => $dataValidate['PRO_UID'],
|
||||
@@ -396,6 +399,8 @@ class Table
|
||||
'ADD_TAB_NAME' => $dataValidate['PMT_TAB_NAME'],
|
||||
'ADD_TAB_CLASS_NAME' => $repTabClassName,
|
||||
'ADD_TAB_DESCRIPTION' => $dataValidate['PMT_TAB_DSC'],
|
||||
'ADD_TAB_OFFLINE' => !empty($dataValidate['PMT_TAB_OFFLINE']) ?? 0,
|
||||
'ADD_TAB_UPDATE_DATE' => date('Y-m-d H:i:s'),
|
||||
'ADD_TAB_PLG_UID' => '',
|
||||
'DBS_UID' => ($dataValidate['PMT_TAB_CONNECTION'] ? $dataValidate['PMT_TAB_CONNECTION'] : 'workflow'),
|
||||
'PRO_UID' => '',
|
||||
@@ -549,6 +554,11 @@ class Table
|
||||
$dataValidate['rep_tab_dsc'] = $tableData['pmt_tab_dsc'];
|
||||
$tableDsc = true;
|
||||
}
|
||||
if (!empty($tableData['pmt_tab_offline'])) {
|
||||
$dataValidate['rep_tab_offline'] = $tableData['pmt_tab_offline'];
|
||||
$tableDsc = true;
|
||||
}
|
||||
$dataValidate['rep_tab_update_date'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
if (!empty($tableData['fields'])) {
|
||||
$dataValidate['fields'] = $tableData['fields'];
|
||||
|
||||
@@ -73,7 +73,8 @@ class System
|
||||
'files_white_list' => '',
|
||||
'delay' => '0',
|
||||
'tries' => '10',
|
||||
'retry_after' => '90'
|
||||
'retry_after' => '90',
|
||||
'mobile_offline_tables_download_interval' => 24
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -1203,6 +1204,15 @@ class System
|
||||
$config['proxy_pass'] = G::decrypt($config['proxy_pass'], 'proxy_pass');
|
||||
}
|
||||
|
||||
/**
|
||||
* Here if you validate if the type of data obtained from the configuration
|
||||
* files are valid, otherwise the default value is used.
|
||||
*/
|
||||
$value = (string) $config['mobile_offline_tables_download_interval'];
|
||||
if (!is_numeric($value)) {
|
||||
$config['mobile_offline_tables_download_interval'] = self::$defaultConfig['mobile_offline_tables_download_interval'];
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
|
||||
105
workflow/engine/src/ProcessMaker/Model/AdditionalTables.php
Normal file
105
workflow/engine/src/ProcessMaker/Model/AdditionalTables.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Model;
|
||||
|
||||
use AdditionalTables as ModelAdditionalTables;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AdditionalTables extends Model
|
||||
{
|
||||
protected $table = 'ADDITIONAL_TABLES';
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Get the fields related to the table belongs to
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function columns()
|
||||
{
|
||||
return $this->belongsTo(Fields::class, 'ADD_TAB_UID', 'ADD_TAB_UID');
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to get the offline tables
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeOffline($query)
|
||||
{
|
||||
return $query->where('ADD_TAB_OFFLINE', '=', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the structure of offline tables
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getTablesOfflineStructure()
|
||||
{
|
||||
$query = AdditionalTables::query()->select([
|
||||
'ADD_TAB_UID',
|
||||
'ADD_TAB_NAME',
|
||||
'ADD_TAB_DESCRIPTION',
|
||||
'ADD_TAB_CLASS_NAME'
|
||||
]);
|
||||
$query->offline();
|
||||
|
||||
$results = $query->get();
|
||||
$data = [];
|
||||
$results->each(function ($item, $key) use (&$data) {
|
||||
$data[$key] = array_change_key_case($item->toArray(), CASE_LOWER);
|
||||
$data[$key]['fields'] = Fields::getFields($item->ADD_TAB_UID);
|
||||
});
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data of offline tables
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getTablesOfflineData()
|
||||
{
|
||||
$query = AdditionalTables::query()->select([
|
||||
'ADD_TAB_UID',
|
||||
'ADD_TAB_NAME',
|
||||
'ADD_TAB_DESCRIPTION',
|
||||
'ADD_TAB_CLASS_NAME'
|
||||
]);
|
||||
$query->offline();
|
||||
|
||||
$results = $query->get();
|
||||
$data = [];
|
||||
$results->each(function ($item, $key) use (&$data) {
|
||||
$data[$key] = array_change_key_case($item->toArray(), CASE_LOWER);
|
||||
|
||||
$additionalTables = new ModelAdditionalTables();
|
||||
$result = $additionalTables->getAllData($item->ADD_TAB_UID);
|
||||
if (empty($result['rows'])) {
|
||||
$data[$key]['rows'] = [];
|
||||
} else {
|
||||
foreach ($result['rows'] as $i => $row) {
|
||||
$data[$key]['rows'][$i] = $row;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the offline property.
|
||||
* @param array $tablesUid
|
||||
* @param int $value
|
||||
* @return void
|
||||
*/
|
||||
public static function updatePropertyOffline(array $tablesUid, $value): void
|
||||
{
|
||||
$query = AdditionalTables::whereIn('ADD_TAB_UID', $tablesUid)
|
||||
->update(['ADD_TAB_OFFLINE' => $value]);
|
||||
}
|
||||
}
|
||||
55
workflow/engine/src/ProcessMaker/Model/Fields.php
Normal file
55
workflow/engine/src/ProcessMaker/Model/Fields.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Fields extends Model
|
||||
{
|
||||
protected $table = 'FIELDS';
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Get the fields related to the table belongs to
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function table()
|
||||
{
|
||||
return $this->belongsTo(AdditionalTables::class, 'ADD_TAB_UID', 'ADD_TAB_UID');
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope a query to get the offline tables
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $tabUid
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeTable($query, $tabUid)
|
||||
{
|
||||
return $query->where('ADD_TAB_UID', '=', $tabUid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the offline tables
|
||||
*
|
||||
* @param string $tabUid
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getFields($tabUid)
|
||||
{
|
||||
$query = Fields::query();
|
||||
$query->table($tabUid);
|
||||
|
||||
$results = $query->get();
|
||||
$data = [];
|
||||
$results->each(function ($item, $key) use (&$data) {
|
||||
$data[$key] = array_change_key_case($item->toArray(), CASE_LOWER);
|
||||
});
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
@@ -1169,12 +1169,13 @@ class Workflow extends Handler
|
||||
|
||||
//Getting DynaForms
|
||||
foreach ($workflowData["dynaforms"] as $dynaform) {
|
||||
$dynFile = PATH_DYNAFORM . $dynaform["DYN_FILENAME"] . ".xml";
|
||||
$dynFile = PATH_DYNAFORM . $dynaform["PRO_UID"] . "/" . $dynaform["DYN_UID"] . ".xml";
|
||||
$content = file_exists($dynFile) ? file_get_contents($dynFile) : '';
|
||||
|
||||
$workflowFile["DYNAFORMS"][] = array(
|
||||
"filename" => $dynaform["DYN_TITLE"],
|
||||
"filepath" => $dynaform["DYN_FILENAME"] . ".xml",
|
||||
"file_content" => file_get_contents($dynFile)
|
||||
"file_content" => $content
|
||||
);
|
||||
|
||||
$htmlFile = PATH_DYNAFORM . $dynaform["DYN_FILENAME"] . ".html";
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Services\Api;
|
||||
|
||||
use Exception;
|
||||
use Luracast\Restler\RestException;
|
||||
use ProcessMaker\BusinessModel\Table as BusinessModelTable;
|
||||
use ProcessMaker\Model\AdditionalTables;
|
||||
use ProcessMaker\Services\Api;
|
||||
|
||||
/**
|
||||
@@ -14,85 +16,137 @@ use ProcessMaker\Services\Api;
|
||||
class Pmtable extends Api
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
* Get a list of the PM tables in the workspace. It does not include any Report Table
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @url GET
|
||||
* @status 200
|
||||
*
|
||||
* @param boolean $offline {@from path}
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url GET
|
||||
* @class AccessControl {@permission PM_LOGIN}
|
||||
* @link https://wiki.processmaker.com/3.1/REST_API_Administration/PM_Tables#PM_Tables_List:_GET_.2Fpmtable
|
||||
*/
|
||||
public function doGetPmTables()
|
||||
public function doGetPmTables($offline = false)
|
||||
{
|
||||
try {
|
||||
$oPmTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$response = $oPmTable->getTables();
|
||||
if ($offline) {
|
||||
$response = AdditionalTables::getTablesOfflineStructure();
|
||||
} else {
|
||||
$pmTable = new BusinessModelTable();
|
||||
$response = $pmTable->getTables();
|
||||
}
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* Get the data of the offline PM tables
|
||||
*
|
||||
* @url GET /offline/data
|
||||
* @status 200
|
||||
*
|
||||
* @param boolean $compress {@from path}
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @class AccessControl {@permission PM_LOGIN}
|
||||
* @link https://wiki.processmaker.com/3.1/REST_API_Administration/PM_Tables#PM_Tables_List:_GET_.2Fpmtable
|
||||
*/
|
||||
public function doGetPmTablesDataOffline($compress = true)
|
||||
{
|
||||
try {
|
||||
$data = AdditionalTables::getTablesOfflineData();
|
||||
if ($compress) {
|
||||
$json = json_encode($data);
|
||||
$compressed = gzcompress($json, 5);
|
||||
echo $compressed;
|
||||
} else {
|
||||
return $data;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the structure from a specific PM Table, including a list of its fields and their properties.
|
||||
*
|
||||
* @url GET /:pmt_uid
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @link https://wiki.processmaker.com/3.1/REST_API_Administration/PM_Tables#Get_PM_Table_Structure:_GET_.2Fpmtable.2F.7Bpmt_uid.7D
|
||||
*/
|
||||
public function doGetPmTable($pmt_uid)
|
||||
{
|
||||
try {
|
||||
$oPmTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oPmTable = new BusinessModelTable();
|
||||
$response = $oPmTable->getTable($pmt_uid);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data from a PM table
|
||||
*
|
||||
* @url GET /:pmt_uid/data
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* @param string $filter
|
||||
* @param string $q
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url GET /:pmt_uid/data
|
||||
*
|
||||
*/
|
||||
public function doGetPmTableData($pmt_uid, $filter = null, $q = "")
|
||||
{
|
||||
try {
|
||||
$oPmTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oPmTable = new BusinessModelTable();
|
||||
$response = $oPmTable->getTableData($pmt_uid, null, $filter, false, $q);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new PM Table
|
||||
*
|
||||
* @url POST
|
||||
* @status 201
|
||||
*
|
||||
* @param array $request_data
|
||||
* @param string $pmt_tab_name {@from body}
|
||||
* @param string $pmt_tab_dsc {@from body}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @return array
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url POST
|
||||
* @status 201
|
||||
*/
|
||||
public function doPostPmTable(
|
||||
$request_data,
|
||||
@@ -100,58 +154,58 @@ class Pmtable extends Api
|
||||
$pmt_tab_dsc = ''
|
||||
) {
|
||||
try {
|
||||
$oReportTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oReportTable = new BusinessModelTable();
|
||||
$response = $oReportTable->saveTable($request_data);
|
||||
if (isset($response['pro_uid'])) {
|
||||
unset($response['pro_uid']);
|
||||
}
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* Add a new record to a PM Table
|
||||
*
|
||||
* @param array $request_data
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url POST /:pmt_uid/data
|
||||
* @status 201
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* @param array $request_data
|
||||
*
|
||||
* @return array
|
||||
* @throws RestException
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
*/
|
||||
public function doPostPmTableData(
|
||||
$pmt_uid,
|
||||
$request_data
|
||||
) {
|
||||
try {
|
||||
$oReportTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oReportTable = new BusinessModelTable();
|
||||
$response = $oReportTable->saveTableData($pmt_uid, $request_data);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update pm-table.
|
||||
* Update the structure of a PM table.
|
||||
*
|
||||
* @url PUT /:pmt_uid
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* @param array $request_data
|
||||
*
|
||||
* @return void
|
||||
* @throw RestException
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @throws RestException
|
||||
*/
|
||||
public function doPutPmTable(
|
||||
$pmt_uid,
|
||||
@@ -167,9 +221,10 @@ class Pmtable extends Api
|
||||
}
|
||||
|
||||
/**
|
||||
* Update pm-table data.
|
||||
* Update the data of an existing record in a PM table.
|
||||
*
|
||||
* @url PUT /:pmt_uid/data
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* @param array $request_data
|
||||
@@ -185,37 +240,47 @@ class Pmtable extends Api
|
||||
$request_data
|
||||
) {
|
||||
try {
|
||||
$oReportTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oReportTable = new BusinessModelTable();
|
||||
$response = $oReportTable->updateTableData($pmt_uid, $request_data);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a specified PM table and all its data.
|
||||
*
|
||||
* @url DELETE /:pmt_uid
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url DELETE /:pmt_uid
|
||||
*/
|
||||
public function doDeletePmTable($pmt_uid)
|
||||
{
|
||||
try {
|
||||
$oReportTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oReportTable = new BusinessModelTable();
|
||||
$response = $oReportTable->deleteTable($pmt_uid);
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a record from a PM table, by specifying its primary key(s). The PM Table can have up to 3 primary key
|
||||
* fields.
|
||||
*
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2/:key3/:value3
|
||||
* @status 200
|
||||
*
|
||||
* @param string $pmt_uid {@min 1} {@max 32}
|
||||
* @param string $key1 {@min 1}
|
||||
* @param string $value1 {@min 1}
|
||||
@@ -225,15 +290,10 @@ class Pmtable extends Api
|
||||
* @param string $value3
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
* @throws RestException
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@permission PM_SETUP_PM_TABLES}
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2
|
||||
* @url DELETE /:pmt_uid/data/:key1/:value1/:key2/:value2/:key3/:value3
|
||||
*/
|
||||
public function doDeletePmTableData($pmt_uid, $key1, $value1, $key2 = '', $value2 = '', $key3 = '', $value3 = '')
|
||||
{
|
||||
@@ -245,10 +305,10 @@ class Pmtable extends Api
|
||||
if ($key3 != '') {
|
||||
$rows[$key3] = $value3;
|
||||
}
|
||||
$oReportTable = new \ProcessMaker\BusinessModel\Table();
|
||||
$oReportTable = new BusinessModelTable();
|
||||
$response = $oReportTable->deleteTableData($pmt_uid, $rows);
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
workflow/public_html/images/offline-pin.png
Normal file
BIN
workflow/public_html/images/offline-pin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 317 B |
Reference in New Issue
Block a user