summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-09 14:07:45 -0400
committerEvan Prodromou <evan@status.net>2009-10-09 14:07:45 -0400
commitbf1c662990af63b9bd7cf8261974808bea0ca816 (patch)
tree34e9438aa00cf0cb72e3bd78aebea67451317007
parent5702764e520f570839907444f09d6d9a23daee1e (diff)
parente9d7f18f0c2ad05c0203bc347a74c0f69e497566 (diff)
Merge branch '0.8.x' into 0.9.x
-rw-r--r--classes/Session.php13
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php5
2 files changed, 16 insertions, 2 deletions
diff --git a/classes/Session.php b/classes/Session.php
index d641edbbe..79a69a96e 100644
--- a/classes/Session.php
+++ b/classes/Session.php
@@ -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);
+ }
}
}
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 593b49b4e..cb19b0546 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -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;
}