Merge branch 'release/3.2.2' into bugfix/HOR-3663
This commit is contained in:
@@ -10,6 +10,7 @@ return [
|
|||||||
'debug' => env('APP_DEBUG', false),
|
'debug' => env('APP_DEBUG', false),
|
||||||
'log' => env('APP_LOG', 'single'),
|
'log' => env('APP_LOG', 'single'),
|
||||||
'log_level' => env('APP_LOG_LEVEL', 'debug'),
|
'log_level' => env('APP_LOG_LEVEL', 'debug'),
|
||||||
|
'cache_lifetime' => env('APP_CACHE_LIFETIME', 60),
|
||||||
|
|
||||||
'providers' => [
|
'providers' => [
|
||||||
FilesystemServiceProvider::class,
|
FilesystemServiceProvider::class,
|
||||||
|
|||||||
@@ -2592,7 +2592,7 @@ class Bootstrap
|
|||||||
$hashTypePrevious = $passwordHashConfig['previous'];
|
$hashTypePrevious = $passwordHashConfig['previous'];
|
||||||
$acceptance = false;
|
$acceptance = false;
|
||||||
|
|
||||||
if ($RBAC->loginWithHash()) {
|
if ($RBAC != null && $RBAC->loginWithHash()) {
|
||||||
//To enable compatibility with soap login
|
//To enable compatibility with soap login
|
||||||
if ((Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) || ($pass === $hashTypeCurrent . ':' . $userPass)) {
|
if ((Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) || ($pass === $hashTypeCurrent . ':' . $userPass)) {
|
||||||
$acceptance = true;
|
$acceptance = true;
|
||||||
|
|||||||
@@ -184,9 +184,10 @@ class RbacUsers extends BaseRbacUsers
|
|||||||
try {
|
try {
|
||||||
$c = new Criteria('rbac');
|
$c = new Criteria('rbac');
|
||||||
$c->add(RbacUsersPeer::USR_UID, $sUsrUid);
|
$c->add(RbacUsersPeer::USR_UID, $sUsrUid);
|
||||||
$rs = RbacUsersPeer::doSelect($c, Propel::getDbConnection('rbac_ro'));
|
$resultSet = RbacUsersPeer::doSelectRS($c, Propel::getDbConnection('rbac_ro'));
|
||||||
if (is_array($rs) && isset($rs[0]) && is_object($rs[0]) && get_class($rs[0]) == 'RbacUsers') {
|
if ($resultSet->next()) {
|
||||||
$aFields = $rs[0]->toArray(BasePeer::TYPE_FIELDNAME);
|
$this->hydrate($resultSet);
|
||||||
|
$aFields = $this->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
return $aFields;
|
return $aFields;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -326,10 +327,14 @@ class RbacUsers extends BaseRbacUsers
|
|||||||
*
|
*
|
||||||
* @param string $keyType One of the class type constants TYPE_PHPNAME,
|
* @param string $keyType One of the class type constants TYPE_PHPNAME,
|
||||||
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @param boolean $original If true return de original verion of fields.
|
||||||
* @return an associative array containing the field names (as keys) and field values
|
* @return an associative array containing the field names (as keys) and field values
|
||||||
*/
|
*/
|
||||||
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
|
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $original = false)
|
||||||
{
|
{
|
||||||
|
if ($original) {
|
||||||
|
return parent::toArray($keyType);
|
||||||
|
}
|
||||||
$key = RbacUsersPeer::translateFieldName(
|
$key = RbacUsersPeer::translateFieldName(
|
||||||
RbacUsersPeer::USR_PASSWORD,
|
RbacUsersPeer::USR_PASSWORD,
|
||||||
BasePeer::TYPE_COLNAME,
|
BasePeer::TYPE_COLNAME,
|
||||||
|
|||||||
@@ -1,36 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* cliCommon.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2011 Colosa Inc.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*
|
|
||||||
* @author Alexandre Rosenfeld <alexandre@colosa.com>
|
|
||||||
* @package workflow-engine-bin-tasks
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Get the size of the terminal (only works on Linux, on Windows it's always 80) */
|
/* Get the size of the terminal (only works on Linux, on Windows it's always 80) */
|
||||||
preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output);
|
preg_match_all("/rows.([0-9]+);.columns.([0-9]+);/", strtolower(exec('stty -a |grep columns')), $output);
|
||||||
if(sizeof($output) == 3 && isset($output[2]) && isset($output[2][0])) {
|
if (sizeof($output) == 3 && isset($output[2]) && isset($output[2][0])) {
|
||||||
define("COLUMNS", $output[2][0]);
|
define("COLUMNS", $output[2][0]);
|
||||||
} else {
|
} else {
|
||||||
define("COLUMNS", 80);
|
define("COLUMNS", 80);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,15 +16,9 @@ if(sizeof($output) == 3 && isset($output[2]) && isset($output[2][0])) {
|
|||||||
* returns all available workspaces
|
* returns all available workspaces
|
||||||
* @return array of workspace objects
|
* @return array of workspace objects
|
||||||
*/
|
*/
|
||||||
function get_workspaces_from_args($args, $includeAll = true) {
|
function get_workspaces_from_args($args, $includeAll = true)
|
||||||
$workspaces = array();
|
{
|
||||||
foreach ($args as $arg) {
|
return \ProcessMaker\Util\System::getWorkspacesFromArgs($args, $includeAll);
|
||||||
$workspaces[] = new workspaceTools($arg);
|
|
||||||
}
|
|
||||||
if (empty($workspaces) && $includeAll) {
|
|
||||||
$workspaces = PmSystem::listWorkspaces();
|
|
||||||
}
|
|
||||||
return $workspaces;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -83,8 +83,11 @@ class Users extends BaseUsers
|
|||||||
try {
|
try {
|
||||||
$oRow = UsersPeer::retrieveByPK( $UsrUid );
|
$oRow = UsersPeer::retrieveByPK( $UsrUid );
|
||||||
if (! is_null( $oRow )) {
|
if (! is_null( $oRow )) {
|
||||||
|
$this->fromArray(
|
||||||
|
$oRow->toArray( BasePeer::TYPE_FIELDNAME, true ),
|
||||||
|
BasePeer::TYPE_FIELDNAME
|
||||||
|
);
|
||||||
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
$this->fromArray( $aFields, BasePeer::TYPE_FIELDNAME );
|
|
||||||
$this->setNew( false );
|
$this->setNew( false );
|
||||||
return $aFields;
|
return $aFields;
|
||||||
} else {
|
} else {
|
||||||
@@ -496,10 +499,14 @@ class Users extends BaseUsers
|
|||||||
*
|
*
|
||||||
* @param string $keyType One of the class type constants TYPE_PHPNAME,
|
* @param string $keyType One of the class type constants TYPE_PHPNAME,
|
||||||
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
|
||||||
|
* @param boolean $original If true return de original verion of fields.
|
||||||
* @return an associative array containing the field names (as keys) and field values
|
* @return an associative array containing the field names (as keys) and field values
|
||||||
*/
|
*/
|
||||||
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
|
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $original = false)
|
||||||
{
|
{
|
||||||
|
if ($original) {
|
||||||
|
return parent::toArray($keyType);
|
||||||
|
}
|
||||||
$key = UsersPeer::translateFieldName(
|
$key = UsersPeer::translateFieldName(
|
||||||
UsersPeer::USR_PASSWORD,
|
UsersPeer::USR_PASSWORD,
|
||||||
BasePeer::TYPE_COLNAME,
|
BasePeer::TYPE_COLNAME,
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use Archive_Tar;
|
|||||||
use enterprisePlugin;
|
use enterprisePlugin;
|
||||||
use Exception;
|
use Exception;
|
||||||
use G;
|
use G;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
use InputFilter;
|
use InputFilter;
|
||||||
use Language;
|
use Language;
|
||||||
use PEAR;
|
use PEAR;
|
||||||
@@ -44,6 +45,7 @@ class PluginRegistry
|
|||||||
use PluginStructure;
|
use PluginStructure;
|
||||||
use Attributes;
|
use Attributes;
|
||||||
|
|
||||||
|
const NAME_CACHE = SYS_SYS . __CLASS__;
|
||||||
/**
|
/**
|
||||||
* Instance of de object PluginRegistry
|
* Instance of de object PluginRegistry
|
||||||
* @var PluginRegistry $instance
|
* @var PluginRegistry $instance
|
||||||
@@ -72,7 +74,11 @@ class PluginRegistry
|
|||||||
public static function loadSingleton()
|
public static function loadSingleton()
|
||||||
{
|
{
|
||||||
if (self::$instance === null) {
|
if (self::$instance === null) {
|
||||||
self::$instance = new PluginRegistry();
|
if (is_null($object = Cache::get(self::NAME_CACHE))) {
|
||||||
|
$object = new PluginRegistry();
|
||||||
|
Cache::put(self::NAME_CACHE, $object, config('app.cache_lifetime'));
|
||||||
|
}
|
||||||
|
self::$instance = $object;
|
||||||
}
|
}
|
||||||
return self::$instance;
|
return self::$instance;
|
||||||
}
|
}
|
||||||
@@ -180,6 +186,7 @@ class PluginRegistry
|
|||||||
$fieldPlugin = PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
$fieldPlugin = PluginsRegistry::loadOrCreateIfNotExists(md5($plugin['PLUGIN_NAMESPACE']), $plugin);
|
||||||
PluginsRegistry::update($fieldPlugin);
|
PluginsRegistry::update($fieldPlugin);
|
||||||
}
|
}
|
||||||
|
Cache::pull(self::NAME_CACHE);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get the plugin details, by filename
|
* Get the plugin details, by filename
|
||||||
|
|||||||
@@ -35,6 +35,26 @@ class System
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns workspace objects from an array of workspace names.
|
||||||
|
*
|
||||||
|
* @param array $args an array of workspace names
|
||||||
|
* @param bool $includeAll if true and no workspace is specified in args,
|
||||||
|
* returns all available workspaces
|
||||||
|
* @return array of workspace objects
|
||||||
|
*/
|
||||||
|
public static function getWorkspacesFromArgs($args, $includeAll = true)
|
||||||
|
{
|
||||||
|
$workspaces = array();
|
||||||
|
foreach ($args as $arg) {
|
||||||
|
$workspaces[] = new \workspaceTools($arg);
|
||||||
|
}
|
||||||
|
if (empty($workspaces) && $includeAll) {
|
||||||
|
$workspaces = \System::listWorkspaces();
|
||||||
|
}
|
||||||
|
return $workspaces;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush the cache files for the specified workspace.
|
* Flush the cache files for the specified workspace.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user