Skip to content

Commit

Permalink
changed: updated for Elgg 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Nov 1, 2023
1 parent 74f1113 commit 7c6a744
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Poll
====

![Elgg 5.0](https://img.shields.io/badge/Elgg-5.0-green.svg)
![Elgg 5.1](https://img.shields.io/badge/Elgg-5.1-green.svg)
![Lint Checks](https://github.com/ColdTrick/poll/actions/workflows/lint.yml/badge.svg?event=push)
[![Latest Stable Version](https://poser.pugx.org/coldtrick/poll/v/stable.svg)](https://packagist.org/packages/coldtrick/poll)
[![License](https://poser.pugx.org/coldtrick/poll/license.svg)](https://packagist.org/packages/coldtrick/poll)
Expand Down
6 changes: 0 additions & 6 deletions classes/ColdTrick/Poll/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ class Cron {
* @return void
*/
public static function sendCloseNotifications(\Elgg\Event $event): void {
echo 'Starting Poll closed notification' . PHP_EOL;
elgg_log('Starting Poll closed notification', 'NOTICE');

elgg_call(ELGG_IGNORE_ACCESS, function() {
$time = mktime(0, 0, 0);

Expand Down Expand Up @@ -57,8 +54,5 @@ public static function sendCloseNotifications(\Elgg\Event $event): void {
$poll->notifyParticipantsOnClose();
}
});

echo 'Done with Poll closed notification' . PHP_EOL;
elgg_log('Done with Poll closed notification', 'NOTICE');
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
},
"require": {
"composer/installers": "^1.0.8",
"npm-asset/chart.js": "~3.4.1"
"npm-asset/chart.js": "~4.4.0"
},
"conflict": {
"elgg/elgg": "<5.0"
"elgg/elgg": "<5.1"
},
"repositories": [
{
Expand Down
23 changes: 19 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions views/default/poll/view/results.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['jquery', 'elgg', 'chart.js/chart.min'], function($, elgg, Chart) {
define(['jquery', 'elgg', 'chart.js/chart.umd'], function($, elgg, Chart) {
function init_chart(elem) {
var data = $(elem).data();
if (data.initialized) {
Expand Down Expand Up @@ -48,7 +48,7 @@ define(['jquery', 'elgg', 'chart.js/chart.min'], function($, elgg, Chart) {
}

$(elem).data('initialized', true);
};
}

$('.poll-result-chart').each(function(index, elem) {
init_chart(elem);
Expand Down
2 changes: 1 addition & 1 deletion views/default/resources/poll/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$entity = get_entity($guid);

// breadcrumb
elgg_push_entity_breadcrumbs($entity, false);
elgg_push_entity_breadcrumbs($entity);

// build page elements
$title = $entity->getDisplayName();
Expand Down

0 comments on commit 7c6a744

Please sign in to comment.