summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-06-17 02:06:22 +0200
committerAlex Pott2013-06-17 02:06:22 +0200
commit33b0337439458e0d65e8a076eab6bfb12e6eb555 (patch)
tree945ca37f48aa188ca6d9d3e26504813c128dc1c3
parent5d83ca57c1812f6e417cef676618bd5981fc46ca (diff)
Issue #2009666 by aaronott, jiff, jeroen12345: Replace theme() with drupal_render() in search module.
-rw-r--r--core/modules/search/search.api.php11
-rw-r--r--core/modules/search/tests/modules/search_extra_type/search_extra_type.module5
2 files changed, 13 insertions, 3 deletions
diff --git a/core/modules/search/search.api.php b/core/modules/search/search.api.php
index 49841ff..028b803 100644
--- a/core/modules/search/search.api.php
+++ b/core/modules/search/search.api.php
@@ -217,11 +217,15 @@ function hook_search_execute($keys = NULL, $conditions = NULL) {
$language = language_load($item->langcode);
$uri = $node->uri();
+ $username = array(
+ '#theme' => 'username',
+ '#account' => $node,
+ );
$results[] = array(
'link' => url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE, 'language' => $language))),
'type' => check_plain(node_get_type_label($node)),
'title' => $node->label($item->langcode),
- 'user' => theme('username', array('account' => $node)),
+ 'user' => drupal_render($username),
'date' => $node->changed,
'node' => $node,
'extra' => $extra,
@@ -264,7 +268,10 @@ function hook_search_page($results) {
'#module' => 'my_module_name',
);
}
- $output['suffix']['#markup'] = '</ol>' . theme('pager');
+ $pager = array(
+ '#theme' => 'pager',
+ );
+ $output['suffix']['#markup'] = '</ol>' . drupal_render($pager);
return $output;
}
diff --git a/core/modules/search/tests/modules/search_extra_type/search_extra_type.module b/core/modules/search/tests/modules/search_extra_type/search_extra_type.module
index 1a31d26..4435b44 100644
--- a/core/modules/search/tests/modules/search_extra_type/search_extra_type.module
+++ b/core/modules/search/tests/modules/search_extra_type/search_extra_type.module
@@ -65,7 +65,10 @@ function search_extra_type_search_page($results) {
'#module' => 'search_extra_type',
);
}
- $output['suffix']['#markup'] = '</ol>' . theme('pager');
+ $pager = array(
+ '#theme' => 'pager',
+ );
+ $output['suffix']['#markup'] = '</ol>' . drupal_render($pager);
return $output;
}