- // If it is a friend suggestion, the contact is not a new friend but an existing friend
- // that should not be deleted.
-
- $fid = $intro['fid'];
-
- if ($_POST['submit'] == L10n::t('Discard')) {
- DBA::delete('intro', ['id' => $intro_id]);
-
- if (!$fid) {
- // The check for blocked and pending is in case the friendship was already approved
- // and we just want to get rid of the now pointless notification
- $condition = ['id' => $contact_id, 'uid' => local_user(),
- 'self' => false, 'blocked' => true, 'pending' => true];
- DBA::delete('contact', $condition);
- }
- $a->internalRedirect('notifications/intros');
- }
-
- if ($_POST['submit'] == L10n::t('Ignore')) {
- DBA::update('intro', ['ignore' => true], ['id' => $intro_id]);
- $a->internalRedirect('notifications/intros');
- }