Commit 8b6e7807 authored by Dries's avatar Dries
Browse files

- small update to diary.module

parent 73f26a53
......@@ -4,7 +4,7 @@
"help" => "diary_help",
"menu" => "diary_menu",
"page" => "diary_page",
"user" => "diary_user",
"account" => "diary_account",
"admin" => "diary_admin",
"block" => "diary_block",
"export" => "diary_export");
......@@ -16,7 +16,7 @@ function diary_find($keys) {
$find = array();
$result = db_query("SELECT d.*, u.userid FROM diaries d LEFT JOIN users u ON d.author = u.id WHERE d.text LIKE '%$keys%' ORDER BY d.timestamp DESC LIMIT 20");
while ($diary = db_fetch_object($result)) {
array_push($find, array("subject" => "$diary->userid's diary", "link" => (user_access($user, "diary") ? "admin.php?mod=diary&op=edit&id=$diary->id" : "module.php?mod=diary&op=view&name=$diary->userid"), "user" => $diary->userid, "date" => $diary->timestamp));
array_push($find, array("title" => "$diary->userid's diary", "link" => (user_access($user, "diary") ? "admin.php?mod=diary&op=edit&id=$diary->id" : "module.php?mod=diary&op=view&name=$diary->userid"), "user" => $diary->userid, "date" => $diary->timestamp));
}
return $find;
......
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