Skip to content
Snippets Groups Projects
Commit b6451185 authored by Kjartan Mannes's avatar Kjartan Mannes
Browse files

- fixed a bug in blog.module that would let users edit other people blogs.

parent 9688b2e4
Branches
Tags
No related merge requests found
......@@ -283,8 +283,14 @@ function blog_user() {
blog_page_user($user->name, time());
break;
case "edit":
$theme->box(t("Submit a blog"), blog_form(node_get_array(array("nid" => $id, "type" => "blog"))), "main");
$node = node_get_array(array("nid" => $id, "type" => "blog"));
if ($node[author] == $user->id) {
$theme->box(t("Submit a blog"), blog_form($node), "main");
$theme->box(t("Older blogs"), blog_edit_history($id), "main");
}
else {
$theme->box(t("Submit"), message_access());
}
break;
case t("Preview"):
$theme->box(t("Preview Blog"), blog_form($edit), "main");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment