if (!DBA::isResult($parent_item)) {
notice(L10n::t('Unable to locate original post.') . EOL);
if (!empty($_REQUEST['return'])) {
- goaway($return_path);
+ $a->redirect($return_path);
}
killme();
}
notice(L10n::t('Permission denied.') . EOL) ;
if (!empty($_REQUEST['return'])) {
- goaway($return_path);
+ $a->redirect($return_path);
}
killme();
}
info(L10n::t('Empty post discarded.') . EOL);
if (!empty($_REQUEST['return'])) {
- goaway($return_path);
+ $a->redirect($return_path);
}
killme();
}
if (!empty($datarray['cancel'])) {
logger('mod_item: post cancelled by addon.');
if ($return_path) {
- goaway($return_path);
+ $a->redirect($return_path);
}
$json = ['cancel' => 1];
if (!empty($_REQUEST['return']) && strlen($return_path)) {
logger('return: ' . $return_path);
- goaway($return_path);
+ $a->redirect($return_path);
}
killme();
} else {
if (!$post_id) {
logger("Item wasn't stored.");
- goaway($return_path);
+ $a->redirect($return_path);
}
$datarray = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);
if (!DBA::isResult($datarray)) {
logger("Item with id ".$post_id." couldn't be fetched.");
- goaway($return_path);
+ $a->redirect($return_path);
}
// update filetags in pconfig
function item_post_return($baseurl, $api_source, $return_path)
{
// figure out how to return, depending on from whence we came
+ $a = get_app();
if ($api_source) {
return;
}
if ($return_path) {
- goaway($return_path);
+ $a->redirect($return_path);
}
$json = ['success' => 1];