summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Lutfy2015-05-23 14:02:13 (GMT)
committerMathieu Lutfy2015-05-23 14:02:13 (GMT)
commitb864ee734e1bb53e953ea490aeea8dc82806949e (patch)
tree40499507eb040978c00fe8cb78317c0e25cd62c8
parent49e60efdef65865a0cfd198eb4268dabd76f4bef (diff)
Issue #2242801: Set forms as #immutable per Form API introduced in Drupal 6.31 (based on patch by znerol, David_Rothstein).
-rw-r--r--boost.module11
1 files changed, 11 insertions, 0 deletions
diff --git a/boost.module b/boost.module
index a6b3db2..ce80a72 100644
--- a/boost.module
+++ b/boost.module
@@ -261,6 +261,17 @@ function boost_init() {
}
/**
+ * Implements hook_form_alter().
+ */
+function boost_form_alter(&$form, &$form_state, $form_id) {
+ global $_boost;
+
+ if (! empty($_boost['cache_this'])) {
+ $form['#immutable'] = TRUE;
+ }
+}
+
+/**
* Implements hook_drupal_goto_alter().
*/
function boost_drupal_goto_alter(&$path, &$options, &$http_response_code) {