if (!DBA::isResult($toplevel_item)) {
notice(DI::l10n()->t('Unable to locate original post.') . EOL);
- if (!empty($_REQUEST['return'])) {
+ if ($return_path) {
DI::baseUrl()->redirect($return_path);
}
exit();
// Now check that valid personal details have been provided
if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) {
notice(DI::l10n()->t('Permission denied.') . EOL);
-
- if (!empty($_REQUEST['return'])) {
+ if ($return_path) {
DI::baseUrl()->redirect($return_path);
}
System::jsonExit(['preview' => '']);
}
info(DI::l10n()->t('Empty post discarded.') . EOL);
- if (!empty($_REQUEST['return'])) {
+ if ($return_path) {
DI::baseUrl()->redirect($return_path);
}
exit();
// update filetags in pconfig
FileTag::updatePconfig($uid, $categories_old, $categories_new, 'category');
- if (!empty($_REQUEST['return']) && strlen($return_path)) {
- Logger::log('return: ' . $return_path);
+ if ($return_path) {
DI::baseUrl()->redirect($return_path);
}
exit();
if (!$post_id) {
Logger::log("Item wasn't stored.");
- DI::baseUrl()->redirect($return_path);
+ if ($return_path) {
+ DI::baseUrl()->redirect($return_path);
+ }
}
$datarray = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);
if (!DBA::isResult($datarray)) {
Logger::log("Item with id ".$post_id." couldn't be fetched.");
- DI::baseUrl()->redirect($return_path);
+ if ($return_path) {
+ DI::baseUrl()->redirect($return_path);
+ }
}
// update filetags in pconfig