diff --git a/module/product/model.php b/module/product/model.php index 35b2c8cfc6..c6b1d97dbe 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -61,6 +61,7 @@ class productModel extends model { if(!$productID) return; + setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot); $currentProduct = $this->getById($productID); $output = "
"; $output .= "{$currentProduct->name}"; diff --git a/module/project/model.php b/module/project/model.php index a998e2f940..50878c1a46 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -118,6 +118,7 @@ class projectModel extends model { if(!$projectID) return; + setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot); $currentProject = $this->getById($projectID); $output = "
"; $output .= "{$currentProject->name}"; diff --git a/www/js/my.full.js b/www/js/my.full.js index b7dc797bbf..cafebf6b1d 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -196,28 +196,6 @@ function switchDocLib(libID, module, method, extra) location.href=link; } -/** - * Save the id of the product last visited. - * - * @access public - * @return void - */ -function saveProduct() -{ - if($('#productID')) $.cookie('lastProduct', $('#productID').val(), {expires:config.cookieLife, path:config.webRoot}); -} - -/** - * Save the id of the project last visited. - * - * @access public - * @return void - */ -function saveProject() -{ - if($('#projectID')) $.cookie('lastProject', $('#projectID').val(), {expires:config.cookieLife, path:config.webRoot}); -} - /** * Set the ping url. * @@ -804,8 +782,6 @@ $(document).ready(function() setRequiredFields(); setPlaceholder(); - saveProduct(); - saveProject(); setAbout(); setQRCode();