|
@@ 258-270 (lines=13) @@
|
| 255 |
|
if ($this->joins) { |
| 256 |
|
$queryParams['joins'] = $this->joins; |
| 257 |
|
} |
| 258 |
|
if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) { |
| 259 |
|
foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) { |
| 260 |
|
if (!empty($colOptions['userCol'])) { |
| 261 |
|
if (strpos($colOptions['userCol'], ':')) { |
| 262 |
|
$rel = substr($colOptions['userCol'], 0, strpos($colOptions['userCol'], ':')); |
| 263 |
|
$param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1); |
| 264 |
|
$queryParams['where'][] = [$colName, \Users\User::$cur->$rel->$param]; |
| 265 |
|
} |
| 266 |
|
} elseif (isset($colOptions['value'])) { |
| 267 |
|
$queryParams['where'][] = [$colName, $colOptions['value'], is_array($colOptions['value']) ? 'IN' : '=']; |
| 268 |
|
} |
| 269 |
|
} |
| 270 |
|
} |
| 271 |
|
if (!empty($this->managerOptions['filters'])) { |
| 272 |
|
foreach ($this->managerOptions['filters'] as $col) { |
| 273 |
|
$colInfo = $modelName::getColInfo($col); |
|
@@ 528-540 (lines=13) @@
|
| 525 |
|
if (!empty($params['categoryPath']) && $modelName::$categoryModel) { |
| 526 |
|
$queryParams['where'][] = ['tree_path', $params['categoryPath'] . '%', 'LIKE']; |
| 527 |
|
} |
| 528 |
|
if (!empty($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'])) { |
| 529 |
|
foreach ($this->managerOptions['userGroupFilter'][\Users\User::$cur->group_id]['getRows'] as $colName => $colOptions) { |
| 530 |
|
if (!empty($colOptions['userCol'])) { |
| 531 |
|
if (strpos($colOptions['userCol'], ':')) { |
| 532 |
|
$rel = substr($colOptions['userCol'], 0, strpos($colOptions['userCol'], ':')); |
| 533 |
|
$param = substr($colOptions['userCol'], strpos($colOptions['userCol'], ':') + 1); |
| 534 |
|
$queryParams['where'][] = [$colName, \Users\User::$cur->$rel->$param]; |
| 535 |
|
} |
| 536 |
|
} elseif (isset($colOptions['value'])) { |
| 537 |
|
$queryParams['where'][] = [$colName, $colOptions['value'], is_array($colOptions['value']) ? 'IN' : '=']; |
| 538 |
|
} |
| 539 |
|
} |
| 540 |
|
} |
| 541 |
|
$modelName = $this->modelName; |
| 542 |
|
if (!empty($this->managerOptions['filters'])) { |
| 543 |
|
foreach ($this->managerOptions['filters'] as $col) { |