  |
4 | 4 | | osCommerce, Open Source E-Commerce Solutions |
| |
5 | 5 | | http://www.oscommerce.com |
| |
6 | 6 | | |
  |
7 | | - | Copyright (c) 2004 osCommerce |
| |
| 7 | + | Copyright (c) 2005 osCommerce |
|
8 | 8 | | |
| |
9 | 9 | | Released under the GNU General Public License |
| |
10 | 10 | | */ |
| |
|
|
 |
… |
|
16 | 16 | | /* Class constructor */ |
| |
17 | 17 | | |
| |
18 | 18 | | function osC_Recently_visited() { |
  |
| 19 | + | if (isset($_SESSION['osC_RecentlyVisited_data']) === false) { |
| |
| 20 | + | $_SESSION['osC_RecentlyVisited_data'] = array(); |
| |
| 21 | + | } |
| |
| 22 | + | |
| |
| 23 | + | $this->visits =& $_SESSION['osC_RecentlyVisited_data']; |
|
19 | 24 | | } |
| |
20 | 25 | | |
| |
21 | 26 | | function contentModuleInitialize() { |
  |
22 | | - | global $osC_Services, $osC_Product; |
| |
| 27 | + | global $osC_Services, $osC_RecentlyVisited, $osC_Product; |
|
23 | 28 | | |
| |
24 | 29 | | if ($osC_Services->isStarted('recently_visited')) { |
| |
25 | 30 | | if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) { |
  |
26 | | - | $_SESSION['recently_visited']->setProduct($osC_Product->getID()); |
| |
| 31 | + | $osC_RecentlyVisited->setProduct($osC_Product->getID()); |
  |
27 | 32 | | } |
| |
28 | 33 | | } |
| |
29 | 34 | | } |