From e36019ec4663b5deb07baa773ee09973aebed35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B4me=20Bakker?= Date: Wed, 1 Nov 2023 15:42:43 +0100 Subject: [PATCH] changed: updated for Elgg 5.1 --- README.md | 2 +- classes/ColdTrick/Wizard/Menus/AdminHeader.php | 2 +- classes/ColdTrick/Wizard/Seeder.php | 7 +++++++ composer.json | 2 +- composer.lock | 4 ++-- languages/en.php | 2 +- lib/functions.php | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 78892a6..7344946 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Wizard ====== -![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/wizard/actions/workflows/lint.yml/badge.svg?event=push) [![Latest Stable Version](https://poser.pugx.org/coldtrick/wizard/v/stable.svg)](https://packagist.org/packages/coldtrick/wizard) [![License](https://poser.pugx.org/coldtrick/wizard/license.svg)](https://packagist.org/packages/coldtrick/wizard) diff --git a/classes/ColdTrick/Wizard/Menus/AdminHeader.php b/classes/ColdTrick/Wizard/Menus/AdminHeader.php index 9b9b405..d11938f 100644 --- a/classes/ColdTrick/Wizard/Menus/AdminHeader.php +++ b/classes/ColdTrick/Wizard/Menus/AdminHeader.php @@ -28,7 +28,7 @@ public static function register(\Elgg\Event $event): ?MenuItems { 'name' => 'wizard', 'text' => elgg_echo('wizard:menu:admin'), 'href' => 'admin/administer_utilities/wizard', - 'parent_name' => 'administer_utilities', + 'parent_name' => 'administer', ]); return $result; diff --git a/classes/ColdTrick/Wizard/Seeder.php b/classes/ColdTrick/Wizard/Seeder.php index 318fd7e..5bb15a8 100644 --- a/classes/ColdTrick/Wizard/Seeder.php +++ b/classes/ColdTrick/Wizard/Seeder.php @@ -88,6 +88,13 @@ public static function getType(): string { return \Wizard::SUBTYPE; } + /** + * {@inheritDoc} + */ + public static function getDefaultLimit(): int { + return 5; + } + /** * {@inheritDoc} */ diff --git a/composer.json b/composer.json index e5748bc..364938d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "composer/installers": "^1.0.8" }, "conflict": { - "elgg/elgg": "<5.0" + "elgg/elgg": "<5.1" }, "config": { "allow-plugins": { diff --git a/composer.lock b/composer.lock index b4f25ee..73629f3 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": "915a61a8b238439158857d7ca0a47d15", + "content-hash": "627be05034fe505ce01d15602fdc4aff", "packages": [ { "name": "composer/installers", @@ -166,5 +166,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/languages/en.php b/languages/en.php index 2d8be19..00766b5 100644 --- a/languages/en.php +++ b/languages/en.php @@ -29,7 +29,7 @@ 'wizard:reset:confirm' => "Are you sure you wish to reset all users? This will force all users to re-do this wizard.", 'wizard:admin:repair_users' => "Remove new user flag", - 'wizard:admin:repair_users:title' => "Some users might see the 'New user' wizards, dispite being a member for a long time. This will fix that issue.", + 'wizard:admin:repair_users:title' => "Some users might see the 'New user' wizards, despite being a member for a long time. This will fix that issue.", // edit 'wizard:edit:time_restrictions' => 'Time restrictions', diff --git a/lib/functions.php b/lib/functions.php index 880bfad..9a82cf7 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -195,7 +195,7 @@ function wizard_replace_exit(string $text): string { function wizard_check_wizards(): ?\Wizard { $user = elgg_get_logged_in_user_entity(); if (!$user instanceof \ElggUser) { - // only logged in users + // only logged-in users return null; }