summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArto Bendiken2007-09-30 19:10:01 (GMT)
committerArto Bendiken2007-09-30 19:10:01 (GMT)
commit9d9a8a9b349943cf4861eb20b25d12ef9aaf47d4 (patch)
tree2bcd2980cb4bce8e929c484ed3b2df357c9f7add
parent8a727dd31c551460b1f8aef70fd51d95291bf3c7 (diff)
Imported latest 5.x version from SVN development repository.
Changelog: - #178915 Always add a query string in hook_exit() if there are session messages to be shown (kudos to Barry Jaspan). - Added Barry Jaspan to the credits in README.txt.
-rw-r--r--README.txt3
-rw-r--r--boost.module14
2 files changed, 9 insertions, 8 deletions
diff --git a/README.txt b/README.txt
index a26da48..df4e5ee 100644
--- a/README.txt
+++ b/README.txt
@@ -146,4 +146,5 @@ CREDITS
-------
Developed and maintained by Arto Bendiken <http://bendiken.net/>
Ported to Drupal 5.x by Alexander I. Grafov <http://drupal.ru/>
-Miscellaneous contributions by: Jacob Peddicord, Justin Miller.
+Miscellaneous contributions by: Jacob Peddicord, Justin Miller, Barry
+Jaspan.
diff --git a/boost.module b/boost.module
index e343607..96057b5 100644
--- a/boost.module
+++ b/boost.module
@@ -158,16 +158,16 @@ function boost_exit($destination = NULL) {
global $user;
if (empty($user->uid) && ($messages = drupal_set_message())) {
- // Check that the page we're redirecting to has been cached by Boost
- // and really necessitates special handling:
+ // Check that the page we're redirecting to really necessitates
+ // special handling, i.e. it doesn't have a query string:
extract(parse_url($destination));
$path = ($path == base_path() ? '' : substr($path, strlen(base_path())));
- if (boost_is_cached($path) && empty($query)) {
- // FIXME: call any remaining exit hooks since we're about to terminate.
+ if (empty($query)) {
+ // FIXME: call any remaining exit hooks since we're about to terminate?
- // Add a query string to ensure we don't serve a static copy of
- // the page we're redirecting to, which would prevent the session
- // messages from showing up:
+ // If no query string was previously set, add one just to ensure we
+ // don't serve a static copy of the page we're redirecting to, which
+ // would prevent the session messages from showing up:
$destination = url($path, 't=' . time(), $fragment, TRUE);
// Do what drupal_goto() would do if we were to return to it: