summaryrefslogtreecommitdiff
path: root/modules/diary.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-05-20 13:51:40 +0000
committerDries Buytaert <dries@buytaert.net>2001-05-20 13:51:40 +0000
commit20397ad3d9dad39670ed92923d2513bd89c7b0bb (patch)
tree1e16b41f8312007e0f0805c6db7c94813f5c05fb /modules/diary.module
parent3fbd49d786e57ebde5736793a5050cda8796205d (diff)
downloadbrdo-20397ad3d9dad39670ed92923d2513bd89c7b0bb.tar.gz
brdo-20397ad3d9dad39670ed92923d2513bd89c7b0bb.tar.bz2
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.
Diffstat (limited to 'modules/diary.module')
-rw-r--r--modules/diary.module18
1 files changed, 9 insertions, 9 deletions
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 .= "<FORM ACTION=\"module.php?mod=diary\" METHOD=\"post\">\n";
$output .= "<P>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\"></TEXTAREA><BR>\n";
- $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
+ $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".</I></SMALL>\n";
$output .= "</P>\n";
$output .= "<P>\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 .= "<FORM ACTION=\"module.php?mod=diary\" METHOD=\"post\">\n";
$output .= "<P>\n";
- $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\">". check_textarea($diary->text) ."</TEXTAREA><BR>\n";
- $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
+ $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\">". check_form($diary->text) ."</TEXTAREA><BR>\n";
+ $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".</I></SMALL>\n";
$output .= "</P>\n";
$output .= "<P>\n";
$output .= " <INPUT TYPE=\"hidden\" NAME=\"id\" VALUE=\"$diary->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 .= "<FORM ACTION=\"module.php?mod=diary\" METHOD=\"post\">\n";
$output .= "<P>\n";
- $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\">". check_textarea($text) ."</TEXTAREA><BR>\n";
- $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
+ $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"text\">". check_form($text) ."</TEXTAREA><BR>\n";
+ $output .= " <SMALL><I>". t("Allowed HTML tags") .": ". htmlspecialchars(variable_get("allowed_html", "")) .".</I></SMALL>\n";
$output .= "</P>\n";
$output .= "<P>\n";
$output .= " <INPUT TYPE=\"hidden\" NAME=\"id\" VALUE=\"$id\">\n";
@@ -239,7 +239,7 @@ function diary_admin_edit($id) {
$output .= "<P>\n";
$output .= "<B>Diary entry:</B><BR>\n";
- $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"text\">". check_textarea($diary->text) ."</TEXTAREA><BR>\n";
+ $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"text\">". check_form($diary->text) ."</TEXTAREA><BR>\n";
$output .= "</P>\n";
$output .= "<P>\n";