summaryrefslogtreecommitdiff
path: root/includes/template.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-10-19 13:31:23 +0000
committerDries Buytaert <dries@buytaert.net>2000-10-19 13:31:23 +0000
commit11ee95dadc408e16e9832af9fd0b41495e78b0a6 (patch)
treea8f5ca3387e360b37d0eafc4edfdc5fdc52d3b87 /includes/template.inc
parent43af5a7389265891770e4a283e4748678754797f (diff)
downloadbrdo-11ee95dadc408e16e9832af9fd0b41495e78b0a6.tar.gz
brdo-11ee95dadc408e16e9832af9fd0b41495e78b0a6.tar.bz2
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
Diffstat (limited to 'includes/template.inc')
-rw-r--r--includes/template.inc8
1 files changed, 4 insertions, 4 deletions
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 .= "<P><B>". date("l, M jS", $story->timestamp) ."</B></P>\n";
$time = date("F jS", $story->timestamp);
}
- $content .= "<LI>". format_story_link($story) ."</LI>\n";
+ $content .= "<LI><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></LI>\n";
}
$content .= "<P ALIGN=\"right\">[ <A HREF=\"search.php\"><FONT COLOR=\"$theme->hlcolor2\">more</FONT></A> ]</P>";
@@ -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 .= "<LI>". format_story_link($story) ."</LI>\n";
+ while ($story = db_fetch_object($result)) $content .= "<LI><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></LI>\n";
$content .= "<P ALIGN=\"right\">[ <A HREF=\"search.php\"><FONT COLOR=\"$theme->hlcolor2\">more</FONT></A> ]</P>";
$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: