mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:42:53 +00:00
Merge pull request #6136 from annando/delete-locally
Improved delete text to clarify AP comment delete behaviour
This commit is contained in:
commit
58e35f037b
2 changed files with 11 additions and 10 deletions
|
@ -1011,10 +1011,8 @@ class Item extends BaseObject
|
||||||
$matches = false;
|
$matches = false;
|
||||||
$cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
|
$cnt = preg_match_all('/<(.*?)>/', $item['file'], $matches, PREG_SET_ORDER);
|
||||||
|
|
||||||
if ($cnt)
|
if ($cnt) {
|
||||||
{
|
foreach ($matches as $mtch) {
|
||||||
foreach ($matches as $mtch)
|
|
||||||
{
|
|
||||||
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],true);
|
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1023,10 +1021,8 @@ class Item extends BaseObject
|
||||||
|
|
||||||
$cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
|
$cnt = preg_match_all('/\[(.*?)\]/', $item['file'], $matches, PREG_SET_ORDER);
|
||||||
|
|
||||||
if ($cnt)
|
if ($cnt) {
|
||||||
{
|
foreach ($matches as $mtch) {
|
||||||
foreach ($matches as $mtch)
|
|
||||||
{
|
|
||||||
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],false);
|
FileTag::unsaveFile($item['uid'], $item['id'], $mtch[1],false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,8 +190,13 @@ class Post extends BaseObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Showing the one or the other text, depending upon if we can only hide it or really delete it.
|
if ($origin && ($item['id'] != $item['parent']) && ($item['network'] == Protocol::ACTIVITYPUB)) {
|
||||||
$delete = $origin ? L10n::t('Delete globally') : L10n::t('Remove locally');
|
// 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 = [
|
$drop = [
|
||||||
'dropping' => $dropping,
|
'dropping' => $dropping,
|
||||||
|
|
Loading…
Reference in a new issue