From c05f2181dc8556cb6700e8c6bb6e6ded43273192 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 9 Oct 2009 01:00:08 +0000 Subject: - Patch #572618 by effulgentsia, pwolanin, sun: all theme functions should take a single argument. Code clean-up and performance improvement. Woot. --- modules/node/content_types.inc | 9 ++++++--- modules/node/node.admin.inc | 18 +++++++++++------- modules/node/node.module | 26 ++++++++++++++------------ modules/node/node.pages.inc | 26 ++++++++++++++++---------- 4 files changed, 47 insertions(+), 32 deletions(-) (limited to 'modules/node') diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index ccbd5fe07..4634d62e5 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -16,10 +16,10 @@ function node_overview_types() { $rows = array(); foreach ($names as $key => $name) { - $type = $types[$key]; + $type = $types[$key]; if (node_hook($type->type, 'form')) { $type_url_str = str_replace('_', '-', $type->type); - $row = array(theme('node_admin_overview', $name, $type)); + $row = array(theme('node_admin_overview', array('name' => $name, 'type' => $type))); // Set the edit column. $row[] = array('data' => l(t('edit'), 'admin/structure/types/manage/' . $type_url_str)); @@ -47,7 +47,10 @@ function node_overview_types() { return $build; } -function theme_node_admin_overview($name, $type) { +function theme_node_admin_overview($variables) { + $name = $variables['name']; + $type = $variables['type']; + $output = check_plain($name); $output .= ' (Machine name: ' . check_plain($type->type) . ')'; $output .= '
' . filter_xss_admin($type->description) . '
'; diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc index 618f0b25c..2fd2a54a5 100644 --- a/modules/node/node.admin.inc +++ b/modules/node/node.admin.inc @@ -192,8 +192,10 @@ function node_filter_form() { * * @ingroup themeable */ -function theme_node_filter_form($form) { +function theme_node_filter_form($variables) { + $form = $variables['form']; $output = ''; + $output .= '
'; $output .= drupal_render($form['filters']); $output .= '
'; @@ -206,8 +208,10 @@ function theme_node_filter_form($form) { * * @ingroup themeable */ -function theme_node_filters($form) { +function theme_node_filters($variables) { + $form = $variables['form']; $output = ''; + $output .= '