BUG 9605 "Change default advanced search options" SOLVED
- Advanced search only queries the database - Advanced search and Solr will be completed in the bug 9830 * Available from version 2.0.44
This commit is contained in:
@@ -16,18 +16,18 @@ require_once 'classes/model/om/BaseUsersProperties.php';
|
||||
/**
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class UsersProperties extends BaseUsersProperties
|
||||
class UsersProperties extends BaseUsersProperties
|
||||
{
|
||||
public $fields = null;
|
||||
public $usrID = '';
|
||||
public $lang = 'en';
|
||||
|
||||
function __construct()
|
||||
function __construct()
|
||||
{
|
||||
$this->lang = defined('SYS_LANG') ? SYS_LANG : 'en';
|
||||
}
|
||||
|
||||
function UserPropertyExists($sUserUID)
|
||||
|
||||
function UserPropertyExists($sUserUID)
|
||||
{
|
||||
$oUserProperty = UsersPropertiesPeer::retrieveByPk($sUserUID);
|
||||
if (!is_null($oUserProperty) && is_object($oUserProperty) && get_class($oUserProperty) == 'UsersProperties') {
|
||||
@@ -40,8 +40,8 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
}
|
||||
|
||||
public function load($sUserUID)
|
||||
{
|
||||
public function load($sUserUID)
|
||||
{
|
||||
$oUserProperty = UsersPropertiesPeer::retrieveByPK($sUserUID);
|
||||
if (!is_null($oUserProperty)) {
|
||||
$aFields = $oUserProperty->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
@@ -53,7 +53,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
}
|
||||
|
||||
public function create($aData)
|
||||
public function create($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(UsersPropertiesPeer::DATABASE_NAME);
|
||||
try {
|
||||
@@ -80,7 +80,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
}
|
||||
|
||||
public function update($aData)
|
||||
public function update($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(UsersPropertiesPeer::DATABASE_NAME);
|
||||
try {
|
||||
@@ -112,7 +112,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
}
|
||||
|
||||
public function loadOrCreateIfNotExists($sUserUID, $aUserProperty = array())
|
||||
public function loadOrCreateIfNotExists($sUserUID, $aUserProperty = array())
|
||||
{
|
||||
if (!$this->UserPropertyExists($sUserUID)) {
|
||||
$aUserProperty['USR_UID'] = $sUserUID;
|
||||
@@ -131,7 +131,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
return $aUserProperty;
|
||||
}
|
||||
|
||||
public function validatePassword($sPassword, $sLastUpdate, $iChangePasswordNextTime)
|
||||
public function validatePassword($sPassword, $sLastUpdate, $iChangePasswordNextTime)
|
||||
{
|
||||
if (!defined('PPP_MINIMUM_LENGTH')) {
|
||||
define('PPP_MINIMUM_LENGTH', 5);
|
||||
@@ -197,7 +197,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
return $aErrors;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* get user location
|
||||
@@ -223,7 +223,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
if (empty($url)) {
|
||||
$url = $this->_getDefaultLocation();
|
||||
}
|
||||
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
$urlUx = $this->_getUXSkinVariant();
|
||||
if (!empty($urlUx)) {
|
||||
$_SESSION['_defaultUserLocation'] = $url;
|
||||
$url = $urlUx;
|
||||
$url = $urlUx;
|
||||
}
|
||||
|
||||
return $url;
|
||||
@@ -270,6 +270,9 @@ class UsersProperties extends BaseUsersProperties
|
||||
if ($oConf->aConfig['DEFAULT_MENU'] == 'PM_USERS') {
|
||||
$oConf->aConfig['DEFAULT_MENU'] = 'PM_SETUP';
|
||||
}
|
||||
|
||||
$getUrl = null;
|
||||
|
||||
switch ($oConf->aConfig['DEFAULT_MENU']) {
|
||||
case 'PM_SETUP':
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
@@ -297,7 +300,8 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
break;
|
||||
}
|
||||
$url = $url."?st=".$getUrl;
|
||||
|
||||
$url = $url . (($getUrl != null)? "?st=" . $getUrl : null);
|
||||
}
|
||||
}
|
||||
return $url;
|
||||
@@ -316,7 +320,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
//to do: complete the validation
|
||||
if(isset($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']))
|
||||
$userRole = $RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE'];
|
||||
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$aRedirectLogin = $oPluginRegistry->getRedirectLogins();
|
||||
if (isset($aRedirectLogin) && is_array($aRedirectLogin) ) {
|
||||
@@ -349,7 +353,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
require_once 'classes/model/GroupUser.php';
|
||||
$gu = new GroupUser();
|
||||
$ugList = $gu->getAllUserGroups($this->usrID);
|
||||
|
||||
|
||||
foreach ($ugList as $row) {
|
||||
if ($row['GRP_UX'] != 'NORMAL' && $row['GRP_UX'] != '') {
|
||||
$uxType = $row['GRP_UX'];
|
||||
@@ -357,7 +361,7 @@ class UsersProperties extends BaseUsersProperties
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch ($uxType) {
|
||||
case 'SIMPLIFIED':
|
||||
case 'SWITCHABLE':
|
||||
@@ -384,13 +388,13 @@ class UsersProperties extends BaseUsersProperties
|
||||
|
||||
$baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/';
|
||||
$url = '';
|
||||
|
||||
|
||||
if( sizeof($oConf->aConfig) > 0) { // this user has a configuration record
|
||||
// backward compatibility, because now, we don't have user and dashboard menu.
|
||||
if ($oConf->aConfig['DEFAULT_MENU'] == 'PM_USERS') {
|
||||
$oConf->aConfig['DEFAULT_MENU'] = 'PM_SETUP';
|
||||
}
|
||||
|
||||
|
||||
switch ($oConf->aConfig['DEFAULT_MENU']) {
|
||||
case 'PM_SETUP':
|
||||
if ($RBAC->userCanAccess('PM_SETUP') == 1) {
|
||||
|
||||
@@ -22,12 +22,21 @@ try {
|
||||
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "")? $_SESSION["USER_LOGGED"] : null;
|
||||
$user = ($user == "CURRENT_USER")? $userUid : $user;
|
||||
|
||||
/*
|
||||
if ((
|
||||
$action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" ||
|
||||
$action == "unassigned" || $action == "search"
|
||||
)
|
||||
&&
|
||||
(($solrConf = System::solrEnv()) !== false)
|
||||
) {
|
||||
*/
|
||||
if ((
|
||||
$action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" ||
|
||||
$action == "unassigned"
|
||||
)
|
||||
&&
|
||||
(($solrConf = System::solrEnv()) !== false)
|
||||
) {
|
||||
G::LoadClass("AppSolr");
|
||||
|
||||
@@ -37,6 +46,10 @@ try {
|
||||
$solrConf["solr_instance"]
|
||||
);
|
||||
|
||||
if ($action == "search") {
|
||||
$userUid = $user;
|
||||
}
|
||||
|
||||
$data = $ApplicationSolrIndex->getAppGridData(
|
||||
$userUid,
|
||||
$start,
|
||||
|
||||
Reference in New Issue
Block a user