2019-05-06 05:46:13 +00:00
|
|
|
<?php
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
2019-12-15 21:34:11 +00:00
|
|
|
use Friendica\DI;
|
2019-05-06 05:46:13 +00:00
|
|
|
|
2019-05-06 18:46:30 +00:00
|
|
|
/**
|
|
|
|
* Process follow request confirmations
|
|
|
|
*/
|
2019-05-06 05:46:13 +00:00
|
|
|
class FollowConfirm extends BaseModule
|
|
|
|
{
|
2019-11-05 21:48:54 +00:00
|
|
|
public static function post(array $parameters = [])
|
2019-05-06 05:46:13 +00:00
|
|
|
{
|
|
|
|
$uid = local_user();
|
|
|
|
if (!$uid) {
|
2020-07-23 06:25:01 +00:00
|
|
|
notice(DI::l10n()->t('Permission denied.'));
|
2019-05-06 05:46:13 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-10-15 13:20:32 +00:00
|
|
|
$intro_id = intval($_POST['intro_id'] ?? 0);
|
|
|
|
$duplex = intval($_POST['duplex'] ?? 0);
|
|
|
|
$hidden = intval($_POST['hidden'] ?? 0);
|
2019-05-06 05:46:13 +00:00
|
|
|
|
2021-10-18 20:12:49 +00:00
|
|
|
$intro = DI::intro()->selectOneById($intro_id, local_user());
|
2019-05-06 05:46:13 +00:00
|
|
|
|
2020-01-05 22:50:33 +00:00
|
|
|
$intro->confirm($duplex, $hidden);
|
2019-05-06 05:46:13 +00:00
|
|
|
|
2021-10-18 20:12:49 +00:00
|
|
|
DI::baseUrl()->redirect('contact/' . $intro->cid);
|
2019-05-06 05:46:13 +00:00
|
|
|
}
|
|
|
|
}
|