diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-13 14:02:44 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2003-03-13 14:02:44 +0000 |
commit | 9a57a20732303b306c3f48bdc4b3b37636e1557d (patch) | |
tree | 277adc97e54a0c83198505775c96c7f80544cd52 /modules/blog.module | |
parent | 4ad174c4115f4e5aec54310c815c7a8019fab640 (diff) | |
download | brdo-9a57a20732303b306c3f48bdc4b3b37636e1557d.tar.gz brdo-9a57a20732303b306c3f48bdc4b3b37636e1557d.tar.bz2 |
- Fixes invalid link generation in import module (wouldn't work with
clean urls enabled).
- Changed the logic in blog module to handle "blog it" links.
Diffstat (limited to 'modules/blog.module')
-rw-r--r-- | modules/blog.module | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/modules/blog.module b/modules/blog.module index 17d5c89e3..8646ea3f3 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -134,17 +134,7 @@ function blog_page_last() { function blog_form(&$node, &$help, &$error) { global $nid, $iid; - - if (isset($node->body)) { - /* - ** Validate the size of the blog: - */ - - if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { - $error["body"] = theme("theme_error", t("The body of your blog is too short.")); - } - } - else { + if (empty($node->body)) { /* ** Carry out some explanation or submission guidelines: @@ -166,6 +156,15 @@ function blog_form(&$node, &$help, &$error) { $node->body = "<a href=\"$item->link\">$item->title</a> - <i>". check_output($item->description) ."</i> [<a href=\"$item->flink\">$item->ftitle</a>]\n"; } } + else { + /* + ** Validate the size of the blog: + */ + + if (count(explode(" ", $node->body)) < variable_get("minimum_blog_size", 0)) { + $error["body"] = theme("theme_error", t("The body of your blog is too short.")); + } + } if (function_exists("taxonomy_node_form")) { $output .= implode("", taxonomy_node_form("blog", $node)); @@ -177,7 +176,6 @@ function blog_form(&$node, &$help, &$error) { function blog_page() { - if (user_access("access content")) { switch (arg(1)) { case "feed": |