summaryrefslogtreecommitdiff
path: root/modules/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-11-01 10:47:20 +0000
committerDries Buytaert <dries@buytaert.net>2002-11-01 10:47:20 +0000
commitcc381c14613b4c4539d74f38ec58196f6dfcdaa0 (patch)
tree34c44d95ed24402bca4736765ba7a0d53e458ac5 /modules/forum.module
parent74c722502bf274cc59b3b6fd871db9d96defba4f (diff)
downloadbrdo-cc381c14613b4c4539d74f38ec58196f6dfcdaa0.tar.gz
brdo-cc381c14613b4c4539d74f38ec58196f6dfcdaa0.tar.bz2
- Fixed glitch in block module: the admin links were not composed
correctly. Patch by Stefan. - Added missing t() functions and improved the %x directives for better readability and to ease the process of translating your site. Patches by Stefan. - Made two small additions to the 'code-clean.sh' script; it will now remove patch related junk. NOTES: - I removed the &middot; related bits. Let's tackle these later on in a separate patch after we got some sort of consensus. - I removed the 'module_exist("drupal")' check in the user module; I *think* it is incomplete and therefore incorrect. - Stefan, try using quotes in your translations and check whether everything still works. Example: translate the "Create account" button to "Create \"haha\" account \'hihi\'" and see if you can still create new accounts. Maybe automate this using a quick hack in the locale module ...
Diffstat (limited to 'modules/forum.module')
-rw-r--r--modules/forum.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/forum.module b/modules/forum.module
index 0d1fbf6f6..4f5d0f5cb 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -94,7 +94,7 @@ function forum_block($op = "list", $delta = 0) {
if (variable_get("forum_cache", 0)) {
$content = cache_get("forum:block");
}
-
+
if (!$content) {
$content = "<b>". t("Active forum topics:") ."</b><br />";
$result = db_query("SELECT n.nid, n.title, n.body, GREATEST(n.created, MAX(c.timestamp)) AS sort FROM node n, forum f LEFT JOIN comments c ON c.nid = n.nid WHERE n.type = 'forum' AND n.nid = f.nid AND f.shadow = 0 AND n.status = 1 GROUP BY n.nid ORDER BY sort DESC LIMIT ". variable_get("forum_block_num", "5"));
@@ -108,11 +108,11 @@ function forum_block($op = "list", $delta = 0) {
while ($node = db_fetch_object($result)) {
$content .= "- ". l(check_output($node->title), array("id" => $node->nid), "node", "", array("title" => substr(strip_tags($node->body), 0, 100)."...")) ."<br />";
}
-
+
if ($content) {
$content .= "<div align=\"right\">". lm(t("more"), array("mod" => "forum")) ."</div>";
}
-
+
cache_set("forum:block", $content, time() + 60 * 3);
}