From 9c881cc43908ccc88247f253fe083254376926c2 Mon Sep 17 00:00:00 2001 From: Carl Bennett Date: Mon, 2 Dec 2024 01:52:17 -0600 Subject: [PATCH] Move misc pages to Community namespace --- src/Controllers/Community/Credits.php | 34 ++++++++++++ src/Controllers/Community/Discord.php | 34 ++++++++++++ src/Controllers/Community/Donate.php | 27 ++++++++++ src/Controllers/Community/Legal.php | 54 +++++++++++++++++++ src/Controllers/Community/PrivacyPolicy.php | 31 +++++++++++ src/Controllers/Community/Welcome.php | 26 +++++++++ src/Controllers/Credits.php | 34 ------------ src/Controllers/Discord.php | 34 ------------ src/Controllers/Donate.php | 27 ---------- src/Controllers/Legal.php | 54 ------------------- src/Controllers/PrivacyPolicy.php | 31 ----------- src/Controllers/Welcome.php | 26 --------- src/Libraries/{ => Community}/Credits.php | 2 +- src/Models/Community/Credits.php | 25 +++++++++ src/Models/Community/Discord.php | 19 +++++++ src/Models/Community/Donate.php | 13 +++++ src/Models/Community/Legal.php | 21 ++++++++ src/Models/Community/PrivacyPolicy.php | 21 ++++++++ src/Models/Community/Welcome.php | 5 ++ src/Models/Credits.php | 13 ----- src/Models/Discord.php | 10 ---- src/Models/Donate.php | 8 --- src/Models/Legal.php | 11 ---- src/Models/PrivacyPolicy.php | 11 ---- src/Models/Welcome.php | 5 -- src/Templates/{ => Community}/Credits.phtml | 2 +- src/Templates/{ => Community}/Discord.phtml | 2 +- src/Templates/{ => Community}/Donate.phtml | 2 +- src/Templates/{ => Community}/Legal.phtml | 2 +- .../{ => Community}/PrivacyPolicy.phtml | 2 +- src/Templates/{ => Community}/Welcome.phtml | 2 +- src/Views/Community/CreditsHtml.php | 17 ++++++ src/Views/Community/DiscordHtml.php | 17 ++++++ src/Views/Community/DonateHtml.php | 17 ++++++ src/Views/Community/LegalHtml.php | 17 ++++++ src/Views/Community/LegalPlain.php | 17 ++++++ src/Views/Community/PrivacyPolicyHtml.php | 17 ++++++ src/Views/Community/WelcomeHtml.php | 17 ++++++ src/Views/CreditsHtml.php | 17 ------ src/Views/DiscordHtml.php | 17 ------ src/Views/DonateHtml.php | 17 ------ src/Views/LegalHtml.php | 17 ------ src/Views/LegalPlain.php | 17 ------ src/Views/PrivacyPolicyHtml.php | 17 ------ src/Views/WelcomeHtml.php | 17 ------ src/main.php | 16 +++--- 46 files changed, 444 insertions(+), 398 deletions(-) create mode 100644 src/Controllers/Community/Credits.php create mode 100644 src/Controllers/Community/Discord.php create mode 100644 src/Controllers/Community/Donate.php create mode 100644 src/Controllers/Community/Legal.php create mode 100644 src/Controllers/Community/PrivacyPolicy.php create mode 100644 src/Controllers/Community/Welcome.php delete mode 100644 src/Controllers/Credits.php delete mode 100644 src/Controllers/Discord.php delete mode 100644 src/Controllers/Donate.php delete mode 100644 src/Controllers/Legal.php delete mode 100644 src/Controllers/PrivacyPolicy.php delete mode 100644 src/Controllers/Welcome.php rename src/Libraries/{ => Community}/Credits.php (98%) create mode 100644 src/Models/Community/Credits.php create mode 100644 src/Models/Community/Discord.php create mode 100644 src/Models/Community/Donate.php create mode 100644 src/Models/Community/Legal.php create mode 100644 src/Models/Community/PrivacyPolicy.php create mode 100644 src/Models/Community/Welcome.php delete mode 100644 src/Models/Credits.php delete mode 100644 src/Models/Discord.php delete mode 100644 src/Models/Donate.php delete mode 100644 src/Models/Legal.php delete mode 100644 src/Models/PrivacyPolicy.php delete mode 100644 src/Models/Welcome.php rename src/Templates/{ => Community}/Credits.phtml (99%) rename src/Templates/{ => Community}/Discord.phtml (98%) rename src/Templates/{ => Community}/Donate.phtml (98%) rename src/Templates/{ => Community}/Legal.phtml (99%) rename src/Templates/{ => Community}/PrivacyPolicy.phtml (99%) rename src/Templates/{ => Community}/Welcome.phtml (98%) create mode 100644 src/Views/Community/CreditsHtml.php create mode 100644 src/Views/Community/DiscordHtml.php create mode 100644 src/Views/Community/DonateHtml.php create mode 100644 src/Views/Community/LegalHtml.php create mode 100644 src/Views/Community/LegalPlain.php create mode 100644 src/Views/Community/PrivacyPolicyHtml.php create mode 100644 src/Views/Community/WelcomeHtml.php delete mode 100644 src/Views/CreditsHtml.php delete mode 100644 src/Views/DiscordHtml.php delete mode 100644 src/Views/DonateHtml.php delete mode 100644 src/Views/LegalHtml.php delete mode 100644 src/Views/LegalPlain.php delete mode 100644 src/Views/PrivacyPolicyHtml.php delete mode 100644 src/Views/WelcomeHtml.php diff --git a/src/Controllers/Community/Credits.php b/src/Controllers/Community/Credits.php new file mode 100644 index 00000000..fbb74af5 --- /dev/null +++ b/src/Controllers/Community/Credits.php @@ -0,0 +1,34 @@ +model = new \BNETDocs\Models\Community\Credits(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; + $this->model->top_contributors_by_comments = CreditsLib::getTopContributorsByComments(); + $this->model->top_contributors_by_documents = CreditsLib::getTopContributorsByDocuments(); + $this->model->top_contributors_by_news_posts = CreditsLib::getTopContributorsByNewsPosts(); + $this->model->top_contributors_by_packets = CreditsLib::getTopContributorsByPackets(); + $this->model->top_contributors_by_servers = CreditsLib::getTopContributorsByServers(); + $this->model->total_users = CreditsLib::getTotalUsers(); + return true; + } +} diff --git a/src/Controllers/Community/Discord.php b/src/Controllers/Community/Discord.php new file mode 100644 index 00000000..d7c00484 --- /dev/null +++ b/src/Controllers/Community/Discord.php @@ -0,0 +1,34 @@ +model = new \BNETDocs\Models\Community\Discord(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $config = &\CarlBennett\MVC\Libraries\Common::$config->discord; + + $this->model->discord_server_id = $config->server_id; + $this->model->discord_url = \sprintf('https://discord.gg/%s', $config->invite_code); + $this->model->enabled = $config->enabled; + + $this->model->_responseCode = ($this->model->enabled ? HttpCode::HTTP_OK : HttpCode::HTTP_SERVICE_UNAVAILABLE); + return true; + } +} diff --git a/src/Controllers/Community/Donate.php b/src/Controllers/Community/Donate.php new file mode 100644 index 00000000..87afc22c --- /dev/null +++ b/src/Controllers/Community/Donate.php @@ -0,0 +1,27 @@ +model = new \BNETDocs\Models\Community\Donate(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $this->model->donations = \CarlBennett\MVC\Libraries\Common::$config->bnetdocs->donations; + $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; + return true; + } +} diff --git a/src/Controllers/Community/Legal.php b/src/Controllers/Community/Legal.php new file mode 100644 index 00000000..43a261c6 --- /dev/null +++ b/src/Controllers/Community/Legal.php @@ -0,0 +1,54 @@ +model = new \BNETDocs\Models\Community\Legal(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $privacy_contact = &\CarlBennett\MVC\Libraries\Common::$config->bnetdocs->privacy->contact; + $this->model->email_domain = $privacy_contact->email_domain; + $this->model->email_mailbox = $privacy_contact->email_mailbox; + + $this->model->license = \file_get_contents(self::LICENSE_FILE); + $this->model->license_version = \BNETDocs\Libraries\Core\VersionInfo::$version['bnetdocs'][3] ?? null; + + if (!\is_null($this->model->license_version)) + { + $this->model->license_version = \explode(' ', $this->model->license_version); + $this->model->license_version[1] = new DateTimeImmutable( + $this->model->license_version[1], new DateTimeZone('Etc/UTC') + ); + } + else + { + $this->model->license_version = []; + $this->model->license_version[0] = null; + $this->model->license_version[1] = new DateTimeImmutable( + '@' . \filemtime(self::LICENSE_FILE), new DateTimeZone('Etc/UTC') + ); + } + + $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; + return true; + } +} diff --git a/src/Controllers/Community/PrivacyPolicy.php b/src/Controllers/Community/PrivacyPolicy.php new file mode 100644 index 00000000..c48342c1 --- /dev/null +++ b/src/Controllers/Community/PrivacyPolicy.php @@ -0,0 +1,31 @@ +model = new \BNETDocs\Models\Community\PrivacyPolicy(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $privacy = &\CarlBennett\MVC\Libraries\Common::$config->bnetdocs->privacy; + $this->model->data_location = $privacy->data_location; + $this->model->email_domain = $privacy->contact->email_domain; + $this->model->email_mailbox = $privacy->contact->email_mailbox; + $this->model->organization = $privacy->organization; + $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; + return true; + } +} diff --git a/src/Controllers/Community/Welcome.php b/src/Controllers/Community/Welcome.php new file mode 100644 index 00000000..b096ec02 --- /dev/null +++ b/src/Controllers/Community/Welcome.php @@ -0,0 +1,26 @@ +model = new \BNETDocs\Models\Community\Welcome(); + } + + /** + * Invoked by the Router class to handle the request. + * + * @param array|null $args The optional route arguments and any captured URI arguments. + * @return boolean Whether the Router should invoke the configured View. + */ + public function invoke(?array $args): bool + { + $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; + return true; + } +} diff --git a/src/Controllers/Credits.php b/src/Controllers/Credits.php deleted file mode 100644 index e9fa847f..00000000 --- a/src/Controllers/Credits.php +++ /dev/null @@ -1,34 +0,0 @@ -model = new \BNETDocs\Models\Credits(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; - $this->model->top_contributors_by_comments = CreditsLib::getTopContributorsByComments(); - $this->model->top_contributors_by_documents = CreditsLib::getTopContributorsByDocuments(); - $this->model->top_contributors_by_news_posts = CreditsLib::getTopContributorsByNewsPosts(); - $this->model->top_contributors_by_packets = CreditsLib::getTopContributorsByPackets(); - $this->model->top_contributors_by_servers = CreditsLib::getTopContributorsByServers(); - $this->model->total_users = CreditsLib::getTotalUsers(); - return true; - } -} diff --git a/src/Controllers/Discord.php b/src/Controllers/Discord.php deleted file mode 100644 index 7b4fcf10..00000000 --- a/src/Controllers/Discord.php +++ /dev/null @@ -1,34 +0,0 @@ -model = new \BNETDocs\Models\Discord(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $config = &\CarlBennett\MVC\Libraries\Common::$config->discord; - - $this->model->discord_server_id = $config->server_id; - $this->model->discord_url = \sprintf('https://discord.gg/%s', $config->invite_code); - $this->model->enabled = $config->enabled; - - $this->model->_responseCode = ($this->model->enabled ? HttpCode::HTTP_OK : HttpCode::HTTP_SERVICE_UNAVAILABLE); - return true; - } -} diff --git a/src/Controllers/Donate.php b/src/Controllers/Donate.php deleted file mode 100644 index 4659eac8..00000000 --- a/src/Controllers/Donate.php +++ /dev/null @@ -1,27 +0,0 @@ -model = new \BNETDocs\Models\Donate(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $this->model->donations = \CarlBennett\MVC\Libraries\Common::$config->bnetdocs->donations; - $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; - return true; - } -} diff --git a/src/Controllers/Legal.php b/src/Controllers/Legal.php deleted file mode 100644 index 2d2a174e..00000000 --- a/src/Controllers/Legal.php +++ /dev/null @@ -1,54 +0,0 @@ -model = new \BNETDocs\Models\Legal(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $privacy_contact = &\CarlBennett\MVC\Libraries\Common::$config->bnetdocs->privacy->contact; - $this->model->email_domain = $privacy_contact->email_domain; - $this->model->email_mailbox = $privacy_contact->email_mailbox; - - $this->model->license = \file_get_contents(self::LICENSE_FILE); - $this->model->license_version = \BNETDocs\Libraries\Core\VersionInfo::$version['bnetdocs'][3] ?? null; - - if (!\is_null($this->model->license_version)) - { - $this->model->license_version = \explode(' ', $this->model->license_version); - $this->model->license_version[1] = new DateTimeImmutable( - $this->model->license_version[1], new DateTimeZone('Etc/UTC') - ); - } - else - { - $this->model->license_version = []; - $this->model->license_version[0] = null; - $this->model->license_version[1] = new DateTimeImmutable( - '@' . \filemtime(self::LICENSE_FILE), new DateTimeZone('Etc/UTC') - ); - } - - $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; - return true; - } -} diff --git a/src/Controllers/PrivacyPolicy.php b/src/Controllers/PrivacyPolicy.php deleted file mode 100644 index b7c354a3..00000000 --- a/src/Controllers/PrivacyPolicy.php +++ /dev/null @@ -1,31 +0,0 @@ -model = new \BNETDocs\Models\PrivacyPolicy(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $privacy = &\CarlBennett\MVC\Libraries\Common::$config->bnetdocs->privacy; - $this->model->data_location = $privacy->data_location; - $this->model->email_domain = $privacy->contact->email_domain; - $this->model->email_mailbox = $privacy->contact->email_mailbox; - $this->model->organization = $privacy->organization; - $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; - return true; - } -} diff --git a/src/Controllers/Welcome.php b/src/Controllers/Welcome.php deleted file mode 100644 index 46e466be..00000000 --- a/src/Controllers/Welcome.php +++ /dev/null @@ -1,26 +0,0 @@ -model = new \BNETDocs\Models\Welcome(); - } - - /** - * Invoked by the Router class to handle the request. - * - * @param array|null $args The optional route arguments and any captured URI arguments. - * @return boolean Whether the Router should invoke the configured View. - */ - public function invoke(?array $args): bool - { - $this->model->_responseCode = \BNETDocs\Libraries\Core\HttpCode::HTTP_OK; - return true; - } -} diff --git a/src/Libraries/Credits.php b/src/Libraries/Community/Credits.php similarity index 98% rename from src/Libraries/Credits.php rename to src/Libraries/Community/Credits.php index 273efa37..97102684 100644 --- a/src/Libraries/Credits.php +++ b/src/Libraries/Community/Credits.php @@ -1,6 +1,6 @@ $this->top_contributors_by_comments, + 'top_contributors_by_documents' => $this->top_contributors_by_documents, + 'top_contributors_by_news_posts' => $this->top_contributors_by_news_posts, + 'top_contributors_by_packets' => $this->top_contributors_by_packets, + 'top_contributors_by_servers' => $this->top_contributors_by_servers, + 'total_users' => $this->total_users, + ]); + } +} diff --git a/src/Models/Community/Discord.php b/src/Models/Community/Discord.php new file mode 100644 index 00000000..b8a44dd8 --- /dev/null +++ b/src/Models/Community/Discord.php @@ -0,0 +1,19 @@ + $this->discord_server_id, + 'discord_url' => $this->discord_url, + 'enabled' => $this->enabled, + ]); + } +} diff --git a/src/Models/Community/Donate.php b/src/Models/Community/Donate.php new file mode 100644 index 00000000..b51995fd --- /dev/null +++ b/src/Models/Community/Donate.php @@ -0,0 +1,13 @@ + $this->donations]); + } +} diff --git a/src/Models/Community/Legal.php b/src/Models/Community/Legal.php new file mode 100644 index 00000000..6f157899 --- /dev/null +++ b/src/Models/Community/Legal.php @@ -0,0 +1,21 @@ + $this->email_domain, + 'email_mailbox' => $this->email_mailbox, + 'license' => $this->license, + 'license_version' => $this->license_version, + ]); + } +} diff --git a/src/Models/Community/PrivacyPolicy.php b/src/Models/Community/PrivacyPolicy.php new file mode 100644 index 00000000..2919cf8a --- /dev/null +++ b/src/Models/Community/PrivacyPolicy.php @@ -0,0 +1,21 @@ + $this->data_location, + 'email_domain' => $this->email_domain, + 'email_mailbox' => $this->email_mailbox, + 'organization' => $this->organization, + ]); + } +} diff --git a/src/Models/Community/Welcome.php b/src/Models/Community/Welcome.php new file mode 100644 index 00000000..96a59646 --- /dev/null +++ b/src/Models/Community/Welcome.php @@ -0,0 +1,5 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/DiscordHtml.php b/src/Views/Community/DiscordHtml.php new file mode 100644 index 00000000..28b998b3 --- /dev/null +++ b/src/Views/Community/DiscordHtml.php @@ -0,0 +1,17 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/DonateHtml.php b/src/Views/Community/DonateHtml.php new file mode 100644 index 00000000..9794d9b7 --- /dev/null +++ b/src/Views/Community/DonateHtml.php @@ -0,0 +1,17 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/LegalHtml.php b/src/Views/Community/LegalHtml.php new file mode 100644 index 00000000..5131005b --- /dev/null +++ b/src/Views/Community/LegalHtml.php @@ -0,0 +1,17 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/LegalPlain.php b/src/Views/Community/LegalPlain.php new file mode 100644 index 00000000..a48c448f --- /dev/null +++ b/src/Views/Community/LegalPlain.php @@ -0,0 +1,17 @@ +license; + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/PrivacyPolicyHtml.php b/src/Views/Community/PrivacyPolicyHtml.php new file mode 100644 index 00000000..cb77d479 --- /dev/null +++ b/src/Views/Community/PrivacyPolicyHtml.php @@ -0,0 +1,17 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/Community/WelcomeHtml.php b/src/Views/Community/WelcomeHtml.php new file mode 100644 index 00000000..c2d598e4 --- /dev/null +++ b/src/Views/Community/WelcomeHtml.php @@ -0,0 +1,17 @@ +invoke(); + $model->_responseHeaders['Content-Type'] = self::mimeType(); + } +} diff --git a/src/Views/CreditsHtml.php b/src/Views/CreditsHtml.php deleted file mode 100644 index f8afbdfb..00000000 --- a/src/Views/CreditsHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/DiscordHtml.php b/src/Views/DiscordHtml.php deleted file mode 100644 index 0e824f6a..00000000 --- a/src/Views/DiscordHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/DonateHtml.php b/src/Views/DonateHtml.php deleted file mode 100644 index 2a487d27..00000000 --- a/src/Views/DonateHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/LegalHtml.php b/src/Views/LegalHtml.php deleted file mode 100644 index f9640c38..00000000 --- a/src/Views/LegalHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/LegalPlain.php b/src/Views/LegalPlain.php deleted file mode 100644 index f7ca5d74..00000000 --- a/src/Views/LegalPlain.php +++ /dev/null @@ -1,17 +0,0 @@ -license; - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/PrivacyPolicyHtml.php b/src/Views/PrivacyPolicyHtml.php deleted file mode 100644 index 4efd0347..00000000 --- a/src/Views/PrivacyPolicyHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/Views/WelcomeHtml.php b/src/Views/WelcomeHtml.php deleted file mode 100644 index 8ac01ac5..00000000 --- a/src/Views/WelcomeHtml.php +++ /dev/null @@ -1,17 +0,0 @@ -invoke(); - $model->_responseHeaders['Content-Type'] = self::mimeType(); - } -} diff --git a/src/main.php b/src/main.php index 2f586a51..86cd1160 100644 --- a/src/main.php +++ b/src/main.php @@ -54,8 +54,8 @@ function main(): void ['#^/comment/create/?$#', 'Comment\\Create', ['Comment\\CreateJson']], ['#^/comment/delete/?$#', 'Comment\\Delete', ['Comment\\DeleteHtml']], ['#^/comment/edit/?$#', 'Comment\\Edit', ['Comment\\EditHtml']], - ['#^/credits/?$#', 'Credits', ['CreditsHtml']], - ['#^/discord/?$#', 'Discord', ['DiscordHtml']], + ['#^/credits/?$#', 'Community\\Credits', ['Community\\CreditsHtml']], + ['#^/discord/?$#', 'Community\\Discord', ['Community\\DiscordHtml']], ['#^/document/(\d+)/?.*\.html?$#', 'Document\\View', ['Document\\ViewHtml']], ['#^/document/(\d+)/?.*\.json$#', 'Document\\View', ['Document\\ViewJson']], ['#^/document/(\d+)/?.*\.txt$#', 'Document\\View', ['Document\\ViewPlain']], @@ -66,12 +66,12 @@ function main(): void ['#^/document/index/?$#', 'Document\\Index', ['Document\\IndexHtml', 'Document\\IndexJson']], ['#^/document/index\.html?$#', 'Document\\Index', ['Document\\IndexHtml']], ['#^/document/index\.json$#', 'Document\\Index', ['Document\\IndexJson']], - ['#^/donate/?$#', 'Donate', ['DonateHtml']], + ['#^/donate/?$#', 'Community\\Donate', ['Community\\DonateHtml']], ['#^/eventlog/index/?$#', 'EventLog\\Index', ['EventLog\\IndexHtml']], ['#^/eventlog/view/?$#', 'EventLog\\View', ['EventLog\\ViewHtml']], - ['#^/legal/?$#', 'Legal', ['LegalHtml', 'LegalPlain']], - ['#^/legal\.html?$#', 'Legal', ['LegalHtml']], - ['#^/legal\.txt$#', 'Legal', ['LegalPlain']], + ['#^/legal/?$#', 'Community\\Legal', ['Community\\LegalHtml', 'Community\\LegalPlain']], + ['#^/legal\.html?$#', 'Community\\Legal', ['Community\\LegalHtml']], + ['#^/legal\.txt$#', 'Community\\Legal', ['Community\\LegalPlain']], ['#^/news/?$#', 'News\\Index', ['News\\IndexHtml', 'News\\IndexRSS'], false], ['#^/news/(\d+)/?.*\.html?$#', 'News\\View', ['News\\ViewHtml']], ['#^/news/(\d+)/?.*\.json$#', 'News\\View', ['News\\ViewJson']], @@ -98,7 +98,7 @@ function main(): void ['#^/packet/index\.php$#', 'Packet\\Index', ['Packet\\IndexPhp'], true], ['#^/packet/index\.vb$#', 'Packet\\Index', ['Packet\\IndexVb'], true], ['#^/phpinfo/?$#', 'Core\\PhpInfo', ['Core\\PhpInfoHtml']], - ['#^/privacy(?:/|\.html?)?$#', 'PrivacyPolicy', ['PrivacyPolicyHtml']], + ['#^/privacy(?:/|\.html?)?$#', 'Community\\PrivacyPolicy', ['Community\\PrivacyPolicyHtml']], ['#^/robots\.txt$#', 'Core\\Robotstxt', ['Core\\Robotstxt']], ['#^/server/(\d+)/?.*\.html?$#', 'Server\\View', ['Server\\ViewHtml']], ['#^/server/(\d+)/?.*\.json$#', 'Server\\View', ['Server\\ViewJson']], @@ -127,7 +127,7 @@ function main(): void ['#^/user/resetpassword/?$#', 'User\\ResetPassword', ['User\\ResetPasswordHtml']], ['#^/user/update/?$#', 'User\\Update', ['User\\UpdateHtml']], ['#^/user/verify/?$#', 'User\\Verify', ['User\\VerifyHtml']], - ['#^/welcome/?$#', 'Welcome', ['WelcomeHtml']], + ['#^/welcome/?$#', 'Community\\Welcome', ['Community\\WelcomeHtml']], ]; Router::$route_not_found = ['Core\\NotFound', ['Core\\NotFoundHtml', 'Core\\NotFoundJson', 'Core\\NotFoundPlain']];