Author: david
Date: Tue Nov  9 16:27:17 2010
New Revision: 8811

Log:
Jesús' patch - check path for updateCheck cookie.

Modified:
   trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php
   trunk/apps/qubit/modules/default/templates/_updateCheck.php
   trunk/js/updateCheck.js

Modified: 
trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Nov  9 11:14:27 2010        (r8810)
+++ trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Nov  9 16:27:17 2010        (r8811)
@@ -38,6 +38,12 @@
 
     $this->updateCheckUrl = 'http://updatecheck.qubit-toolkit.org/check/';
 
+    $this->cookiePath = 
sfContext::getInstance()->request->getRelativeUrlRoot();
+    if (1 > strlen($this->cookiePath))
+    {
+      $this->cookiePath = '/';
+    }
+
     $this->updateCheckData = array();
     $this->updateCheckData['address'] = $request->getUriPrefix() . 
$request->getScriptName() . $request->getPathInfo();
     $this->updateCheckData['version'] = qubitConfiguration::VERSION.' - 
'.sfConfig::get('app_version');

Modified: trunk/apps/qubit/modules/default/templates/_updateCheck.php
==============================================================================
--- trunk/apps/qubit/modules/default/templates/_updateCheck.php Tue Nov  9 
11:14:27 2010        (r8810)
+++ trunk/apps/qubit/modules/default/templates/_updateCheck.php Tue Nov  9 
16:27:17 2010        (r8811)
@@ -13,6 +13,7 @@
 Qubit.updateCheck.currentVersion = '$currentVersion';
 Qubit.updateCheck.data = $data;
 Qubit.updateCheck.notificationMessage = '$notificationMessage';
+Qubit.updateCheck.cookiePath = '$cookiePath';
 EOF
 ) ?>
 

Modified: trunk/js/updateCheck.js
==============================================================================
--- trunk/js/updateCheck.js     Tue Nov  9 11:14:27 2010        (r8810)
+++ trunk/js/updateCheck.js     Tue Nov  9 16:27:17 2010        (r8811)
@@ -35,7 +35,7 @@
               {
                 showNotification(data.version);
 
-                YAHOO.util.Cookie.set('update_checked', data.version, { path: 
'/' });
+                YAHOO.util.Cookie.set('update_checked', data.version, { path: 
Qubit.updateCheck.cookiePath });
               }
           });
         }

-- 
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