Merged in bugfix/HOR-4547 (pull request #6464)
HOR-4547 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -2832,7 +2832,7 @@ class G
|
|||||||
* @param string $array_i
|
* @param string $array_i
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function array_merge_2(&$array, &$array_i)
|
public static function array_merge_2(&$array, &$array_i)
|
||||||
{
|
{
|
||||||
foreach ($array_i as $k => $v) {
|
foreach ($array_i as $k => $v) {
|
||||||
if (is_array($v)) {
|
if (is_array($v)) {
|
||||||
|
|||||||
@@ -56,8 +56,11 @@ class XmlFormFieldWYSIWYGEditor extends XmlFormField
|
|||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function render($value, $owner = null)
|
public function render($value = null, $owner = null)
|
||||||
{
|
{
|
||||||
|
if ($value === null) {
|
||||||
|
$value = '';
|
||||||
|
}
|
||||||
$value = ($value == '') ? '<br/>' : $value;
|
$value = ($value == '') ? '<br/>' : $value;
|
||||||
$html = "<textArea class='tmceEditor' id='form[" . $this->name . "]' name='form[" . $this->name . "]' >" . htmlentities($value,
|
$html = "<textArea class='tmceEditor' id='form[" . $this->name . "]' name='form[" . $this->name . "]' >" . htmlentities($value,
|
||||||
ENT_QUOTES, 'UTF-8') . "</textarea>";
|
ENT_QUOTES, 'UTF-8') . "</textarea>";
|
||||||
|
|||||||
@@ -384,8 +384,11 @@ class XmlFormField
|
|||||||
* @param string values
|
* @param string values
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function renderGrid($values = array(), $owner = null, $onlyValue = false, $therow = -1)
|
public function renderGrid($values = null, $owner = null, $onlyValue = false, $therow = -1)
|
||||||
{
|
{
|
||||||
|
if ($values === null) {
|
||||||
|
$values = [];
|
||||||
|
}
|
||||||
$result = [];
|
$result = [];
|
||||||
$r = 1;
|
$r = 1;
|
||||||
foreach ($values as $v) {
|
foreach ($values as $v) {
|
||||||
|
|||||||
2
thirdparty/phing/ProjectComponent.php
vendored
2
thirdparty/phing/ProjectComponent.php
vendored
@@ -44,7 +44,7 @@ abstract class ProjectComponent {
|
|||||||
* @param object The reference to the current project
|
* @param object The reference to the current project
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function setProject($project) {
|
function setProject(Project $project) {
|
||||||
$this->project = $project;
|
$this->project = $project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
thirdparty/phing/types/Mapper.php
vendored
2
thirdparty/phing/types/Mapper.php
vendored
@@ -134,7 +134,7 @@ class Mapper extends DataType {
|
|||||||
*
|
*
|
||||||
* You must not set any other attribute if you make it a reference.
|
* You must not set any other attribute if you make it a reference.
|
||||||
*/
|
*/
|
||||||
function setRefid($r) {
|
function setRefid(Reference $r) {
|
||||||
if ($this->type !== null || $this->from !== null || $this->to !== null) {
|
if ($this->type !== null || $this->from !== null || $this->to !== null) {
|
||||||
throw DataType::tooManyAttributes();
|
throw DataType::tooManyAttributes();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Configurations // extends Configuration
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function Configurations()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->Configuration = new Configuration();
|
$this->Configuration = new Configuration();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1740,22 +1740,33 @@ class Derivation
|
|||||||
return $aGrp;
|
return $aGrp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkReplacedByUser ($user)
|
/**
|
||||||
|
* Review the replaced by configuration
|
||||||
|
*
|
||||||
|
* @param string $user
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
function checkReplacedByUser($user)
|
||||||
{
|
{
|
||||||
if (is_string( $user )) {
|
if (is_string($user)) {
|
||||||
$userInstance = UsersPeer::retrieveByPK( $user );
|
$userInstance = UsersPeer::retrieveByPK($user);
|
||||||
} else {
|
} else {
|
||||||
$userInstance = $user;
|
$userInstance = $user;
|
||||||
}
|
}
|
||||||
if (! is_object( $userInstance )) {
|
if (!is_object($userInstance)) {
|
||||||
throw new Exception( "The user with the UID '$user' doesn't exist." );
|
if (!is_string($user)) {
|
||||||
|
$user = gettype($user);
|
||||||
|
}
|
||||||
|
throw new Exception("The user with the UID '" . $user . "' doesn't exist.");
|
||||||
}
|
}
|
||||||
if ($userInstance->getUsrStatus() == 'ACTIVE') {
|
if ($userInstance->getUsrStatus() == 'ACTIVE') {
|
||||||
return $userInstance->getUsrUid();
|
return $userInstance->getUsrUid();
|
||||||
} else {
|
} else {
|
||||||
$userReplace = trim( $userInstance->getUsrReplacedBy() );
|
$userReplace = trim($userInstance->getUsrReplacedBy());
|
||||||
if ($userReplace != '') {
|
if ($userReplace != '') {
|
||||||
return $this->checkReplacedByUser( UsersPeer::retrieveByPK( $userReplace ) );
|
return $this->checkReplacedByUser(UsersPeer::retrieveByPK($userReplace));
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2003,7 +2003,7 @@ class ProcessMap
|
|||||||
$oDataset = InputDocumentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
$oDataset = InputDocumentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$inputDocArray = "";
|
$inputDocArray = [];
|
||||||
$inputDocArray[] = array('INP_DOC_UID' => 'char', 'PRO_UID' => 'char', 'INP_DOC_TITLE' => 'char', 'INP_DOC_DESCRIPTION' => 'char' );
|
$inputDocArray[] = array('INP_DOC_UID' => 'char', 'PRO_UID' => 'char', 'INP_DOC_TITLE' => 'char', 'INP_DOC_DESCRIPTION' => 'char' );
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
if (($aRow['INP_DOC_TITLE'] == null) || ($aRow['INP_DOC_TITLE'] == "")) {
|
if (($aRow['INP_DOC_TITLE'] == null) || ($aRow['INP_DOC_TITLE'] == "")) {
|
||||||
@@ -2071,11 +2071,11 @@ class ProcessMap
|
|||||||
$oDataset = TriggersPeer::doSelectRS($oCriteria);
|
$oDataset = TriggersPeer::doSelectRS($oCriteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$triggersArray = "";
|
$triggersArray = [];
|
||||||
$triggersArray[] = array('TRI_UID' => 'char', 'PRO_UID' => 'char', 'TRI_TITLE' => 'char', 'TRI_DESCRIPTION' => 'char');
|
$triggersArray[] = array('TRI_UID' => 'char', 'PRO_UID' => 'char', 'TRI_TITLE' => 'char', 'TRI_DESCRIPTION' => 'char');
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
if (($aRow['TRI_TITLE'] == null) || ($aRow['TRI_TITLE'] == "")) {
|
if (($aRow['TRI_TITLE'] == null) || ($aRow['TRI_TITLE'] == "")) {
|
||||||
// There is no transaltion for this Trigger name, try to get/regenerate the label
|
// There is no translation for this Trigger name, try to get/regenerate the label
|
||||||
$triggerO = new Triggers();
|
$triggerO = new Triggers();
|
||||||
$triggerObj = $triggerO->load($aRow['TRI_UID']);
|
$triggerObj = $triggerO->load($aRow['TRI_UID']);
|
||||||
$aRow['TRI_TITLE'] = $triggerObj['TRI_TITLE'];
|
$aRow['TRI_TITLE'] = $triggerObj['TRI_TITLE'];
|
||||||
|
|||||||
@@ -261,7 +261,8 @@ class PropelTable
|
|||||||
$totalWidth = 0;
|
$totalWidth = 0;
|
||||||
foreach ($this->fields as $r => $rval) {
|
foreach ($this->fields as $r => $rval) {
|
||||||
if ($this->style[$r]['showInTable'] != '0') {
|
if ($this->style[$r]['showInTable'] != '0') {
|
||||||
$totalWidth += $this->style[$r]['colWidth'];
|
$colWidth = empty($this->style[$r]['colWidth']) ? 0 : $this->style[$r]['colWidth'];
|
||||||
|
$totalWidth += $colWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->totalWidth = $totalWidth;
|
$this->totalWidth = $totalWidth;
|
||||||
@@ -327,7 +328,8 @@ class PropelTable
|
|||||||
$this->tpl->assign("width", $this->style[$r]['colWidth']);
|
$this->tpl->assign("width", $this->style[$r]['colWidth']);
|
||||||
}
|
}
|
||||||
if (isset($this->style[$r]['colWidth'])) {
|
if (isset($this->style[$r]['colWidth'])) {
|
||||||
$this->tpl->assign("widthPercent", ($this->style[$r]['colWidth'] * 100 / $this->totalWidth) . "%");
|
$colWidth = empty($this->style[$r]['colWidth']) ? 1 : $this->style[$r]['colWidth'];
|
||||||
|
$this->tpl->assign("widthPercent", ($colWidth * 100 / $this->totalWidth) . "%");
|
||||||
//Hook for special skin with RTL languajes
|
//Hook for special skin with RTL languajes
|
||||||
}
|
}
|
||||||
if (defined('SYS_LANG_DIRECTION') && SYS_LANG_DIRECTION == 'R') {
|
if (defined('SYS_LANG_DIRECTION') && SYS_LANG_DIRECTION == 'R') {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class XmlFormFieldTextPm extends XmlFormFieldSimpleText
|
|||||||
* @param eter string owner
|
* @param eter string owner
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function renderGrid($values = array(), $owner)
|
public function renderGrid($values = array(), $owner = null, $paramDummy3 = null, $paramDummy4 = null)
|
||||||
{
|
{
|
||||||
$result = array();
|
$result = array();
|
||||||
$r = 1;
|
$r = 1;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class XmlFormFieldTextareaPm extends XmlFormField
|
|||||||
* @param eter string owner
|
* @param eter string owner
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function render($value = null, $owner)
|
public function render($value = null, $owner = null)
|
||||||
{
|
{
|
||||||
if ($this->showVars == 1) {
|
if ($this->showVars == 1) {
|
||||||
$this->process = G::replaceDataField($this->process, $owner->values);
|
$this->process = G::replaceDataField($this->process, $owner->values);
|
||||||
@@ -53,8 +53,11 @@ class XmlFormFieldTextareaPm extends XmlFormField
|
|||||||
* @param eter string owner
|
* @param eter string owner
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function renderGrid($owner, $values = null)
|
public function renderGrid($owner = null, $values = null, $onlyValue = false, $therow = -1)
|
||||||
{
|
{
|
||||||
|
if ($values === null) {
|
||||||
|
$values = [];
|
||||||
|
}
|
||||||
$result = array();
|
$result = array();
|
||||||
$r = 1;
|
$r = 1;
|
||||||
foreach ($values as $v) {
|
foreach ($values as $v) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue
|
|||||||
*
|
*
|
||||||
* return void
|
* return void
|
||||||
*/
|
*/
|
||||||
public function create($applicationUid, $delIndex, array $arrayData, $dataVariable)
|
public function create($applicationUid, $delIndex, array $arrayData, $dataVariable = [])
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$cnn = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME);
|
$cnn = Propel::getConnection(AppAssignSelfServiceValuePeer::DATABASE_NAME);
|
||||||
|
|||||||
@@ -571,7 +571,8 @@ class Language extends BaseLanguage
|
|||||||
$buildhash = file_get_contents($buildhash);
|
$buildhash = file_get_contents($buildhash);
|
||||||
|
|
||||||
$michelangeloFE = PATH_HTML . "lib/js";
|
$michelangeloFE = PATH_HTML . "lib/js";
|
||||||
$pathFileMafe = array_pop(glob($michelangeloFE . '/' . '*' . $buildhash . '*', GLOB_BRACE));
|
$array = glob($michelangeloFE . '/' . '*' . $buildhash . '*', GLOB_BRACE);
|
||||||
|
$pathFileMafe = array_pop($array);
|
||||||
if (file_exists($pathFileMafe) && is_readable($pathFileMafe)) {
|
if (file_exists($pathFileMafe) && is_readable($pathFileMafe)) {
|
||||||
$labels = self::readLabelsDirectory($pathFileMafe, true);
|
$labels = self::readLabelsDirectory($pathFileMafe, true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -798,7 +798,7 @@ class InstallerModule extends Controller
|
|||||||
|
|
||||||
// CREATE databases wf_workflow
|
// CREATE databases wf_workflow
|
||||||
DB::connection(self::CONNECTION_TEST_INSTALL)
|
DB::connection(self::CONNECTION_TEST_INSTALL)
|
||||||
->statement("CREATE DATABASE IF NOT EXISTS $wf");
|
->statement("CREATE DATABASE IF NOT EXISTS $wf DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
|
||||||
|
|
||||||
self::setNewConnection(self::CONNECTION_INSTALL, $db_hostname, $db_username, $db_password, $wf, $db_port);
|
self::setNewConnection(self::CONNECTION_INSTALL, $db_hostname, $db_username, $db_password, $wf, $db_port);
|
||||||
|
|
||||||
@@ -926,7 +926,7 @@ class InstallerModule extends Controller
|
|||||||
->update([
|
->update([
|
||||||
'USR_USERNAME' => $adminUsername,
|
'USR_USERNAME' => $adminUsername,
|
||||||
'USR_LASTNAME' => $adminUsername,
|
'USR_LASTNAME' => $adminUsername,
|
||||||
'USR_PASSWORD' => Bootstrap::hashPassword($adminPassword, Bootstrap::hashBcrypt)
|
'USR_PASSWORD' => G::encryptHash($adminPassword)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::connection(self::CONNECTION_INSTALL)
|
DB::connection(self::CONNECTION_INSTALL)
|
||||||
@@ -935,7 +935,7 @@ class InstallerModule extends Controller
|
|||||||
->update([
|
->update([
|
||||||
'USR_USERNAME' => $adminUsername,
|
'USR_USERNAME' => $adminUsername,
|
||||||
'USR_LASTNAME' => $adminUsername,
|
'USR_LASTNAME' => $adminUsername,
|
||||||
'USR_PASSWORD' => Bootstrap::hashPassword($adminPassword, Bootstrap::hashBcrypt)
|
'USR_PASSWORD' => G::encryptHash($adminPassword)
|
||||||
]);
|
]);
|
||||||
// Write the paths_installed.php file (contains all the information configured so far)
|
// Write the paths_installed.php file (contains all the information configured so far)
|
||||||
if (!file_exists(FILE_PATHS_INSTALLED)) {
|
if (!file_exists(FILE_PATHS_INSTALLED)) {
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ function custom_ldap_explode_dn($dn)
|
|||||||
unset($result["count"]);
|
unset($result["count"]);
|
||||||
|
|
||||||
foreach ($result as $key => $value) {
|
foreach ($result as $key => $value) {
|
||||||
$result[$key] = addcslashes(preg_replace("/\\\([0-9A-Fa-f]{2})/", function ($m) {
|
$result[$key] = addcslashes(preg_replace_callback("/\\\([0-9A-Fa-f]{2})/", function ($m) {
|
||||||
return chr(hexdec($m[1]));
|
return chr(hexdec($m[1]));
|
||||||
}, $value), '<>,"');
|
}, $value), '<>,"');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,8 @@ switch ($_POST['action']) {
|
|||||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||||
$groupUid = $inputFilter->quoteSmart($_REQUEST['gUID'], Propel::getConnection("workflow")->getResource());
|
$connection = Propel::getConnection("workflow")->getResource();
|
||||||
|
$groupUid = $inputFilter->quoteSmart($_REQUEST['gUID'], $connection);
|
||||||
|
|
||||||
$groupUsers = new GroupUser();
|
$groupUsers = new GroupUser();
|
||||||
$type = $_POST['action'] === 'assignedMembers' ? 'USERS' : 'AVAILABLE-USERS';
|
$type = $_POST['action'] === 'assignedMembers' ? 'USERS' : 'AVAILABLE-USERS';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class AdditionalTablesConsolidated extends AdditionalTables
|
class AdditionalTablesConsolidated extends AdditionalTables
|
||||||
{
|
{
|
||||||
public function createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid)
|
public function createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid, $connection = 'workflow')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$aTypes = array('VARCHAR' => 'string',
|
$aTypes = array('VARCHAR' => 'string',
|
||||||
|
|||||||
@@ -388,8 +388,9 @@ if ($action == "uploadFileNewProcess") {
|
|||||||
$allowedExtensions = array ($processFileType
|
$allowedExtensions = array ($processFileType
|
||||||
);
|
);
|
||||||
$allowedExtensions = array ('pm');
|
$allowedExtensions = array ('pm');
|
||||||
if (! in_array( end( explode( ".", $_FILES['PROCESS_FILENAME']['name'] ) ), $allowedExtensions )) {
|
$explode = explode(".", $_FILES['PROCESS_FILENAME']['name']);
|
||||||
throw new Exception( G::LoadTranslation( "ID_FILE_UPLOAD_INCORRECT_EXTENSION" ) );
|
if (!in_array(end($explode), $allowedExtensions)) {
|
||||||
|
throw new Exception(G::LoadTranslation("ID_FILE_UPLOAD_INCORRECT_EXTENSION"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ try {
|
|||||||
$oStepTrigger = new StepTrigger();
|
$oStepTrigger = new StepTrigger();
|
||||||
$oStepTrigger->removeTrigger( $_POST['TRI_UID'] );
|
$oStepTrigger->removeTrigger( $_POST['TRI_UID'] );
|
||||||
|
|
||||||
|
$result = new stdClass();
|
||||||
$result->success = true;
|
$result->success = true;
|
||||||
$result->msg = G::LoadTranslation( 'ID_TRIGGERS_REMOVED' );
|
$result->msg = G::LoadTranslation( 'ID_TRIGGERS_REMOVED' );
|
||||||
|
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ class Installer
|
|||||||
->where('USR_UID', '00000000000000000000000000000001')
|
->where('USR_UID', '00000000000000000000000000000001')
|
||||||
->update([
|
->update([
|
||||||
'USR_USERNAME' => $this->options['admin']['username'],
|
'USR_USERNAME' => $this->options['admin']['username'],
|
||||||
'USR_PASSWORD' => Bootstrap::hashPassword($this->options['admin']['password'], Bootstrap::hashBcrypt)
|
'USR_PASSWORD' => G::encryptHash($this->options['admin']['password'])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::connection(self::CONNECTION_INSTALL)
|
DB::connection(self::CONNECTION_INSTALL)
|
||||||
@@ -521,7 +521,7 @@ class Installer
|
|||||||
->where('USR_UID', '00000000000000000000000000000001')
|
->where('USR_UID', '00000000000000000000000000000001')
|
||||||
->update([
|
->update([
|
||||||
'USR_USERNAME' => $this->options['admin']['username'],
|
'USR_USERNAME' => $this->options['admin']['username'],
|
||||||
'USR_PASSWORD' => Bootstrap::hashPassword($this->options['admin']['password'], Bootstrap::hashBcrypt)
|
'USR_PASSWORD' => G::encryptHash($this->options['admin']['password'])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user