Skip to content

Commit

Permalink
Merge pull request #13701 from jeabakker/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
jdalsem committed Oct 1, 2021
2 parents 29ba4c8 + 530aa34 commit e67bf90
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
23 changes: 17 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ labels: "bug"
body:
- type: input
attributes:
label: "Elgg Version"
label: "Elgg version"
description: "Which version of Elgg is affected"
validations:
required: true
- type: checkboxes
- type: dropdown
attributes:
label: "Source of your Elgg installation"
description: "How did you install Elgg"
multiple: true
options:
- label: "Elgg.org website"
- label: "Composer install"
- label: "GIT clone"
- label: "Other"
- Elgg.org website
- Composer install
- GIT clone
- Other
- Unknown
validations:
required: true
- type: textarea
Expand All @@ -43,3 +45,12 @@ body:
attributes:
label: "Additional notes"
description: "Is there something more you think we should know"
- type: input
attributes:
label: "PHP version"
description: "Which version of PHP are you using"
- type: textarea
attributes:
label: "PHP error log"
description: "Do you have any relevant errors from the PHP error log, please add them below"
render: text
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Feature request"
description: "Are you missing a feature? Please suggest how we can improve Elgg."
title: "[Feature]: "
labels: "feature"
body:
- type: textarea
attributes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ protected function getNotificationBody(\ElggUser $recipient, string $method): st
} else {
$body = elgg_echo('thewire:notify:post', [$owner->getDisplayName()], $language);
}
$body .= '\n\n' . $entity->description . '\n\n';

$body .= PHP_EOL . PHP_EOL;
$body .= $entity->description;
$body .= PHP_EOL . PHP_EOL;

$body .= elgg_echo('thewire:notify:footer', [$entity->getURL()], $language);

return $body;
}
}
16 changes: 14 additions & 2 deletions views/default/forms/notifications/mute.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@
$checkboxes = '';
$mute_guids = [];

if (!elgg_is_empty($entity->getDisplayName())) {
if ($entity instanceof \ElggComment) {
$commented_entity = $entity->getContainerEntity();
$mute_guids[] = $commented_entity->guid;

$checkboxes .= elgg_view_field([
'#type' => 'checkbox',
'#label' => elgg_echo($get_language_key($commented_entity, 'entity'), [$commented_entity->getDisplayName()]),
'name' => "mute[{$commented_entity->guid}]",
'value' => 1,
'switch' => true,
'checked' => $commented_entity->hasMutedNotifications($recipient->guid),
]);
} elseif (!elgg_is_empty($entity->getDisplayName())) {
$mute_guids[] = $entity->guid;

$checkboxes .= elgg_view_field([
Expand All @@ -43,7 +55,7 @@
]);
}

$container = $entity->getContainerEntity();
$container = ($entity instanceof ElggComment) ? $entity->getContainerEntity()->getContainerEntity() : $entity->getContainerEntity();
if (($container instanceof \ElggGroup || $container instanceof \ElggUser) && !in_array($container->guid, $mute_guids)) {
$mute_guids[] = $container->guid;

Expand Down

0 comments on commit e67bf90

Please sign in to comment.