diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-10-21 13:59:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-10-21 13:59:27 +0000 |
commit | ef43f485756937627f657664a2a7c7f5364e8a53 (patch) | |
tree | c700e0cac24f461c45a447a714f0a8d6d20ce888 /includes | |
parent | da9675ef0bd18acd7e393460e197b30959ba5735 (diff) | |
download | brdo-ef43f485756937627f657664a2a7c7f5364e8a53.tar.gz brdo-ef43f485756937627f657664a2a7c7f5364e8a53.tar.bz2 |
A bunch of internal changes:
- better organisation of include files
- renamed a few function to make more sense
- small bugfix in the user account registration
- ...
Diffstat (limited to 'includes')
-rw-r--r-- | includes/function.inc | 5 | ||||
-rw-r--r-- | includes/template.inc | 6 | ||||
-rw-r--r-- | includes/theme.inc | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/includes/function.inc b/includes/function.inc index 5c1a3615a..ec3ad0a90 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -1,8 +1,5 @@ <? -include "includes/database.inc"; -include "includes/watchdog.inc"; - function id2story($id) { ### Perform query: $result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.id = $id"); @@ -69,7 +66,7 @@ function format_username($username, $admin = 0) { else { global $anonymous; return $anonymous; } } -function format_email_address($address) { +function format_email($address) { return ($address) ? "<A HREF=\"mailto:$address\">$address</A>" : format_data($address); } diff --git a/includes/template.inc b/includes/template.inc index 5cb6c84d1..0190d4293 100644 --- a/includes/template.inc +++ b/includes/template.inc @@ -1,5 +1,4 @@ <? -include "includes/user.inc"; function display_morelink($theme, $story) { return ($story->article) ? "[ <A HREF=\"discussion.php?id=$story->id\"><FONT COLOR=\"$theme->hlcolor2\"><B>read more</B></FONT></A> | ". strlen($story->article) ." bytes | <A HREF=\"discussion.php?id=$story->id\"><FONT COLOR=\"$theme->hlcolor2\">". format_plural($story->comments, "comment", "comments") ."</FONT></A> ]" : "[ <A HREF=\"discussion.php?id=$story->id\"><FONT COLOR=\"$theme->hlcolor2\">". format_plural($story->comments, "comment", "comments") ."</FONT></A> ]"; @@ -61,7 +60,7 @@ function display_old_headlines($theme, $num = 10) { function display_comment_moderation($id, $author, $score, $votes) { global $user, $comment_votes; - if ($user->userid && $user->userid != $author && !user_getHistory($user->history, "c$id")) { + if ($user->id && $user->userid != $author && !user_getHistory($user->history, "c$id")) { $output .= "<SELECT NAME=\"moderate[$id]\">\n"; foreach ($comment_votes as $key=>$value) $output .= " <OPTION VALUE=\"$value\">$key</OPTION>\n"; $output .= "</SELECT>\n"; @@ -106,7 +105,8 @@ function display_calendar($theme, $date) { function display_account($theme) { global $user; - if ($user && $user->userid) { + if ($user->id) { + function submission_number() { $result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1"); return ($result) ? db_result($result, 0) : 0; diff --git a/includes/theme.inc b/includes/theme.inc index 93c6b62ff..0251f3d81 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1,8 +1,11 @@ <? include "includes/config.inc"; +include "includes/database.inc"; +include "includes/watchdog.inc"; include "includes/function.inc"; include "includes/template.inc"; +include "includes/user.inc"; global $user; |