aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/edit.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-04 17:36:44 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-04 17:36:44 +0000
commitd06f87fadb1b88f8ae251ada0461dd2cebf84a00 (patch)
tree5e90ffdb4dcc46978bcde6bd839243aad02d7799 /mod/blog/edit.php
parent4ec8a466b8ae9bfcb495b57cc1c90ac8de3533e2 (diff)
downloadelgg-d06f87fadb1b88f8ae251ada0461dd2cebf84a00.tar.gz
elgg-d06f87fadb1b88f8ae251ada0461dd2cebf84a00.tar.bz2
Blog edit updates
git-svn-id: https://code.elgg.org/elgg/trunk@408 36083f99-b078-4883-b0ff-0f9b5a30f544
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);