aboutsummaryrefslogtreecommitdiffstats
path: root/mod/impel.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 19:27:05 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 19:27:05 -0700
commit06898167720158604f1c3d1d2e19a591208c607a (patch)
treeaf2565fb6f6370f2f3e8ccd7f6898e23bd606062 /mod/impel.php
parent0826c5fd96dfc371620eb0ca6d0781d9539b3b0c (diff)
downloadvolse-hubzilla-06898167720158604f1c3d1d2e19a591208c607a.tar.gz
volse-hubzilla-06898167720158604f1c3d1d2e19a591208c607a.tar.bz2
volse-hubzilla-06898167720158604f1c3d1d2e19a591208c607a.zip
check for success before updating remote id
Diffstat (limited to 'mod/impel.php')
-rw-r--r--mod/impel.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/mod/impel.php b/mod/impel.php
index f204da36a..e78b3311d 100644
--- a/mod/impel.php
+++ b/mod/impel.php
@@ -113,17 +113,18 @@ function impel_init(&$a) {
}
$x = item_store($arr,$execflag);
}
- if($x['success'])
+ if($x['success']) {
$item_id = $x['item_id'];
+ update_remote_id($channel,$item_id,$arr['item_restrict'],$pagetitle,$namespace,$remote_id,$arr['mid']);
+ $ret['success'] = true;
+ info( sprintf( t('%s element installed'), $installed_type));
+ }
+ else {
+ notice( sprintf( t('%s element installation failed'), $installed_type));
+ }
- update_remote_id($channel,$item_id,$arr['item_restrict'],$pagetitle,$namespace,$remote_id,$arr['mid']);
-
-
- $ret['success'] = true;
-
- info( sprintf( t('%s element installed'), $installed_type));
-
+//??? should perhaps return ret?
json_return_and_die(true);
}