]> git.mxchange.org Git - friendica.git/blob - src/Module/FollowConfirm.php
Replace almost every Introduction places
[friendica.git] / src / Module / FollowConfirm.php
1 <?php
2 namespace Friendica\Module;
3
4 use Friendica\BaseModule;
5 use Friendica\DI;
6
7 /**
8  * Process follow request confirmations
9  */
10 class FollowConfirm extends BaseModule
11 {
12         public static function post(array $parameters = [])
13         {
14                 $uid = local_user();
15                 if (!$uid) {
16                         notice(DI::l10n()->t('Permission denied.'));
17                         return;
18                 }
19
20                 $intro_id = intval($_POST['intro_id']   ?? 0);
21                 $duplex   = intval($_POST['duplex']     ?? 0);
22                 $hidden   = intval($_POST['hidden']     ?? 0);
23
24                 $intro = DI::intro()->selectOneById($intro_id, local_user());
25
26                 $intro->confirm($duplex, $hidden);
27
28                 DI::baseUrl()->redirect('contact/' .  $intro->cid);
29         }
30 }