Updated the search function, it now does a better search, including options, and it returns the rowid of the found item(s)

This commit is contained in:
Rob Gloudemans
2013-06-03 16:10:21 +02:00
parent d41c69ff80
commit 5ebd3d9cd2
4 changed files with 63 additions and 10 deletions

View File

@@ -214,12 +214,15 @@ class Cart {
{
foreach($this->getContent() as $item)
{
$rowId = $this->generateRowId($search['id'], $search['options']);
$found = $item->search($search);
if($rowId === $item->rowid) return true;
if($found)
{
$rows[] = $item->rowid;
}
}
return false;
return (empty($rows)) ? false : $rows;
}
/**