$matches = false;
$cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
- if ($cnt)
- {
- foreach ($matches as $mtch)
- {
+ if ($cnt) {
+ foreach ($matches as $mtch) {
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],true);
}
}
$cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
- if ($cnt)
- {
- foreach ($matches as $mtch)
- {
+ if ($cnt) {
+ foreach ($matches as $mtch) {
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],false);
}
}
}
}
- // Showing the one or the other text, depending upon if we can only hide it or really delete it.
- $delete = $origin ? L10n::t('Delete globally') : L10n::t('Remove locally');
+ if ($origin && ($item['id'] != $item['parent']) && ($item['network'] == Protocol::ACTIVITYPUB)) {
+ // ActivityPub doesn't allow removal of remote comments
+ $delete = L10n::t('Delete locally');
+ } else {
+ // Showing the one or the other text, depending upon if we can only hide it or really delete it.
+ $delete = $origin ? L10n::t('Delete globally') : L10n::t('Remove locally');
+ }
$drop = [
'dropping' => $dropping,