Merge pull request #6136 from annando/delete-locally

Improved delete text to clarify AP comment delete behaviour
pull/6140/head
Hypolite Petovan 2018-11-15 18:26:12 -05:00 zatwierdzone przez GitHub
commit 58e35f037b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 11 dodań i 10 usunięć

Wyświetl plik

@ -1011,10 +1011,8 @@ class Item extends BaseObject
$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);
}
}
@ -1023,10 +1021,8 @@ class Item extends BaseObject
$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);
}
}

Wyświetl plik

@ -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.
$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,