BUG 14958 "Perfil por creador de proceso" SOLVED
This commit is contained in:
@@ -601,7 +601,7 @@ class Process extends BaseProcess
|
||||
}
|
||||
}
|
||||
|
||||
public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false)
|
||||
public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false, $userLogged = "")
|
||||
{
|
||||
require_once PATH_RBAC . "model/RbacUsers.php";
|
||||
require_once "classes/model/ProcessCategory.php";
|
||||
@@ -642,10 +642,13 @@ class Process extends BaseProcess
|
||||
|
||||
$oCriteria->addJoin( ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||
$oCriteria->addJoin( ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN );
|
||||
$oCriteria->add(
|
||||
|
||||
if ($userLogged != "") {
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)->addOr(
|
||||
$oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $_SESSION["USER_LOGGED"], Criteria::EQUAL))
|
||||
);
|
||||
$oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $userLogged, Criteria::EQUAL))
|
||||
);
|
||||
}
|
||||
|
||||
$this->tmpCriteria = clone $oCriteria;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
|
||||
$memkeyTotal = $memkey . '-total';
|
||||
$memcacheUsed = 'yes';
|
||||
if (($proData = $memcache->get( $memkey )) === false || ($totalCount = $memcache->get( $memkeyTotal )) === false) {
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit);
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, null, null, true, false, $_SESSION["USER_LOGGED"]);
|
||||
$totalCount = count($proData);
|
||||
$proData = array_splice($proData, $start, $limit);
|
||||
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
|
||||
|
||||
Reference in New Issue
Block a user