Author: david
Date: Fri Oct 15 17:19:40 2010
New Revision: 8174

Log:
Move sfSessionStorage customization to QubitSessiontStorage library.

Added:
   trunk/lib/QubitSessionStorage.class.php   (contents, props changed)
Modified:
   trunk/apps/qubit/config/factories.yml
   trunk/vendor/symfony/lib/storage/sfSessionStorage.class.php

Modified: trunk/apps/qubit/config/factories.yml
==============================================================================
--- trunk/apps/qubit/config/factories.yml       Fri Oct 15 15:19:01 2010        
(r8173)
+++ trunk/apps/qubit/config/factories.yml       Fri Oct 15 17:19:40 2010        
(r8174)
@@ -8,6 +8,11 @@
       level:   err
       loggers: ~
 
+  storage:
+    class: QubitSessionStorage
+    param:
+      session_name: symfony
+
 test:
   storage:
     class: sfSessionTestStorage
@@ -28,6 +33,11 @@
     param:
       delivery_strategy: none
 
+  storage:
+    class: QubitSessionStorage
+    param:
+      session_name: symfony
+
 all:
   i18n:
     class: sfTranslateI18N

Added: trunk/lib/QubitSessionStorage.class.php
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/lib/QubitSessionStorage.class.php     Fri Oct 15 17:19:40 2010        
(r8174)
@@ -0,0 +1,36 @@
+<?php
+
+/*
+ * This file is part of Qubit Toolkit.
+ *
+ * Qubit Toolkit is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Qubit Toolkit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Qubit Toolkit.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+class QubitSessionStorage extends sfSessionStorage
+{
+  public function initialize($options = null)
+  {
+    // http://trac.symfony-project.org/ticket/5683
+    if (!isset($options['session_cookie_path']))
+    {
+      $options['session_cookie_path'] = 
sfContext::getInstance()->request->getRelativeUrlRoot();
+      if (1 > strlen($options['session_cookie_path']))
+      {
+        $options['session_cookie_path'] = '/';
+      }
+    }
+
+    parent::initialize($options);
+  }
+}

Modified: trunk/vendor/symfony/lib/storage/sfSessionStorage.class.php
==============================================================================
--- trunk/vendor/symfony/lib/storage/sfSessionStorage.class.php Fri Oct 15 
15:19:01 2010        (r8173)
+++ trunk/vendor/symfony/lib/storage/sfSessionStorage.class.php Fri Oct 15 
17:19:40 2010        (r8174)
@@ -49,16 +49,6 @@
    */
   public function initialize($options = null)
   {
-    // http://trac.symfony-project.org/ticket/5683
-    if (!isset($options['session_cookie_path']))
-    {
-      $options['session_cookie_path'] = 
sfContext::getInstance()->request->getRelativeUrlRoot();
-      if (1 > strlen($options['session_cookie_path']))
-      {
-        $options['session_cookie_path'] = '/';
-      }
-    }
-
     $cookieDefaults = session_get_cookie_params();
 
     $options = array_merge(array(

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to