From 1fe42c367a47fa126cc68e2b91f0fe1b3e42815d Mon Sep 17 00:00:00 2001 From: ahneale <82777010+ahneale@users.noreply.github.com> Date: Mon, 8 Apr 2024 07:18:01 +0100 Subject: [PATCH] Change namespace of `direct-links` (#57) * Update to fix Support direct links when enabled for new name of extension fof/direct-links Update to src/Api/Controllers/SendInvitesController.php to fix a problem with support of direct links when FoF Direct Links extension is enabled original extension name was: zerosonesfun/direct-links should reflect new extension name: fof/direct-links * fix: change namespace of `direct-links` * docs: adjust readme * style: run formatter --------- Co-authored-by: Davide Iadeluca --- README.md | 8 ++++---- composer.json | 2 +- src/Api/Controllers/SendInvitesController.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cd9cf05..27ba0d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Doorman by FriendsOfFlarum -[![GitLab license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/FriendsOfFlarum/doorman/blob/master/LICENSE.md) [![Latest Stable Version](https://img.shields.io/packagist/v/fof/doorman.svg)](https://github.com/FriendsOfFlarum/doorman) [![OpenCollective](https://img.shields.io/badge/opencollective-fof-blue.svg)](https://opencollective.com/fof/donate) +[![GitLab license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/FriendsOfFlarum/doorman/blob/master/LICENSE.md) [![Latest Stable Version](https://img.shields.io/packagist/v/fof/doorman.svg)](https://github.com/FriendsOfFlarum/doorman) [![OpenCollective](https://img.shields.io/badge/opencollective-fof-blue.svg)](https://opencollective.com/fof/donate) A [Flarum](http://flarum.org) extension that restricts sign-ups to user's who have a code created in the admin panel. @@ -9,7 +9,7 @@ Each code can be set to have a maximum number of uses, what group the user shoul ### Usage - Setup sign-up codes on the admin panel -- Includes optional support for [Direct Links](https://github.com/zerosonesfun/direct-links). When this extension is also enabled, email invites will include a link which will take the uew user directly to the signup modal, rather than the forum home page. +- Includes optional support for [Direct Links](https://github.com/FriendsOfFlarum/direct-links). When this extension is also enabled, email invites will include a link which will take the uew user directly to the signup modal, rather than the forum home page. ### Installation @@ -27,9 +27,9 @@ Then login and enable the extension. ### Issues -- [Open an issue on Github](https://github.com/FriendsOfFlarum/doorman/issues) +- [Open an issue on Github](https://github.com/FriendsOfFlarum/doorman/issues) ### Links - [On Github](https://github.com/FriendsOfFlarum/doorman) -- [On Packagist](https://packagist.org/packages/fof/doorman) \ No newline at end of file +- [On Packagist](https://packagist.org/packages/fof/doorman) diff --git a/composer.json b/composer.json index f599b1f..7bf2e01 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "discuss": "https://discuss.flarum.org/d/17845" }, "optional-dependencies": [ - "zerosonesfun/direct-links" + "fof/direct-links" ], "flarum-cli": { "modules": { diff --git a/src/Api/Controllers/SendInvitesController.php b/src/Api/Controllers/SendInvitesController.php index 0cb122b..c6b511e 100644 --- a/src/Api/Controllers/SendInvitesController.php +++ b/src/Api/Controllers/SendInvitesController.php @@ -96,7 +96,7 @@ protected function data(ServerRequestInterface $request, Document $document) $body = $this->translator->trans('fof-doorman.forum.email.body', [ '{forum}' => $title, - '{url}' => $this->extensions->isEnabled('zerosonesfun-direct-links') ? $this->url->to('forum')->route('direct-links-signup') : $this->url->to('forum')->base(), + '{url}' => $this->extensions->isEnabled('fof-direct-links') ? $this->url->to('forum')->route('direct-links-signup') : $this->url->to('forum')->base(), '{code}' => $doorkey->key, ]);