aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/actions
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-25 17:07:41 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-25 17:07:41 +0000
commit58bd19d7cf35e6159124716d0da48d91354d3a2f (patch)
treebaf3133c13b2f5a38e7e16e182a208258069e4ef /mod/blog/actions
parentf6045914d7488c43cd7761ddaded55b3791ae950 (diff)
downloadelgg-58bd19d7cf35e6159124716d0da48d91354d3a2f.tar.gz
elgg-58bd19d7cf35e6159124716d0da48d91354d3a2f.tar.bz2
amtrak does not have wifi so here is one big commit with group blogs, blog widget, and improved blog sidebar
git-svn-id: http://code.elgg.org/elgg/trunk@7720 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/actions')
-rw-r--r--mod/blog/actions/blog/save.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php
index 11d366a44..4e6e9133b 100644
--- a/mod/blog/actions/blog/save.php
+++ b/mod/blog/actions/blog/save.php
@@ -24,7 +24,6 @@ if ($guid) {
register_error(elgg_echo('blog:error:post_not_found'));
forward(get_input('forward', REFERER));
}
- $success_forward_url = get_input('forward', $blog->getURL());
// save some data for revisions once we save the new edit
$revision_text = $blog->description;
@@ -32,7 +31,6 @@ if ($guid) {
} else {
$blog = new ElggBlog();
$blog->subtype = 'blog';
- $success_forward_url = get_input('forward');
$new_post = TRUE;
}
@@ -45,7 +43,7 @@ $values = array(
'comments_on' => 'On',
'excerpt' => '',
'tags' => '',
- 'container_guid' => ''
+ 'container_guid' => (int)get_input('container_guid'),
);
// fail if a required entity isn't set
@@ -150,7 +148,11 @@ if (!$error) {
if ($new_post && $blog->status == 'published') {
add_to_river('river/object/blog/create', 'create', get_loggedin_userid(), $blog->getGUID());
}
- forward($success_forward_url);
+ if ($blog->status == 'published') {
+ forward($blog->getURL());
+ } else {
+ forward("pg/blog/edit/$blog->guid");
+ }
} else {
register_error(elgg_echo('blog:error:cannot_save'));
forward($error_forward_url);