From 11ee95dadc408e16e9832af9fd0b41495e78b0a6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 19 Oct 2000 13:31:23 +0000 Subject: A big, fat commit with a shitload of internal changes. Not that much visual changes: - removed redundant files user.class.php, calendar.class.php and backend.class.php. - converted *all* mysql queries to queries supported by the database abstraction layer. - expanded the watchdog to record more information on what actually happened. - bugfix: anonymous readers where not able to view comments. - bugfix: anonymous readers could gain read-only access to the submission queue. - bugfix: invalid includes in backend.php - bugfix: invalid use of '$user->block' and last but not least: - redid 50% of the user account system --- includes/template.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/template.inc') diff --git a/includes/template.inc b/includes/template.inc index 8e86620a0..5cb6c84d1 100644 --- a/includes/template.inc +++ b/includes/template.inc @@ -43,7 +43,7 @@ function display_related_links($theme, $story) { function display_old_headlines($theme, $num = 10) { global $user; - if ($user->storynum) $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $user->storynum, $num"); + if ($user->stories) $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $user->stories, $num"); else $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $num, $num"); while ($story = db_fetch_object($result)) { @@ -51,7 +51,7 @@ function display_old_headlines($theme, $num = 10) { $content .= "

". date("l, M jS", $story->timestamp) ."

\n"; $time = date("F jS", $story->timestamp); } - $content .= "
  • ". format_story_link($story) ."
  • \n"; + $content .= "
  • id\">$story->subject
  • \n"; } $content .= "

    [ hlcolor2\">more ]

    "; @@ -92,7 +92,7 @@ function display_new_headlines($theme, $num = 10) { $content = ""; $result = db_query("SELECT id, subject FROM stories WHERE status = 2 ORDER BY id DESC LIMIT $num"); - while ($story = db_fetch_object($result)) $content .= "
  • ". format_story_link($story) ."
  • \n"; + while ($story = db_fetch_object($result)) $content .= "
  • id\">$story->subject
  • \n"; $content .= "

    [ hlcolor2\">more ]

    "; $theme->box("Latest headlines", $content); } @@ -109,7 +109,7 @@ function display_account($theme) { if ($user && $user->userid) { function submission_number() { $result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1"); - return ($result) ? mysql_result($result, 0) : 0; + return ($result) ? db_result($result, 0) : 0; } ### Display account settings: -- cgit v1.2.3