visits['products'] as $key => $value) { if ($this->visits['products'][$key]['products_id'] == $id) { unset($this->visits['products'][$key]); break; } } if (sizeof($this->visits['products']) >= MAX_RECENTLY_VISITED_PRODUCTS+3) { $keys = array_keys($this->visits['products']); unset($this->visits['products'][$keys[0]]); $this->debug[] = 'unsetted ' . $keys[0]; } if (SERVICE_RECENTLY_VISITED_ORIGINAL_PAGE == 'True') { $this->visits['products'][] = array('products_id' => $id, 'page_name' => basename($_SERVER['PHP_SELF']), 'get_params' => tep_array_to_string($_GET, array($osC_Session->name, 'action', 'products_id')) ); } else { $this->visits['products'][] = array('products_id' => $id); } } function setCategory() { if (!empty($_GET['cPath'])) { $cpath = $_GET['cPath']; foreach ($this->visits['categories'] as $key => $value) { if ($this->visits['categories'][$key]['cpath'] == $cpath) { unset($this->visits['categories'][$key]); break; } } if (sizeof($this->visits['categories']) >= MAX_RECENTLY_VISITED_CATEGORIES+3) { $keys = array_keys($this->visits['categories']); unset($this->visits['categories'][$keys[0]]); } $this->visits['categories'][] = array('cpath' => $cpath); } } function setSearchQuery() { if (!empty($_GET['keywords'])) { $keywords = $_GET['keywords']; foreach ($this->visits['searches'] as $key => $value) { if ($this->visits['searches'][$key]['keywords'] == $keywords) { unset($this->visits['searches'][$key]); break; } } if (sizeof($this->visits['searches']) >= MAX_RECENTLY_VISITED_SEARCHES+3) { $keys = array_keys($this->visits['searches']); unset($this->visits['searches'][$keys[0]]); } $this->visits['searches'][] = array('keywords' => $keywords, 'get_params' => tep_array_to_string($_GET, array($osC_Session->name, 'keywords'))); } } } ?>