### Eclipse Workspace Patch 1.0
#P drupal_test_7
Index: modules/node/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.tpl.php,v
retrieving revision 1.11
diff -u -r1.11 node.tpl.php
--- modules/node/node.tpl.php 28 Apr 2009 19:56:00 -0000 1.11
+++ modules/node/node.tpl.php 12 May 2009 21:23:11 -0000
@@ -7,7 +7,7 @@
*
* Available variables:
* - $title: the (sanitized) title of the node.
- * - $content: Node body or teaser depending on $teaser flag.
+ * - $content: TODO.
* - $comments: the themed list of comments (if any).
* - $picture: The authors picture of the node output from
* theme_user_picture().
@@ -49,30 +49,30 @@
* @see template_preprocess_node()
*/
?>
-
+
\ No newline at end of file
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1046
diff -u -r1.1046 node.module
--- modules/node/node.module 12 May 2009 08:31:17 -0000 1.1046
+++ modules/node/node.module 12 May 2009 21:23:11 -0000
@@ -1047,7 +1047,7 @@
global $user;
if (!isset($node->is_new)) {
- $node->is_new = empty($node->nid);
+ $node->is_new = empty($node->nid);
}
// Apply filters to some default node fields:
@@ -1132,7 +1132,7 @@
// Update the node access table for this node.
node_access_acquire_grants($node);
-
+
// Clear internal properties.
unset($node->is_new);
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.484
diff -u -r1.484 theme.inc
--- includes/theme.inc 12 May 2009 13:43:44 -0000 1.484
+++ includes/theme.inc 12 May 2009 21:23:09 -0000
@@ -1308,7 +1308,7 @@
* within a table. For example, one may easily group three columns and
* apply same background style to all.
* @param $sticky
- * Use a "sticky" table header.
+ * Use a "sticky" table header.
* @return
* An HTML string representing the table.
*/
@@ -1962,11 +1962,20 @@
// Render any comments.
$variables['comments'] = !empty($node->content['comments']) ? drupal_render($node->content['comments']) : '';
- // Render the rest of the node into $content.
- $variables['content'] = drupal_render($node->content);
+ // TEST CODE, DO NOT COMMIT
+ $node->content['test'] = array(
+ '#markup' => 'foo',
+ '#weight' => 300,
+ );
+ $node->content['test2'] = array(
+ '#markup' => 'bar',
+ '#weight' => 301,
+ );
// Flatten the node object's member fields.
$variables = array_merge((array)$node, $variables);
+ // Provide the render array as an object.
+ $variables['content'] = new ArrayObject($node->content);
// Display post information only on certain node types.
if (variable_get('node_submitted_' . $node->type, TRUE)) {
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.898
diff -u -r1.898 common.inc
--- includes/common.inc 12 May 2009 08:37:44 -0000 1.898
+++ includes/common.inc 12 May 2009 21:23:09 -0000
@@ -1935,7 +1935,7 @@
/**
* Return the base URL path (i.e., directory) of the Drupal installation.
*
- * base_path() prefixes and suffixes a "/" onto the returned path if the path is
+ * base_path() prefixes and suffixes a "/" onto the returned path if the path is
* not empty. At the very least, this will return "/".
*
* Examples:
@@ -2289,7 +2289,7 @@
* @return
* Contents of the stylesheet including the imported stylesheets.
*/
-function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
+function drupal_load_stylesheet_content($contents, $optimize = FALSE) {
// Replaces @import commands with the actual stylesheet content.
// This happens recursively but omits external files.
$contents = preg_replace_callback('/@import\s*(?:url\()?[\'"]?(?![a-z]+:)([^\'"\()]+)[\'"]?\)?;/', '_drupal_load_stylesheet', $contents);
@@ -3425,6 +3425,26 @@
}
/**
+ * Unified printer function for templates.
+ *
+ * @param $a
+ * Element to print. Can be either a string, or a structured array tree.
+ */
+function p($a, $key = NULL) {
+ if (is_string($a)) {
+ $output = $a;
+ }
+ else {
+ $render = (array) $a;
+ $output = $key ? drupal_render_children($render, array($key)) : drupal_render($render);
+ if ($a instanceof ArrayObject) {
+ $a->exchangeArray($render);
+ }
+ }
+ print $output;
+}
+
+/**
* Function used by uasort to sort structured arrays by weight.
*/
function element_sort($a, $b) {
Index: themes/garland/node.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/node.tpl.php,v
retrieving revision 1.9
diff -u -r1.9 node.tpl.php
--- themes/garland/node.tpl.php 18 Feb 2009 14:28:25 -0000 1.9
+++ themes/garland/node.tpl.php 12 May 2009 21:23:11 -0000
@@ -1,34 +1,35 @@
-
+
+
-
-
-
-
-
+
+
+
-
+
-
+
+
+