From 6b688a4739df0b8dc080ec4d71f5a7871a90ecc1 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 25 Jun 2012 15:53:57 -0400
Subject: [PATCH] Updated classes containing references to
 Zend_Session_Namespace.

---
 module/VuFind/src/VuFind/Search/Base/Options.php   |  5 +++--
 module/VuFind/src/VuFind/Search/Memory.php         | 10 ++++++----
 module/VuFind/src/VuFind/Search/ResultScroller.php |  9 ++++++---
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/module/VuFind/src/VuFind/Search/Base/Options.php b/module/VuFind/src/VuFind/Search/Base/Options.php
index 241695e06ab..a8456aa243e 100644
--- a/module/VuFind/src/VuFind/Search/Base/Options.php
+++ b/module/VuFind/src/VuFind/Search/Base/Options.php
@@ -26,6 +26,7 @@
  * @link     http://www.vufind.org  Main Page
  */
 namespace VuFind\Search\Base;
+use Zend\Session\Container as SessionContainer;
 
 /**
  * Abstract options search model.
@@ -359,13 +360,13 @@ abstract class Options
     /**
      * Get a session namespace specific to the current class.
      *
-     * @return Zend_Session_Namespace
+     * @return SessionContainer
      */
     public function getSession()
     {
         static $session = false;
         if (!$session) {
-            $session = new Zend_Session_Namespace(get_class($this));
+            $session = new SessionContainer(get_class($this));
         }
         return $session;
     }
diff --git a/module/VuFind/src/VuFind/Search/Memory.php b/module/VuFind/src/VuFind/Search/Memory.php
index bb992063162..89f4f67e6d9 100644
--- a/module/VuFind/src/VuFind/Search/Memory.php
+++ b/module/VuFind/src/VuFind/Search/Memory.php
@@ -25,6 +25,8 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://www.vufind.org  Main Page
  */
+namespace VuFind\Search;
+use Zend\Session\Container as SessionContainer;
 
 /**
  * Wrapper class to handle search memory
@@ -35,7 +37,7 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://www.vufind.org  Main Page
  */
-class VF_Search_Memory
+class Memory
 {
     /**
      * Clear the last accessed search URL in the session.
@@ -44,7 +46,7 @@ class VF_Search_Memory
      */
     public static function forgetSearch()
     {
-        $session = new Zend_Session_Namespace('Search');
+        $session = new SessionContainer('Search');
         unset($session->last);
     }
 
@@ -59,7 +61,7 @@ class VF_Search_Memory
     {
         // Only remember URL if string is non-empty... otherwise clear the memory.
         if (strlen(trim($url)) > 0) {
-            $session = new Zend_Session_Namespace('Search');
+            $session = new SessionContainer('Search');
             $session->last = $url;
         } else {
             self::forgetSearch();
@@ -74,7 +76,7 @@ class VF_Search_Memory
      */
     public static function retrieve()
     {
-        $session = new Zend_Session_Namespace('Search');
+        $session = new SessionContainer('Search');
         return isset($session->last) ? $session->last : null;
     }
 }
\ No newline at end of file
diff --git a/module/VuFind/src/VuFind/Search/ResultScroller.php b/module/VuFind/src/VuFind/Search/ResultScroller.php
index 8dd8ecac659..be033316262 100644
--- a/module/VuFind/src/VuFind/Search/ResultScroller.php
+++ b/module/VuFind/src/VuFind/Search/ResultScroller.php
@@ -25,6 +25,9 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://vufind.org/wiki/system_classes Wiki
  */
+namespace VuFind\Search;
+use VuFind\Config\Reader as ConfigReader,
+    Zend\Session\Container as SessionContainer;
 
 /**
  * Class for managing "next" and "previous" navigation within result sets.
@@ -35,7 +38,7 @@
  * @license  http://opensource.org/licenses/gpl-2.0.php GNU General Public License
  * @link     http://vufind.org/wiki/system_classes Wiki
  */
-class VF_Search_ResultScroller
+class ResultScroller
 {
     protected $enabled;
     protected $data;
@@ -46,12 +49,12 @@ class VF_Search_ResultScroller
     public function __construct()
     {
         // Is this functionality enabled in config.ini?
-        $config = VF_Config_Reader::getConfig();
+        $config = ConfigReader::getConfig();
         $this->enabled = (isset($config->Record->next_prev_navigation)
             && $config->Record->next_prev_navigation);
 
         // Set up session namespace for the class.
-        $this->data = new Zend_Session_Namespace('ResultScroller');
+        $this->data = new SessionContainer('ResultScroller');
     }
 
     /**
-- 
GitLab