summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/admin.inc10
-rw-r--r--includes/config.inc6
-rw-r--r--includes/function.inc15
3 files changed, 18 insertions, 13 deletions
diff --git a/includes/admin.inc b/includes/admin.inc
index 4d0ed0dda..5f7d889ae 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -8,7 +8,7 @@ function admin_icon($name) {
}
function admin_header() {
- global $sitename, $section, $status;
+ global $sitename, $section;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@@ -42,14 +42,6 @@ function admin_header() {
</TR>
<TR><TD BGCOLOR="#000000" COLSPAN="10" WIDTH="100%"><IMG SRC="images/pixel.gif" WIDTH="1" HEIGHT="0" ALT=""></TD></TR>
<TR><TD COLSPAN="10">&nbsp;</TD></TR>
- <?
- if ($status) {
- ?>
- <TR><TD COLSPAN="10"><BIG><B>status:</B> <? echo $status; ?></BIG></TD></TR>
- <TR><TD COLSPAN="10">&nbsp;</TD></TR>
- <?
- }
- ?>
<TR>
<TD COLSPAN="10">
<?
diff --git a/includes/config.inc b/includes/config.inc
index 2b889c944..d1cd0b48a 100644
--- a/includes/config.inc
+++ b/includes/config.inc
@@ -57,9 +57,9 @@ $categories = array("Announcements",
"Computers & Internet",
"Drop.org",
"Entertainment",
- "Freedom",
- "Government",
"News & Media",
+ "Politics & Freedom",
+ "Reviews",
"Science",
"Society & Culture");
@@ -76,6 +76,8 @@ $anonymous = "Anonymous Chicken";
#
# Themes:
+# the first theme listed in the associative array `$themes' will
+# automatically become the default theme.
#
$themes = array("Marvin" => array(
"themes/marvin/marvin.theme",
diff --git a/includes/function.inc b/includes/function.inc
index ec3ad0a90..c9b80e0a6 100644
--- a/includes/function.inc
+++ b/includes/function.inc
@@ -19,13 +19,17 @@ function load_theme() {
return new Theme();
}
-function check_input($message) {
+function check_field($message) {
return str_replace("\"", "&quot;", stripslashes($message));
}
+function check_input($message) {
+ return strip_tags($message);
+}
+
function check_output($message) {
global $allowed_html;
- return nl2br(strip_tags(stripslashes($message), $allowed_html));
+ return strip_tags(stripslashes($message), $allowed_html);
}
function discussion_num_replies($id, $count = 0) {
@@ -33,6 +37,13 @@ function discussion_num_replies($id, $count = 0) {
return ($result) ? db_result($result, 0) : 0;
}
+function discussion_num_filtered($sid, $pid) {
+ global $user;
+ $threshold = ($user->id) ? $user->threshold : "0";
+ $result = db_query("SELECT COUNT(cid) FROM comments WHERE sid = $sid AND pid = $pid AND (votes != 0 AND score / votes < $threshold)");
+ return ($result) ? db_result($result, 0) : 0;
+}
+
function format_plural($count, $one, $more) {
return ($count == 1) ? "$count $one" : "$count $more";
}