Commit 0585977c authored by Artem M.'s avatar Artem M.
Browse files

Minor fix.

parent 0bb6f66c
...@@ -121,15 +121,15 @@ class iaProduct extends abstractModuleFront ...@@ -121,15 +121,15 @@ class iaProduct extends abstractModuleFront
return $row ? $row[0] : false; return $row ? $row[0] : false;
} }
public function getByMemberId($id, $start, $limit, $order) public function getByMemberId($id, $start, $limit, $order, $hidden = true)
{ {
return $this->_get('p.`member_id` = ' . (int)$id, $start, $limit, $order); return $this->_get('p.`member_id` = ' . (int)$id, $start, $limit, $order, $hidden);
} }
protected function _get($where = null, $start, $limit, $order = null) protected function _get($where = null, $start, $limit, $order = null, $hidden = true)
{ {
$where || $where = iaDb::EMPTY_CONDITION; $where || $where = iaDb::EMPTY_CONDITION;
$where .= ' AND p.`status` != :hidden'; $where .= $hidden ? ' AND p.`status` != :hidden' : ' AND ' . iaDb::EMPTY_CONDITION;
$this->iaDb->bind($where, ['hidden' => self::STATUS_HIDDEN, 'member_id' => isset($userId) ? $userId : 0]); $this->iaDb->bind($where, ['hidden' => self::STATUS_HIDDEN, 'member_id' => isset($userId) ? $userId : 0]);
......
...@@ -91,7 +91,7 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) { ...@@ -91,7 +91,7 @@ if (iaView::REQUEST_HTML == $iaView->getRequestType()) {
return iaView::accessDenied(); return iaView::accessDenied();
} }
$items = $iaProduct->getByMemberId(iaUsers::getIdentity()->id, $pagination['start'], $pagination['limit'], $sorting); $items = $iaProduct->getByMemberId(iaUsers::getIdentity()->id, $pagination['start'], $pagination['limit'], $sorting, false);
} }
$pagination['total'] = $iaProduct->getFoundRows(); $pagination['total'] = $iaProduct->getFoundRows();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment