diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-12 02:12:47 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-12 02:12:47 +0000 |
commit | 36abf69637671a1cf65101212596118d155ef54a (patch) | |
tree | ac14b646b0fce5f8b7f0e0fde1415020137b071e /mod/blog/actions/delete.php | |
parent | 66bdaf5415ca35b1a210dd2e799ecea2571846f9 (diff) | |
download | elgg-36abf69637671a1cf65101212596118d155ef54a.tar.gz elgg-36abf69637671a1cf65101212596118d155ef54a.tar.bz2 |
Rough first version of a new blog plugin.
git-svn-id: http://code.elgg.org/elgg/trunk@5370 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/actions/delete.php')
-rw-r--r-- | mod/blog/actions/delete.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/mod/blog/actions/delete.php b/mod/blog/actions/delete.php deleted file mode 100644 index 5b0120cef..000000000 --- a/mod/blog/actions/delete.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php
-
-/**
- * Elgg blog: delete post action
- */
-
-// Make sure we're logged in (send us to the front page if not)
-gatekeeper();
-
-// Get input data
-$guid = (int) get_input('blogpost');
-
-// Make sure we actually have permission to edit
-$blog = get_entity($guid);
-if ($blog->getSubtype() == "blog" && $blog->canEdit()) {
- $container = get_entity($blog->container_guid);
-
- // Get owning user
- $owner = get_entity($blog->getOwner());
- // Delete it!
- $rowsaffected = $blog->delete();
- if ($rowsaffected > 0) {
- // Success message
- system_message(elgg_echo("blog:deleted"));
- } else {
- register_error(elgg_echo("blog:notdeleted"));
- }
- // Forward to the main blog page
- forward("pg/blog/" . $container->username);
-}else{
- forward($_SERVER['HTTP_REFERER']);
-}
\ No newline at end of file |