Commit 01d17d4a authored by Dries's avatar Dries

- Patch #4093: only invoke check_output() once for performance's sake.  Patch
  by Goba.
parent bb1860a5
......@@ -411,8 +411,14 @@ function node_view($node, $main = 0, $page = 0) {
** Default behavior:
*/
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
if ($node->teaser == $node->body) {
// Only invoke check_output() once for performance's sake:
$node->teaser = $node->body = check_output($node->teaser);
}
else {
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
}
return theme("node", $node, $main, $page);
}
......
......@@ -411,8 +411,14 @@ function node_view($node, $main = 0, $page = 0) {
** Default behavior:
*/
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
if ($node->teaser == $node->body) {
// Only invoke check_output() once for performance's sake:
$node->teaser = $node->body = check_output($node->teaser);
}
else {
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
}
return theme("node", $node, $main, $page);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment