|
|
@@ -23,7 +23,7 @@ class BxPersonsGridAdministration extends BxBaseModProfileGridAdministration
|
|
|
$CNF = &$this->_oModule->_oConfig->CNF;
|
|
|
$this->_sFilter2Name = 'filter2';
|
|
|
$aTmp = array();
|
|
|
- BxDolAclQuery::getInstance()->getLevels(array('type' => 'all_active_pair'), $aTmp);
|
|
|
+ BxDolAclQuery::getInstance()->getLevels(array('type' => 'all_active_not_automatic_pair'), $aTmp);
|
|
|
foreach ($aTmp as $sKey => $sValue) {
|
|
|
$this->_aFilter2Values["level" . $sKey] = $sValue;
|
|
|
}
|
|
|
@@ -42,9 +42,13 @@ class BxPersonsGridAdministration extends BxBaseModProfileGridAdministration
|
|
|
|
|
|
if(!empty($this->_sFilter1Value))
|
|
|
$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
|
|
|
-
|
|
|
- if(!empty($this->_sFilter2Value))
|
|
|
- $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`id` IN (SELECT `IDMember` FROM `sys_acl_levels_members` WHERE IDLevel = ?) ", str_replace("level", "", $this->_sFilter2Value));
|
|
|
+ if(!empty($this->_sFilter2Value)){
|
|
|
+ $iLevel = intval(str_replace("level", "", $this->_sFilter2Value));
|
|
|
+ if ($iLevel <> 3)
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`id` IN (SELECT `IDMember` FROM `sys_acl_levels_members` WHERE IDLevel = ?) ", $iLevel);
|
|
|
+ else
|
|
|
+ $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`id` NOT IN (SELECT `IDMember` FROM `sys_acl_levels_members`) ", '');
|
|
|
+ }
|
|
|
|
|
|
return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
|
|
|
}
|