Fix: redirect to referrer after bookmark deletion

Except if the referer points to a permalink (which has been deleted).

Fixes 
This commit is contained in:
ArthurHoaro 2020-11-05 16:14:22 +01:00
parent 38b55fbf3d
commit 330ac859fb
2 changed files with 7 additions and 3 deletions
application/front/controller/admin

View file

@ -66,8 +66,8 @@ class ShaareManageController extends ShaarliAdminController
return $response->write('<script>self.close();</script>');
}
// Don't redirect to where we were previously because the datastore has changed.
return $this->redirect($response, '/');
// Don't redirect to permalink after deletion.
return $this->redirectFromReferer($request, $response, ['shaare/']);
}
/**