aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog/edit.php')
-rw-r--r--mod/blog/edit.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/mod/blog/edit.php b/mod/blog/edit.php
index 4da1a4814..262973f54 100644
--- a/mod/blog/edit.php
+++ b/mod/blog/edit.php
@@ -14,7 +14,16 @@
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
// Get the post, if it exists
- if (get_object())
+ $blogpost = (int) get_input('blogpost');
+ if ($post = get_entity($blogpost)) {
+
+ if ($post->canEdit()) {
+
+ $body = elgg_view("blog/forms/edit", array('entity' => $post));
+
+ }
+
+ }
// Display page
page_draw(sprintf(elgg_echo('blog:editpost'),$post->title),$body);