Commit 97dd9e1c authored by Dries's avatar Dries

- fixed bug in diary module
parent 15a6bef4
......@@ -21,6 +21,7 @@ drupal x.xx, xx/xx/xxxx
+ made it possible to permanently delete stories
* improved themes:
+ W3C validation on a best effort basis
+ removed $theme->control() from themes
+ added theme "goofy"
- revised documentation
......
......@@ -4,7 +4,6 @@
"help" => "diary_help",
"menu" => "diary_menu",
"page" => "diary_page",
"account" => "diary_account",
"admin" => "diary_admin",
"block" => "diary_block",
"export" => "diary_export");
......@@ -220,21 +219,6 @@ function diary_help() {
<?php
}
function diary_user($username, $section, $operation) {
if ($section == "user" && $operation == "view") {
$result = db_query("SELECT d.* FROM diaries d LEFT JOIN users u ON u.id = d.author WHERE u.userid = '$username' AND d.timestamp > ". (time() - 1209600) ." ORDER BY id DESC LIMIT 2");
while ($diary = db_fetch_object($result)) {
$content .= "<DL><DT><B>". format_date($diary->timestamp, "large") .":</B></DT><DD><P>". check_output($diary->text) ."</P><P>[ <A HREF=\"module.php?mod=diary&op=view&name=$username\">more</A> ]</P></DD></DL>\n";
$diaries++;
}
$block["subject"] = strtr(t("%a has posted %b recently"), array("%a" => $username, "%b" => format_plural($diaries, "diary entry", "diary entries")));
$block["content"] = $content;
return $block;
}
}
function diary_menu() {
return array("<A HREF=\"module.php?mod=diary&op=add\">". t("edit your diary") ."</A>", "<A HREF=\"module.php?mod=diary&op=view\">". t("view your diary") ."</A>");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment