From cc381c14613b4c4539d74f38ec58196f6dfcdaa0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 1 Nov 2002 10:47:20 +0000 Subject: - 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 · 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 ... --- modules/forum.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/forum.module') 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 = "". t("Active forum topics:") ."
"; $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)."...")) ."
"; } - + if ($content) { $content .= "
". lm(t("more"), array("mod" => "forum")) ."
"; } - + cache_set("forum:block", $content, time() + 60 * 3); } -- cgit v1.2.3