aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-04 13:37:04 -0800
committerFriendika <info@friendika.com>2011-02-04 13:37:04 -0800
commit1d0d765344e155086a65b8b56c1c0ec70d9a8a15 (patch)
treee3c1edbb68f9b2204d6db39d03497ce4ac8e01e5 /mod/item.php
parent6bb8f677c243ab5242919215cece97125143f943 (diff)
downloadvolse-hubzilla-1d0d765344e155086a65b8b56c1c0ec70d9a8a15.tar.gz
volse-hubzilla-1d0d765344e155086a65b8b56c1c0ec70d9a8a15.tar.bz2
volse-hubzilla-1d0d765344e155086a65b8b56c1c0ec70d9a8a15.zip
more error checking on posts
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/mod/item.php b/mod/item.php
index 7125ae1f4..38ef580af 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -1,11 +1,17 @@
<?php
-// This is the POST destination for most all locally posted
-// text stuff. This function handles status, wall-to-wall status,
-// local comments, and remote coments - that are posted on this site
-// (as opposed to being delivered in a feed).
-// All of these become an "item" which is our basic unit of
-// information.
+/**
+ *
+ * This is the POST destination for most all locally posted
+ * text stuff. This function handles status, wall-to-wall status,
+ * local comments, and remote coments - that are posted on this site
+ * (as opposed to being delivered in a feed).
+ * All of these become an "item" which is our basic unit of
+ * information.
+ * Posts that originate externally or do not fall into the above
+ * posting categories go through item_store() instead of this function.
+ *
+ */
function item_post(&$a) {
@@ -417,6 +423,12 @@ function item_post(&$a) {
);
}
}
+ else {
+ logger('mod_item: unable to retrieve post that was just stored.');
+ notify( t('System error. Post not saved.'));
+ goaway($a->get_baseurl() . "/" . $_POST['return'] );
+ // NOTREACHED
+ }
$php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
@@ -454,10 +466,8 @@ function item_post(&$a) {
}
}
-
-
goaway($a->get_baseurl() . "/" . $_POST['return'] );
- return; // NOTREACHED
+ // NOTREACHED
}
@@ -551,7 +561,7 @@ function item_content(&$a) {
proc_run($php_path,"include/notifier.php","drop","$drop_id");
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
- return; //NOTREACHED
+ //NOTREACHED
}
else {
notice( t('Permission denied.') . EOL);