*/
use Friendica\App;
+use Friendica\BaseModule;
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Core\ACL;
$threadsid = -1;
$page_template = Renderer::getMarkupTemplate("conversation.tpl");
+ $formSecurityToken = BaseModule::getFormSecurityToken('contact_action');
if (!empty($items)) {
if (in_array($mode, ['community', 'contacts'])) {
'network_icon' => ContactSelector::networkToIcon($item['network'], $item['author-link']),
'linktitle' => DI::l10n()->t('View %s\'s profile @ %s', $profile_name, $item['author-link']),
'profile_url' => $profile_link,
- 'item_photo_menu_html' => item_photo_menu($item),
+ 'item_photo_menu_html' => item_photo_menu($item, $formSecurityToken),
'name' => $profile_name,
'sparkle' => $sparkle,
'lock' => false,
}
}
- $threads = $conv->getTemplateData($conv_responses);
+ $threads = $conv->getTemplateData($conv_responses, $formSecurityToken);
if (!$threads) {
Logger::log('[ERROR] conversation : Failed to get template data.', Logger::DEBUG);
$threads = [];
return $items;
}
-function item_photo_menu($item)
+function item_photo_menu($item, string $formSecurityToken)
{
DI::profiler()->startRecording('rendering');
$sub_link = '';
if (!empty($pcid)) {
$contact_url = 'contact/' . $pcid;
$posts_link = $contact_url . '/posts';
- $block_link = $item['self'] ? '' : $contact_url . '/block';
- $ignore_link = $item['self'] ? '' : $contact_url . '/ignore';
+ $block_link = $item['self'] ? '' : $contact_url . '/block?t=' . $formSecurityToken;
+ $ignore_link = $item['self'] ? '' : $contact_url . '/ignore?t=' . $formSecurityToken;
}
if ($cid && !$item['self']) {