diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-12-06 11:48:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-12-06 11:48:09 +0000 |
commit | b1be2a1fb4be20ac308564aa6df4ad2154efd114 (patch) | |
tree | 94083647f51d73cac3024c88678b1e9bf384b74d /modules/node.module | |
parent | 4205799ba3a41435aa7d8fed190f03592722eb8f (diff) | |
download | brdo-b1be2a1fb4be20ac308564aa6df4ad2154efd114.tar.gz brdo-b1be2a1fb4be20ac308564aa6df4ad2154efd114.tar.bz2 |
- Fixed a small glitch in node_preview() which made adding PHP pages rather
annoying.
Diffstat (limited to 'modules/node.module')
-rw-r--r-- | modules/node.module | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/modules/node.module b/modules/node.module index 012211b83..f6a550862 100644 --- a/modules/node.module +++ b/modules/node.module @@ -61,7 +61,6 @@ function node_search($keys) { function node_conf_options() { $output .= form_select(t("Default number of nodes to display"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of nodes to display on the main page.")); - $output .= form_select(t("Minimum number of words in teaser"), "minimum_teaser_size", variable_get("minimum_teaser_size", 0), array(0 => "0 words", 10 => "10 words", 25 => "25 words", 50 => "50 words", 75 => "75 words", 100 => "100 words", 125 => "125 words", 150 => "150 words", 175 => "175 words", 200 => "200 words"), t("The minimum number of words a teaser should consist of. This can be useful to rule out submissions that do not meet the site's standards, such as short test post.")); return $output; } @@ -519,14 +518,6 @@ function node_validate($node, &$error) { $error["date"] = "<div style=\"color: red;\">". t("You have to specifiy a valid date.") ."</div>"; } - /* - ** Validate the "teaser"-field: - */ - - if ($node->teaser && count(explode(" ", $node->teaser)) < variable_get("minimum_teaser_size", 0)) { - $error["teaser"] = "<div style=\"color: red;\">". t("Your teaser is too short.") ."</div>"; - } - } return $node; @@ -652,7 +643,7 @@ function node_add($type) { global $user; /* - ** If a node type has been specified, validate it existence. If no + ** If a node type has been specified, validate it existence. If no ** (valid) node type has been provied, display a node type overview. */ @@ -732,7 +723,11 @@ function node_preview($edit) { */ foreach ($edit as $key => $value) { - $node->$key = check_input($value); + $node->$key = check_output($value); + /* + ** NOTE: we can't do a check_query() or check_input() here as they + ** add slashes which results in breakage. + */ } /* |