Skip to content
Snippets Groups Projects
Commit 6b688a47 authored by Demian Katz's avatar Demian Katz
Browse files

Updated classes containing references to Zend_Session_Namespace.

parent e1d10442
No related merge requests found
......@@ -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;
}
......
......@@ -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
......@@ -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');
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment