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/diary.module | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/diary.module') diff --git a/modules/diary.module b/modules/diary.module index d003c7cc1..9cfb21c47 100644 --- a/modules/diary.module +++ b/modules/diary.module @@ -72,13 +72,13 @@ function diary_page_display($username) { } function diary_page_add() { - global $theme, $user, $allowed_html; + global $theme, $user; $output .= "
\n"; $output .= "

\n"; $output .= "
\n"; - $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".\n"; + $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".\n"; $output .= "

\n"; $output .= "

\n"; @@ -98,7 +98,7 @@ function diary_page_delete($id) { } function diary_page_edit($id) { - global $theme, $user, $allowed_html; + global $theme, $user; $result = db_query("SELECT * FROM diaries WHERE id = '$id'"); $diary = db_fetch_object($result); @@ -107,8 +107,8 @@ function diary_page_edit($id) { $output .= "\n"; $output .= "

\n"; - $output .= "
\n"; - $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".\n"; + $output .= "
\n"; + $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".\n"; $output .= "

\n"; $output .= "

\n"; $output .= " id\">\n"; @@ -123,14 +123,14 @@ function diary_page_edit($id) { } function diary_page_preview($text, $timestamp, $id = 0) { - global $theme, $user, $allowed_html; + global $theme, $user; $output .= diary_page_entry($timestamp, $text); $output .= "\n"; $output .= "

\n"; - $output .= "
\n"; - $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".\n"; + $output .= "
\n"; + $output .= " ". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".\n"; $output .= "

\n"; $output .= "

\n"; $output .= " \n"; @@ -239,7 +239,7 @@ function diary_admin_edit($id) { $output .= "

\n"; $output .= "Diary entry:
\n"; - $output .= "
\n"; + $output .= "
\n"; $output .= "

\n"; $output .= "

\n"; -- cgit v1.2.3