From de95001c9291d6f2e66374975b793f84dc155aca Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 31 Dec 2002 12:34:07 +0000 Subject: - Tidied up the use of check_output(). Might make rendering pages a bit snappier (performance improvement). --- modules/book.module | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'modules/book.module') diff --git a/modules/book.module b/modules/book.module index 4387490f1..d79adb810 100644 --- a/modules/book.module +++ b/modules/book.module @@ -123,7 +123,7 @@ function book_link($type, $node = 0, $main = 0) { $result = db_query("SELECT n.nid, n.title FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 ORDER BY b.weight, n.title"); while ($book = db_fetch_object($result)) { - menu_add("administer book '". check_output($book->title) ."'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books"); + menu_add("administer book '$book->title'", "admin.php?mod=book&op=view&id=$book->nid", "Display a book outline.", NULL, "collaborative books"); } } @@ -360,7 +360,7 @@ function book_body($node) { ob_end_clean(); } else { - $output = check_output(filter($node->body), 1); + $output = check_output(filter($node->body)); } return $output; @@ -419,7 +419,7 @@ function book_view($node, $main = 0) { $output .= " $location"; $output .= "
"; - $output .= " ". check_output($node->title) ."". ($node->body ? "
". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ." " : "") .""; + $output .= " $node->title". ($node->body ? "
". t("Last updated by %u on %d", array("%u" => format_name($node), "%d" => format_date($node->created))) ." " : "") .""; } if ($node->body) { @@ -436,7 +436,7 @@ function book_view($node, $main = 0) { $output .= "
"; $output .= " ". ($prev ? l(t("previous"), array("id" => $prev->nid), "node", "", array("title" => t("View the previous page in this book."))) : t("previous")) ."". lm(t("index"), array("mod" => "book"), "", array("title" => t("View this book's table of contents."))) ."". ($next ? l(t("next"), array("id" => $next->nid), "node", "", array("title" => t("View the next page in this book."))) : t("next")) .""; - $output .= " ". ($prev ? "". check_output($prev->title) ."" : " ") ."". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."". ($next ? "". check_output($next->title) ."" : " ") .""; + $output .= " ". ($prev ? "$prev->title" : " ") ."". ($node->parent ? l(t("up"), array("id" => $node->parent), "node", "", array("title" => t("View this page's parent section."))) : t("up")) ."". ($next ? "$next->title" : " ") .""; $output .= "
"; $output .= "
". $theme->links(link_node($node, $main)) ."
"; $output .= ""; @@ -491,7 +491,7 @@ function book_tree_recurse($nid, $depth, $children) { if ($depth > 0) { if ($children[$nid]) { foreach ($children[$nid] as $foo => $node) { - $output .= "
  • ". l(check_output($node->title), array("id" => $node->nid)) ."
  • "; + $output .= "
  • ". l($node->title, array("id" => $node->nid)) ."
  • "; if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) { $output .= ""; @@ -537,7 +537,7 @@ function book_render() { if ($node) { // output the content: - $output .= "
    ". l(check_output($node->title), array("id" => $node->nid)) ."
    ". book_body($node) ."

    "; + $output .= "
    ". l($node->title, array("id" => $node->nid)) ."
    ". book_body($node) ."

    "; } } @@ -579,7 +579,7 @@ function book_print($id = "", $depth = 1) { if ($node) { // output the content: - $output .= "". check_output($node->title) .""; + $output .= "$node->title"; if ($node->body) { $output .= ""; @@ -606,7 +606,7 @@ function book_print_recurse($parent = "", $depth = 1) { if ($node) { // output the content: - $output .= "". check_output($node->title) .""; + $output .= "$node->title"; if ($node->body) { $output .= ""; @@ -652,7 +652,7 @@ function book_admin_view($nid, $depth = 0) { $node = node_load(array("nid" => $nid)); - $output .= "

    ". check_output($node->title) ."

    "; + $output .= "

    $node->title

    "; $output .= ""; $output .= " "; $output .= book_admin_view_line($node); @@ -707,7 +707,7 @@ function book_admin_orphan() { $output .= " "; foreach ($pages as $nid => $node) { if ($node->parent && empty($pages[$node->parent])) { - $output .= ""; + $output .= ""; } } $output .= "
    titleweightoperations
    titleoperations
    ". l(check_output($node->title), array("id" => $node->nid)) ."". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."
    ". l($node->title, array("id" => $node->nid)) ."". la(t("edit page"), array("mod" => "node", "op" => "edit", "id" => $node->nid)) ."". la(t("delete page"), array("mod" => "node", "op" => "delete", "id" => $node->nid)) ."
    "; -- cgit v1.2.3