'sort_by' => null,
'direction' => 0),
$params);
-
$key = md5(serialize(array($userid, $params)));
if (!empty($this->_listcache[$key])) {
return $this->_listcache[$key];
// Build attribute/key filter.
$where = ' (' . $where . ') ';
foreach ($attributes as $key => $value) {
- $where .= ' AND ' . $key . ' = ' . $this->_db->quote($value);
+ if (is_array($value)) {
+ $value = array_map(array($this->_db, 'quote'), $value);
+ $where .= ' AND ' . $key . ' IN (' . implode(', ', $value) . ')';
+ } else {
+ $where .= ' AND ' . $key . ' = ' . $this->_db->quote($value);
+ }
}
} elseif (!empty($attributes)) {
// Restrict to shares owned by the user specified in the
$attributes = null, $parent = null,
$allLevels = true)
{
- if (is_object($parent)) {
- $parent_id = $parent->getId();
- } else {
- $parent_id = $parent;
- }
-
$query = $where = '';
if (!is_null($perm)) {
list($query, $where) = $this->_getUserAndGroupCriteria($userid, $perm);
$where = ' (' . $where . ') ';
}
foreach ($attributes as $key => $value) {
- $where .= ' AND ' . $key;
if (is_array($value)) {
- $where .= ' ' . $value[0]. ' ' . $this->_db->quote($value[1]);
+ $value = array_map(array($this->_db, 'quote'), $value);
+ $where .= ' AND ' . $key . ' IN (' . implode(', ', $value) . ')';
} else {
- $where .= ' = ' . $this->_db->quote($value);
+ $where .= ' AND ' . $key . ' = ' . $this->_db->quote($value);
}
}
} elseif (!empty($attributes)) {