1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: if (!defined('XOOPS_ROOT_PATH')) exit();
12:
13: class Legacy_SessionCallback extends XCube_ActionFilter
14: {
15: function preBlockFilter()
16: {
17: $this->mRoot->mDelegateManager->add('XCube_Session.SetupSessionHandler', 'Legacy_SessionCallback::setupSessionHandler');
18: $this->mRoot->mDelegateManager->add('XCube_Session.GetSessionCookiePath', 'Legacy_SessionCallback::getSessionCookiePath');
19: }
20:
21: function setupSessionHandler()
22: {
23: $sessionHandler =& xoops_gethandler('session');
24: session_set_save_handler(
25: array(&$sessionHandler, 'open'),
26: array(&$sessionHandler, 'close'),
27: array(&$sessionHandler, 'read'),
28: array(&$sessionHandler, 'write'),
29: array(&$sessionHandler, 'destroy'),
30: array(&$sessionHandler, 'gc'));
31: }
32:
33: function getSessionCookiePath(&$cookiePath) {
34: $parse_array = parse_url(XOOPS_URL);
35: $cookiePath = @$parse_array['path'].'/';
36: }
37: }
38: