### 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 15 May 2009 22:19:34 -0000 @@ -8,6 +8,7 @@ * Available variables: * - $title: the (sanitized) title of the node. * - $content: Node body or teaser depending on $teaser flag. + * TODO more accurate descitption + document the r() bit. * - $comments: the themed list of comments (if any). * - $picture: The authors picture of the node output from * theme_user_picture(). @@ -68,7 +69,7 @@
- +
Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.35 diff -u -r1.35 user.pages.inc --- modules/user/user.pages.inc 6 May 2009 11:31:44 -0000 1.35 +++ modules/user/user.pages.inc 15 May 2009 22:19:34 -0000 @@ -161,7 +161,7 @@ * Contains the default "History" profile data for a user. * - $page['content']['#account']: * The user account of the profile being viewed. - * + * * To theme user profiles, copy modules/user/user-profile.tpl.php * to your theme directory, and edit it as instructed in that file's comments. */ @@ -169,7 +169,7 @@ drupal_set_title($account->name); // Retrieve all profile fields and attach to $account->content. user_build_content($account); - + $build = $account->content; $build += array( '#theme' => 'user_profile', @@ -189,16 +189,7 @@ */ function template_preprocess_user_profile(&$variables) { $account = $variables['elements']['#account']; - - $variables['profile'] = array(); - // Sort sections by weight - uasort($account->content, 'element_sort'); - // Provide keyed variables so themers can print each section independently. - foreach (element_children($account->content) as $key) { - $variables['profile'][$key] = drupal_render($account->content[$key]); - } - // Collect all profiles to make it easier to print all items at once. - $variables['user_profile'] = implode($variables['profile']); + $variables['user_profile'] = $account->content; // Add $FIELD_NAME_rendered variables for fields. $variables += field_attach_preprocess('user', $account); Index: modules/user/user-profile.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user-profile.tpl.php,v retrieving revision 1.6 diff -u -r1.6 user-profile.tpl.php --- modules/user/user-profile.tpl.php 5 Feb 2009 03:42:58 -0000 1.6 +++ modules/user/user-profile.tpl.php 15 May 2009 22:19:34 -0000 @@ -37,13 +37,12 @@ * * Available variables: * - $user_profile: All user profile data. Ready for print. - * - $profile: Keyed array of profile categories and their items or other data - * provided by modules. + * TODO: more accurate description + document the r() bit. * - TODO D7 : document $FIELD_NAME_rendered variables. * * @see template_preprocess_user_profile() */ ?>
- +
Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.485 diff -u -r1.485 theme.inc --- includes/theme.inc 14 May 2009 08:23:14 -0000 1.485 +++ includes/theme.inc 15 May 2009 22:19:34 -0000 @@ -1288,7 +1288,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. */ @@ -1942,9 +1942,6 @@ // 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); - // Flatten the node object's member fields. $variables = array_merge((array)$node, $variables); Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.900 diff -u -r1.900 common.inc --- includes/common.inc 14 May 2009 08:23:14 -0000 1.900 +++ includes/common.inc 15 May 2009 22:19:33 -0000 @@ -384,7 +384,7 @@ */ function drupal_access_denied() { drupal_set_header('403 Forbidden'); - + watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING); $path = drupal_get_normal_path(variable_get('site_403', '')); @@ -1926,7 +1926,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: @@ -2280,7 +2280,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); @@ -3416,6 +3416,13 @@ } /** + * Shortcut for drupal_render(), to be used in templates. + */ +function r(&$element) { + return drupal_render($element); +} + +/** * 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 15 May 2009 22:19:34 -0000 @@ -14,7 +14,7 @@
- +