summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module17
1 files changed, 12 insertions, 5 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index ef26aedb9..eda827042 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -65,7 +65,7 @@ function node_system($field){
$output = "";
if ($field == "description") {$output = node_help("admin/system/modules"); }
- else if ($field == "admin-help") {$output = node_help("admin/system/modules/node");};
+ else if ($field == "admin_help") {$output = node_help("admin/system/modules/node");};
return $output;
}
@@ -372,7 +372,7 @@ function node_save($node) {
}
-function node_view($node, $main = 0) {
+function node_view($node, $main = 0, $return = 0) {
$node = array2object($node);
@@ -389,7 +389,7 @@ function node_view($node, $main = 0) {
*/
if (module_hook($node->type, "view")) {
- node_invoke($node, "view", $main);
+ $node = node_invoke($node, "view", $main, $return);
}
else {
@@ -399,9 +399,17 @@ function node_view($node, $main = 0) {
$node->teaser = check_output($node->teaser);
$node->body = check_output($node->body);
+ }
+ if (!$return) {
+ if ($node->trail) {
+ theme("breadcrumb", $node->trail);
+ }
theme("node", $node, $main);
}
+ else {
+ return $node;
+ }
}
function node_show($node, $cid) {
@@ -540,8 +548,7 @@ function node_link($type, $node = 0, $main = 0) {
if ($main == 1 && $node->teaser && strlen($node->teaser) != strlen($node->body))
{
- $links[] = l(t("read more"), "node/view/$node->nid", array("title" => t("Read
-the rest of this posting."), "class" => "read-more"));
+ $links[] = l(t("read more"), "node/view/$node->nid", array("title" => t("Read the rest of this posting."), "class" => "read-more"));
}
if (user_access("administer nodes")) {