From 81c71bc89142f93addc32c0e8d7f8b906d94d4b4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 24 Jun 2008 17:01:33 +0000 Subject: [PATCH] - Patch #216515 by chx, Damien Tournoud, et al: fixed form API glitch with caching. --- includes/form.inc | 1 + includes/menu.inc | 2 +- modules/comment/comment.pages.inc | 2 +- modules/comment/comment.test | 2 +- profiles/default/default.profile | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/form.inc b/includes/form.inc index 94aa380b16ea..b2472c68edf1 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -852,6 +852,7 @@ function form_builder($form_id, $form, &$form_state) { } if (isset($form['#type']) && $form['#type'] == 'form') { + $cache = NULL; $complete_form = $form; if (!empty($form['#programmed'])) { $form_state['submitted'] = TRUE; diff --git a/includes/menu.inc b/includes/menu.inc index 2444d122e5dd..9619b3ea12ed 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -622,7 +622,7 @@ function _menu_translate(&$router_item, $map, $to_arg = FALSE) { $router_item['href'] = implode('/', $link_map); $router_item['options'] = array(); _menu_check_access($router_item, $map); - + // For performance, don't localize an item the user can't access. if ($router_item['access']) { _menu_item_localize($router_item, $map); diff --git a/modules/comment/comment.pages.inc b/modules/comment/comment.pages.inc index 8e49444025c4..789ffde7f27f 100644 --- a/modules/comment/comment.pages.inc +++ b/modules/comment/comment.pages.inc @@ -56,7 +56,7 @@ function comment_reply($node, $pid = NULL) { if (user_access('access comments')) { // The user is previewing a comment prior to submitting it. - if ($op == t('Preview comment')) { + if ($op == t('Preview')) { if (user_access('post comments')) { $output .= comment_form_box(array('pid' => $pid, 'nid' => $node->nid), NULL); } diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 8b17b3b87100..96a285040fa1 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -68,7 +68,7 @@ class CommentTestCase extends DrupalWebTestCase { $this->drupalGet('comment/edit/' . $reply->id); $reply = $this->postComment(NULL, $this->randomName(), $this->randomName()); $this->assertTrue($this->commentExists($reply, TRUE), t('Modified reply found.')); - + // Correct link count $this->drupalGet('node'); $this->assertRaw('2 comments', t('Link to the 2 comments exist.')); diff --git a/profiles/default/default.profile b/profiles/default/default.profile index 66c88ed7fdd8..706061e1a5d0 100644 --- a/profiles/default/default.profile +++ b/profiles/default/default.profile @@ -133,7 +133,7 @@ function default_profile_tasks(&$task, $url) { $theme_settings['toggle_node_info_page'] = FALSE; variable_set('theme_settings', $theme_settings); - // Create a default tags vocabulary for articles. + // Create a default tags vocabulary for articles. $description = st('Tags are used to group your articles into different categories.'); $help = st('Enter a comma separated list of words.'); db_query("INSERT INTO {vocabulary} VALUES (1, 'Tags', '%s', '%s', 0, 0, 0, 0, 1, 'taxonomy', 0);", $description, $help); -- GitLab