diff --git a/README.md b/README.md index c5dc5fa..bb3b66b 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/classes/ColdTrick/Poll/Cron.php b/classes/ColdTrick/Poll/Cron.php index c7665df..79e718b 100644 --- a/classes/ColdTrick/Poll/Cron.php +++ b/classes/ColdTrick/Poll/Cron.php @@ -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); @@ -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'); } } diff --git a/composer.json b/composer.json index af839fe..e0497a1 100644 --- a/composer.json +++ b/composer.json @@ -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": [ { diff --git a/composer.lock b/composer.lock index 072c09b..21a8e06 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f46bbe4c82b818fda906909a1fe06869", + "content-hash": "3bcf491fdde66054fa67b52611bd1958", "packages": [ { "name": "composer/installers", @@ -159,10 +159,25 @@ }, { "name": "npm-asset/chart.js", - "version": "3.4.1", + "version": "4.4.0", "dist": { "type": "tar", - "url": "https://registry.npmjs.org/chart.js/-/chart.js-3.4.1.tgz" + "url": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz" + }, + "require": { + "npm-asset/kurkle--color": ">=0.3.0,<0.4.0" + }, + "type": "npm-asset", + "license": [ + "MIT" + ] + }, + { + "name": "npm-asset/kurkle--color", + "version": "0.3.2", + "dist": { + "type": "tar", + "url": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz" }, "type": "npm-asset", "license": [ @@ -178,5 +193,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/views/default/poll/view/results.js b/views/default/poll/view/results.js index ed22598..eaeee64 100644 --- a/views/default/poll/view/results.js +++ b/views/default/poll/view/results.js @@ -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) { @@ -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); diff --git a/views/default/resources/poll/view.php b/views/default/resources/poll/view.php index e22078c..c0af067 100644 --- a/views/default/resources/poll/view.php +++ b/views/default/resources/poll/view.php @@ -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();