Fix ignore notification

This commit is contained in:
nupplaPhil 2020-01-28 22:41:38 +01:00
parent 82f8794215
commit dd8d9d7c70
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
6 changed files with 28 additions and 31 deletions

View file

@ -75,30 +75,6 @@ abstract class BaseNotifications extends BaseModule
self::$showAll = ($_REQUEST['show'] ?? '') === 'all';
}
public static function post(array $parameters = [])
{
$request_id = DI::args()->get(1);
if ($request_id === 'all') {
return;
}
if ($request_id) {
$intro = DI::intro()->selectFirst(['id' => $request_id, 'uid' => local_user()]);
switch ($_POST['submit']) {
case DI::l10n()->t('Discard'):
$intro->discard();
break;
case DI::l10n()->t('Ignore'):
$intro->ignore();
break;
}
DI::baseUrl()->redirect('notifications/intros');
}
}
public static function rawContent(array $parameters = [])
{
// If the last argument of the query is NOT json, return