From e905d6ec07e04757eeebf37e5b36a063d65cd443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20de=20la=20Pen=CC=83a?= Date: Tue, 14 May 2024 16:24:49 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20Use=20MetaData=20service=E2=80=99s=20`?= =?UTF-8?q?getAppName`=20method=20rather=20than=20directly=20accessing=20c?= =?UTF-8?q?onfig=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Service/MetaData.php | 2 +- views/errors/html/401.php | 2 +- views/errors/html/404.php | 2 +- views/errors/html/500.php | 2 +- views/errors/html/maintenance.php | 2 +- views/structure/footer/nails-default.php | 2 +- views/structure/header/nails-default.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Common/Service/MetaData.php b/src/Common/Service/MetaData.php index 8a9093d98..f6b14a5f1 100644 --- a/src/Common/Service/MetaData.php +++ b/src/Common/Service/MetaData.php @@ -89,7 +89,7 @@ public function getTitles(): Service\MetaData\Collection array_filter([ $this->title, $this->isTitleAppendAppName() - ? Config::get('APP_NAME') + ? $this->getAppName() : null, ]) ) diff --git a/views/errors/html/401.php b/views/errors/html/401.php index 9c3cc9896..63d549abb 100644 --- a/views/errors/html/401.php +++ b/views/errors/html/401.php @@ -5,7 +5,7 @@ --> - 401 Unauthorised - <?=\Nails\Config::get('APP_NAME')?> + 401 Unauthorised - <?=\Nails\Factory::service('MetaData')->getAppName()?> - 404 Page Not Found - <?=\Nails\Config::get('APP_NAME')?> + 404 Page Not Found - <?=\Nails\Factory::service('MetaData')->getAppName()?> - An Error Occurred - <?=\Nails\Config::get('APP_NAME')?> + An Error Occurred - <?=Factory::service('MetaData')->getAppName()?> - Down For Maintenance - <?=\Nails\Config::get('APP_NAME')?> + Down For Maintenance - <?=\Nails\Factory::service('MetaData')->getAppName()?>

- © + © getAppName() . ' ' . date('Y')?>
diff --git a/views/structure/header/nails-default.php b/views/structure/header/nails-default.php index 2cacb39fe..923379f95 100644 --- a/views/structure/header/nails-default.php +++ b/views/structure/header/nails-default.php @@ -17,7 +17,7 @@

- + getAppName(), 'style="text-decoration:none;color:inherit;"')?>