From 20397ad3d9dad39670ed92923d2513bd89c7b0bb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 20 May 2001 13:51:40 +0000 Subject: CHANGES - Redid settings.module and even renamed it to conf.module. * Settings are now grouped in basic categories like "system settings", "module settings" and "filters". * Added new settings to make Drupal easier to configure and to make some aspects like the watchdog scale better. - Renamed includes/settings.php to includes/conf.php. - Added filter support to conf.module and introduced filter hooks so modules can implement and export new filters. Example filters are an HTML filter (implemented), a profanity filter, an url converter, ASCII smileys to images filter and so on ... - Reworked the check_* functions: user contributed content/input is only verified and filtered once in its lifespan. NOTES - Altough this is a large commit, no database changes are required. --- modules/story/story.module | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/story/story.module') diff --git a/modules/story/story.module b/modules/story/story.module index 7f0c1ba64..935f0ca93 100644 --- a/modules/story/story.module +++ b/modules/story/story.module @@ -35,14 +35,14 @@ function story_view($node, $main = 0) { } function story_form($edit = array()) { - global $allowed_html, $REQUEST_URI, $user; + global $REQUEST_URI, $user; $form .= form_item(t("Your name"), format_username(($edit[userid] ? $edit[userid] : $user->userid))); $form .= form_hidden("userid", $edit[userid]); $form .= form_textfield(t("Subject"), "title", $edit[title], 50, 64); $form .= structure_form("story", $edit); - $form .= form_textarea(t("Abstract"), "abstract", $edit[abstract], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html)); - $form .= form_textarea(t("Body"), "body", $edit[body], 50, 15, t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html)); + $form .= form_textarea(t("Abstract"), "abstract", $edit[abstract], 50, 10, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); + $form .= form_textarea(t("Body"), "body", $edit[body], 50, 15, t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", ""))); // hidden fields: if ($edit[nid] > 0) { @@ -148,7 +148,7 @@ function story_admin() { print search_data($keys, $mod); break; case t("Preview"): - story_view(new Story($edit)); + story_view(new Story(node_preview($edit))); print story_form($edit); break; case t("Submit"): @@ -165,7 +165,7 @@ function story_user() { switch($op) { case t("Preview"): - story_view(new Story($edit)); + story_view(new Story(node_preview($edit))); $theme->box(t("Submit"), story_form($edit)); break; case t("Submit"): -- cgit v1.2.3