Issue 10841: Redirect always to the same page

This commit is contained in:
Michael 2021-10-06 19:02:26 +00:00
parent f44443d960
commit 48f482665c

View File

@ -360,13 +360,13 @@ class Contact extends BaseModule
if ($cmd === 'update' && $cdata['user']) { if ($cmd === 'update' && $cdata['user']) {
self::updateContactFromPoll($cdata['user']); self::updateContactFromPoll($cdata['user']);
DI::baseUrl()->redirect('contact/' . $cdata['public']); DI::baseUrl()->redirect('contact/' . $contact_id);
// NOTREACHED // NOTREACHED
} }
if ($cmd === 'updateprofile' && $cdata['user']) { if ($cmd === 'updateprofile' && $cdata['user']) {
self::updateContactFromProbe($cdata['user']); self::updateContactFromProbe($cdata['user']);
DI::baseUrl()->redirect('contact/' . $cdata['public']); DI::baseUrl()->redirect('contact/' . $contact_id);
// NOTREACHED // NOTREACHED
} }
@ -380,7 +380,7 @@ class Contact extends BaseModule
$blocked = Model\Contact\User::isBlocked($contact_id, local_user()); $blocked = Model\Contact\User::isBlocked($contact_id, local_user());
info(($blocked ? DI::l10n()->t('Contact has been blocked') : DI::l10n()->t('Contact has been unblocked'))); info(($blocked ? DI::l10n()->t('Contact has been blocked') : DI::l10n()->t('Contact has been unblocked')));
DI::baseUrl()->redirect('contact/' . $cdata['public']); DI::baseUrl()->redirect('contact/' . $contact_id);
// NOTREACHED // NOTREACHED
} }
@ -394,7 +394,7 @@ class Contact extends BaseModule
$ignored = Model\Contact\User::isIgnored($cdata['public'], local_user()); $ignored = Model\Contact\User::isIgnored($cdata['public'], local_user());
info(($ignored ? DI::l10n()->t('Contact has been ignored') : DI::l10n()->t('Contact has been unignored'))); info(($ignored ? DI::l10n()->t('Contact has been ignored') : DI::l10n()->t('Contact has been unignored')));
DI::baseUrl()->redirect('contact/' . $cdata['public']); DI::baseUrl()->redirect('contact/' . $contact_id);
// NOTREACHED // NOTREACHED
} }
} }