Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.554
diff -u -p -r1.554 theme.inc
--- includes/theme.inc 26 Nov 2009 18:57:16 -0000 1.554
+++ includes/theme.inc 30 Nov 2009 16:59:57 -0000
@@ -2171,6 +2171,10 @@ function template_preprocess(&$variables
$variables['title_attributes_array'] = array();
$variables['content_attributes_array'] = array();
+ // Initialize 'prefix' and 'suffix' renderable arrays.
+ $variables['prefix'] = array();
+ $variables['suffix'] = array();
+
// Set default variables that depend on the database.
$variables['is_admin'] = FALSE;
$variables['is_front'] = FALSE;
Index: modules/block/block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.tpl.php,v
retrieving revision 1.6
diff -u -p -r1.6 block.tpl.php
--- modules/block/block.tpl.php 19 Oct 2009 01:30:06 -0000 1.6
+++ modules/block/block.tpl.php 30 Nov 2009 17:05:10 -0000
@@ -11,7 +11,6 @@
* - $block->module: Module that generated the block.
* - $block->delta: An ID for the block, unique within each module.
* - $block->region: The block region embedding the current block.
- * - $contextual_links (array): An array of contextual links for the block.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
@@ -19,6 +18,10 @@
* - block-[module]: The module generating the block. For example, the user module
* is responsible for handling the default user navigation block. In that case
* the class would be "block-user".
+ * - $prefix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the beginning of the template.
+ * - $suffix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the end of the template.
*
* Helper variables:
* - $classes_array: Array of html class attribute values. It is flattened
@@ -37,11 +40,8 @@
*/
?>
>
-
-
-
-
-
+
+
subject): ?>
>subject ?>
@@ -49,4 +49,6 @@
>
+
+
Index: modules/comment/comment.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.tpl.php,v
retrieving revision 1.16
diff -u -p -r1.16 comment.tpl.php
--- modules/comment/comment.tpl.php 19 Oct 2009 20:33:21 -0000 1.16
+++ modules/comment/comment.tpl.php 30 Nov 2009 17:05:01 -0000
@@ -23,7 +23,6 @@
* - $status: Comment status. Possible values are:
* comment-unpublished, comment-published or comment-preview.
* - $title: Linked title.
- * - $contextual_links (array): An array of contextual links for the comment.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
@@ -35,6 +34,10 @@
* - comment-unpublished: An unpublished comment visible only to administrators.
* - comment-by-viewer: Comment by the user currently viewing the page.
* - comment-new: New comment since last the visit.
+ * - $prefix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the beginning of the template.
+ * - $suffix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the end of the template.
*
* These two variables are provided for context:
* - $comment: Full comment object.
@@ -51,9 +54,7 @@
*/
?>
>
-
-
-
+
@@ -84,4 +85,6 @@
+
+
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1170
diff -u -p -r1.1170 node.module
--- modules/node/node.module 29 Nov 2009 10:43:53 -0000 1.1170
+++ modules/node/node.module 30 Nov 2009 17:13:12 -0000
@@ -1169,7 +1169,9 @@ function node_build($node, $build_mode =
);
// Add contextual links for this node.
// @todo Make this configurable per build mode.
- $build['#contextual_links']['node'] = array('node', array($node->nid));
+ if ($build_mode == 'teaser') {
+ $build['#contextual_links']['node'] = array('node', array($node->nid));
+ }
// Allow modules to modify the structured node.
drupal_alter('node_build', $build);
Index: modules/node/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.tpl.php,v
retrieving revision 1.28
diff -u -p -r1.28 node.tpl.php
--- modules/node/node.tpl.php 19 Oct 2009 20:33:21 -0000 1.28
+++ modules/node/node.tpl.php 30 Nov 2009 17:05:58 -0000
@@ -18,7 +18,6 @@
* - $node_url: Direct url of the current node.
* - $terms: the themed list of taxonomy term links output from theme_links().
* - $display_submitted: whether submission information should be displayed.
- * - $contextual_links (array): An array of contextual links for the node.
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the following:
@@ -32,6 +31,10 @@
* - node-promoted: Nodes promoted to the front page.
* - node-sticky: Nodes ordered above other non-sticky nodes in teaser listings.
* - node-unpublished: Unpublished nodes visible only to administrators.
+ * - $prefix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the beginning of the template.
+ * - $suffix (array): An array containing additional output populated by modules,
+ * intended to be displayed at the end of the template.
*
* Other variables:
* - $node: Full node object. Contains data that may not be safe.
@@ -72,13 +75,10 @@
*/
?>
>
+
-
-
-
-
>
@@ -113,4 +113,5 @@
+
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.845
diff -u -p -r1.845 system.module
--- modules/system/system.module 28 Nov 2009 09:36:41 -0000 1.845
+++ modules/system/system.module 30 Nov 2009 17:12:41 -0000
@@ -3538,9 +3538,6 @@ function theme_system_settings_form($var
function system_preprocess(&$variables, $hook) {
static $hooks;
- // Initialize the $contextual_links template variable.
- $variables['contextual_links'] = array();
-
// Nothing to do here if the user is not permitted to access contextual links.
if (!user_access('access contextual links')) {
return;
@@ -3563,8 +3560,8 @@ function system_preprocess(&$variables,
}
if (isset($element) && is_array($element) && !empty($element['#contextual_links'])) {
- $variables['contextual_links'] = system_build_contextual_links($element);
- if (!empty($variables['contextual_links'])) {
+ $variables['prefix']['contextual_links'] = system_build_contextual_links($element);
+ if (!empty($variables['prefix']['contextual_links'])) {
$variables['classes_array'][] = 'contextual-links-region';
}
}
Index: themes/garland/block.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/block.tpl.php,v
retrieving revision 1.11
diff -u -p -r1.11 block.tpl.php
--- themes/garland/block.tpl.php 19 Oct 2009 01:30:07 -0000 1.11
+++ themes/garland/block.tpl.php 30 Nov 2009 17:07:09 -0000
@@ -2,14 +2,13 @@
// $Id: block.tpl.php,v 1.11 2009/10/19 01:30:07 dries Exp $
?>
>
-
-
-
-
+
subject)): ?>
>subject ?>
>
+
+
Index: themes/garland/comment.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/comment.tpl.php,v
retrieving revision 1.19
diff -u -p -r1.19 comment.tpl.php
--- themes/garland/comment.tpl.php 19 Oct 2009 01:30:07 -0000 1.19
+++ themes/garland/comment.tpl.php 30 Nov 2009 17:08:13 -0000
@@ -2,13 +2,9 @@
// $Id: comment.tpl.php,v 1.19 2009/10/19 01:30:07 dries Exp $
?>
>
-
+
-
-
-
-
—
@@ -31,4 +27,6 @@
+
+
Index: themes/garland/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/node.tpl.php,v
retrieving revision 1.19
diff -u -p -r1.19 node.tpl.php
--- themes/garland/node.tpl.php 19 Oct 2009 01:30:07 -0000 1.19
+++ themes/garland/node.tpl.php 30 Nov 2009 17:08:38 -0000
@@ -2,10 +2,7 @@
// $Id: node.tpl.php,v 1.19 2009/10/19 01:30:07 dries Exp $
?>
>
-
-
-
-
+
@@ -40,4 +37,5 @@
+