]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.8.x' into 0.9.x
authorEvan Prodromou <evan@status.net>
Fri, 9 Oct 2009 18:07:45 +0000 (14:07 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 9 Oct 2009 18:07:45 +0000 (14:07 -0400)
classes/Session.php
plugins/FBConnect/FBConnectPlugin.php

index d641edbbe408af12c87bdcd32a416672429d2eeb..79a69a96ea3dc11b1f93672890f1687f2e263fa0 100644 (file)
@@ -85,9 +85,18 @@ class Session extends Memcached_DataObject
 
             return $session->insert();
         } else {
-            $session->session_data = $session_data;
+            if (strcmp($session->session_data, $session_data) == 0) {
+                self::logdeb("Not writing session '$id'; unchanged");
+                return true;
+            } else {
+                self::logdeb("Session '$id' data changed; updating");
+
+                $orig = clone($session);
+
+                $session->session_data = $session_data;
 
-            return $session->update();
+                return $session->update($orig);
+            }
         }
     }
 
index 593b49b4ed4810ec391387d0e78ffa909c60cbc6..cb19b054610abb9f8961a3e88b6e0ba727678215 100644 (file)
@@ -313,6 +313,11 @@ class FBConnectPlugin extends Plugin
          $action->menuItem(common_local_url('peoplesearch'),
              _('Search'), _('Search for people or text'), false, 'nav_search');
 
+        // We are replacing the primary nav entirely; give other
+        // plugins a chance to handle it here.
+
+        Event::handle('EndPrimaryNav', array($action));
+
         return false;
     }