diff --git a/core/modules/forum/forum.admin.inc b/core/modules/forum/forum.admin.inc index 8ae054d..7c52780 100644 --- a/core/modules/forum/forum.admin.inc +++ b/core/modules/forum/forum.admin.inc @@ -136,11 +136,11 @@ function forum_form_submit($form, &$form_state) { * - form: A render element representing the form. */ function template_preprocess_forum_form(&$variables) { - foreach ($variables['form'] as $key => $value) { - // Prevent recursion loop by removing '#theme' and '#theme_wrappers' keys. - // See http://drupal.org/node/1920886. - if ($key == '#theme' || $key == '#theme_wrappers') { - unset($variables['form'][$key]); + // Prevent recursion loop by removing '#theme' and '#theme_wrappers' keys. + // See http://drupal.org/node/1920886. + foreach (array('#theme', '#theme_wrappers') as $theme_key) { + if (isset($variables['form'][$theme_key])) { + unset($variables['form'][$theme_key]); } } } diff --git a/core/modules/forum/templates/forum-list.html.twig b/core/modules/forum/templates/forum-list.html.twig index 6de5c11..6e5f6da 100644 --- a/core/modules/forum/templates/forum-list.html.twig +++ b/core/modules/forum/templates/forum-list.html.twig @@ -7,21 +7,21 @@ * - forums: A list of forums and containers to display. It is keyed to the * numeric IDs of all child forums and containers. Each forum in forums * contains: - * - forum.is_container: A flag indicating if the forum can contain other + * - is_container: A flag indicating if the forum can contain other * forums. Otherwise, the forum can only contain topics. - * - forum.depth: How deep the forum is in the current hierarchy. - * - forum.zebra: 'even' or 'odd', used for row class. - * - forum.icon_class: 'default' or 'new', used for forum icon class. - * - forum.icon_title: Text alternative for the forum icon. - * - forum.name: The name of the forum. - * - forum.link: The URL to link to this forum. - * - forum.description: The description of this forum. - * - forum.new_topics: A flag indicating if the forum contains unread posts. - * - forum.new_url: A URL to the forum's unread posts. - * - forum.new_text: Text for the above URL, which tells how many new posts. - * - forum.old_topics: A count of posts that have already been read. - * - forum.num_posts: The total number of posts in the forum. - * - forum.last_reply: Text representing the last time a forum was posted or + * - depth: How deep the forum is in the current hierarchy. + * - zebra: 'even' or 'odd', used for row class. + * - icon_class: 'default' or 'new', used for forum icon class. + * - icon_title: Text alternative for the forum icon. + * - name: The name of the forum. + * - link: The URL to link to this forum. + * - description: The description of this forum. + * - new_topics: A flag indicating if the forum contains unread posts. + * - new_url: A URL to the forum's unread posts. + * - new_text: Text for the above URL, which tells how many new posts. + * - old_topics: A count of posts that have already been read. + * - num_posts: The total number of posts in the forum. + * - last_reply: Text representing the last time a forum was posted or * commented in. * - forum_id: Forum ID for the current forum. Parent to all items within the * forums array. diff --git a/core/modules/forum/templates/forum-topic-list.html.twig b/core/modules/forum/templates/forum-topic-list.html.twig index dc2c4ed..59ac9fe 100644 --- a/core/modules/forum/templates/forum-topic-list.html.twig +++ b/core/modules/forum/templates/forum-topic-list.html.twig @@ -9,23 +9,20 @@ * template_preprocess_forum_topic_list(). * - pager: The pager to display beneath the table. * - topics: A list of topics to be displayed. Each topic in topics contains: - * - topic.icon: The icon to display. - * - topic.moved: A flag to indicate whether the topic has been moved to - * another forum. - * - topic.title: The title of the topic. Safe to output. - * - topic.message: If the topic has been moved, this contains an - * explanation and a link. - * - topic.zebra: 'even' or 'odd', used for row class. - * - topic.comment_count: The number of replies on this topic. - * - topic.new_replies: A flag to indicate whether there are unread - * comments. - * - topic.new_url: If there are unread replies, this is a link to them. - * - topic.new_text: Text containing the translated, properly pluralized - * count. - * - topic.created: Text representing when the topic was posted. Safe to - * output. - * - topic.last_reply: Text representing when the topic was last replied to. - * - topic.timestamp: The raw timestamp this topic was posted. + * - icon: The icon to display. + * - moved: A flag to indicate whether the topic has been moved to another + * forum. + * - title: The title of the topic. Safe to output. + * - message: If the topic has been moved, this contains an explanation and a + * link. + * - zebra: 'even' or 'odd', used for row class. + * - comment_count: The number of replies on this topic. + * - new_replies: A flag to indicate whether there are unread comments. + * - new_url: If there are unread replies, this is a link to them. + * - new_text: Text containing the translated, properly pluralized count. + * - created: Text representing when the topic was posted. Safe to output. + * - last_reply: Text representing when the topic was last replied to. + * - timestamp: The raw timestamp this topic was posted. * - topic_id: Numeric ID for the current forum topic. * * @see template_preprocess()