<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [2572] trunk/bp-themes/bp-default/_inc/global.js:
  Removing path setting as this is causing issues with clearing of cookies.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2572</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-03 17:28:38 +0000 (Wed, 03 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Removing path setting as this is causing issues with clearing of cookies. Clearing page, search_terms and extras cookies on page load.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefault_incglobaljs">trunk/bp-themes/bp-default/_inc/global.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefault_incglobaljs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/global.js (2571 => 2572)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/global.js        2010-02-03 16:37:16 UTC (rev 2571)
+++ trunk/bp-themes/bp-default/_inc/global.js        2010-02-03 17:28:38 UTC (rev 2572)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 /* Reset the page */
</span><del>-                j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
</del><ins>+                j.cookie( 'bp-activity-oldestpage', 1 );
</ins><span class="cx"> 
</span><span class="cx">                 /* Activity Stream Tabs */
</span><span class="cx">                 var scope = target.attr('id').substr( 9, target.attr('id').length );
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx">                         j(&quot;li.load-more&quot;).addClass('loading');
</span><span class="cx"> 
</span><span class="cx">                         if ( null == j.cookie('bp-activity-oldestpage') )
</span><del>-                                j.cookie('bp-activity-oldestpage', 1, {path: '/'} );
</del><ins>+                                j.cookie('bp-activity-oldestpage', 1 );
</ins><span class="cx"> 
</span><span class="cx">                         var oldest_page = ( j.cookie('bp-activity-oldestpage') * 1 ) + 1;
</span><span class="cx"> 
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx">                         function(response)
</span><span class="cx">                         {
</span><span class="cx">                                 j(&quot;li.load-more&quot;).removeClass('loading');
</span><del>-                                j.cookie( 'bp-activity-oldestpage', oldest_page, {path: '/'} );
</del><ins>+                                j.cookie( 'bp-activity-oldestpage', oldest_page );
</ins><span class="cx">                                 j(&quot;ul.activity-list&quot;).append(response.contents);
</span><span class="cx"> 
</span><span class="cx">                                 target.parent().hide();
</span><span class="lines">@@ -1008,17 +1008,17 @@
</span><span class="cx"> 
</span><span class="cx">         /* Clear BP cookies on logout */
</span><span class="cx">         j('a.logout').click( function() {
</span><del>-                j.cookie('bp-activity-scope', null, {path: '/'});
-                j.cookie('bp-activity-filter', null, {path: '/'});
-                j.cookie('bp-activity-oldestpage', null, {path: '/'});
</del><ins>+                j.cookie('bp-activity-scope', null);
+                j.cookie('bp-activity-filter', null);
+                j.cookie('bp-activity-oldestpage', null);
</ins><span class="cx"> 
</span><span class="cx">                 var objects = [ 'members', 'groups', 'blogs', 'forums' ];
</span><span class="cx">                 j(objects).each( function(i) {
</span><del>-                        j.cookie('bp-' + objects[i] + '-scope', null, {path: '/'} );
-                        j.cookie('bp-' + objects[i] + '-filter', null, {path: '/'} );
-                        j.cookie('bp-' + objects[i] + '-search-terms', null, {path: '/'} );
-                        j.cookie('bp-' + objects[i] + '-page', null, {path: '/'} );
-                        j.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
</del><ins>+                        j.cookie('bp-' + objects[i] + '-scope', null );
+                        j.cookie('bp-' + objects[i] + '-filter', null );
+                        j.cookie('bp-' + objects[i] + '-search-terms', null );
+                        j.cookie('bp-' + objects[i] + '-page', null );
+                        j.cookie('bp-' + objects[i] + '-extras', null );
</ins><span class="cx">                 });
</span><span class="cx">         });
</span><span class="cx"> });
</span><span class="lines">@@ -1026,7 +1026,7 @@
</span><span class="cx"> /* Setup activity scope and filter based on the current cookie settings. */
</span><span class="cx"> function bp_init_activity() {
</span><span class="cx">         /* Reset the page */
</span><del>-        j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
</del><ins>+        j.cookie( 'bp-activity-oldestpage', 1 );
</ins><span class="cx"> 
</span><span class="cx">         if ( null != j.cookie('bp-activity-filter') &amp;&amp; j('#activity-filter-select').length )
</span><span class="cx">                 j('#activity-filter-select select option[value=' + j.cookie('bp-activity-filter') + ']').attr( 'selected', 'selected' );
</span><span class="lines">@@ -1053,8 +1053,10 @@
</span><span class="cx">                         j('div.item-list-tabs li#' + objects[i] + '-' + j.cookie('bp-' + objects[i] + '-scope') + ', div.item-list-tabs#object-nav li.current').addClass('selected');
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                /* Reset the page cookie on reload */
-                j.cookie('bp-' + objects[i] + '-page', null, {path: '/'});
</del><ins>+                /* Reset specfic cookies on reload */
+                j.cookie('bp-' + objects[i] + '-search-terms', null );
+                j.cookie('bp-' + objects[i] + '-page', null );
+                j.cookie('bp-' + objects[i] + '-extras', null );
</ins><span class="cx">         });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1082,11 +1084,11 @@
</span><span class="cx">                 search_terms = j.query.get('s');
</span><span class="cx"> 
</span><span class="cx">         /* Save the type and filter to a session cookie */
</span><del>-        j.cookie( 'bp-' + object + '-scope', scope, null, {path: '/'} );
-        j.cookie( 'bp-' + object + '-filter', filter, null, {path: '/'} );
-        j.cookie( 'bp-' + object + '-page', page, null, {path: '/'} );
-        j.cookie( 'bp-' + object + '-search-terms', search_terms, null, {path: '/'} );
-        j.cookie( 'bp-' + object + '-extras', extras, null, {path: '/'} );
</del><ins>+        j.cookie( 'bp-' + object + '-scope', scope, null );
+        j.cookie( 'bp-' + object + '-filter', filter, null );
+        j.cookie( 'bp-' + object + '-page', page, null );
+        j.cookie( 'bp-' + object + '-search-terms', search_terms, null );
+        j.cookie( 'bp-' + object + '-extras', extras, null );
</ins><span class="cx"> 
</span><span class="cx">         /* Set the correct selected nav and filter */
</span><span class="cx">         j('div.item-list-tabs li').each( function() {
</span><span class="lines">@@ -1128,9 +1130,9 @@
</span><span class="cx">                 var filter = '-1';
</span><span class="cx"> 
</span><span class="cx">         /* Save the type and filter to a session cookie */
</span><del>-        j.cookie( 'bp-activity-scope', scope, null, {path: '/'} );
-        j.cookie( 'bp-activity-filter', filter, null, {path: '/'} );
-        j.cookie( 'bp-activity-oldestpage', 1, {path: '/'} );
</del><ins>+        j.cookie( 'bp-activity-scope', scope, null );
+        j.cookie( 'bp-activity-filter', filter, null );
+        j.cookie( 'bp-activity-oldestpage', 1 );
</ins><span class="cx"> 
</span><span class="cx">         /* Remove selected and loading classes from tabs */
</span><span class="cx">         j('div.item-list-tabs li').each( function() {
</span></span></pre>
</div>
</div>

</body>
</html>