summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-14 18:44:59 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-14 18:44:59 +0000
commit70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4 (patch)
treeeea2800600238d557c4d99f22764b20d88929183 /modules/node.module
parent2116f7a017e1dc6484b235045b2e4a6c9a6ea5c5 (diff)
downloadbrdo-70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4.tar.gz
brdo-70f5b8649bbd6c7d115fbbf9c1976d9f82b4e8d4.tar.bz2
A batch of changes:
- Renamed '---' to '<!--break-->'. - Removed hard-coded call to the statistics module from the node module. Patch by Gerhard. - Removed tables from poll module. Modified patch by Al. Changes to Al's patch are: "polltext" -> "poll-text" "pollfg" -> "poll-foreground" "pollbg" -> "poll-background" - Changed some 'statistics.foo's to 's.foo's. Patch by Gary. [If this closes any bug reports, please update them on drupal.org.]
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module16
1 files changed, 5 insertions, 11 deletions
diff --git a/modules/node.module b/modules/node.module
index a0950a0bc..84588cdf9 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -75,7 +75,7 @@ function node_is_new($nid, $timestamp) {
global $user;
static $cache;
- if (!$cache[$nid]) {
+ if (!isset($cache[$nid])) {
if ($user->uid) {
$history = db_fetch_object(db_query("SELECT timestamp FROM history WHERE uid = '%d' AND nid = '%d'", $user->uid, $nid));
$cache[$nid] = $history->timestamp ? $history->timestamp : 0;
@@ -120,7 +120,7 @@ function node_teaser($body) {
** the allowed range but no more than a factor two.
*/
- $delimiter = strpos($body, "---");
+ $delimiter = strpos($body, "<!--break-->");
if ($delimiter > 0 && $delimiter < $size * 2) {
return substr($body, 0, $delimiter);
}
@@ -332,10 +332,10 @@ function node_view($node, $main = 0) {
/*
** Remove the delimiter (if any) that seperates the teaser from the
- ** body. TODO: this strips legitimate uses of --- also.
+ ** body. TODO: this strips legitimate uses of '<!--break-->' also.
*/
- $node->body = str_replace("---", "", $node->body);
+ $node->body = str_replace("<!--break-->", "", $node->body);
/*
** The "view" hook can be implemented to overwrite the default function
@@ -1203,7 +1203,7 @@ function node_preview($node, $error = NULL) {
if ($view->teaser && $view->teaser != $view->body) {
print "<h3>". t("Preview trimmed version") ."</h3>";
node_view($view, 1);
- print "<p><i>". t("The trimmed version of your post shows how your post looks like when promoted to the main page or when exported for syndication. You can insert a delimiter '---' (without the quotes) to fine-tune where your post gets split. However note that delimiter will be ignored when misplaced.") ."</i></p>";
+ print "<p><i>". t("The trimmed version of your post shows how your post looks like when promoted to the main page or when exported for syndication. You can insert a delimiter '&lt;!--break--&gt' (without the quotes) to fine-tune where your post gets split. However note that delimiter will be ignored when misplaced.") ."</i></p>";
print "<h3>". t("Preview full version") ."</h3>";
node_view($view, 0);
}
@@ -1339,12 +1339,6 @@ function node_delete($edit) {
module_invoke("taxonomy", "node_delete", $node->nid);
/*
- ** Delete related node statistics
- */
-
- module_invoke("statistics", "node_delete", $node->nid);
-
- /*
** Call the node specific callback (if any):
*/