From e96828b52a1651b7d316a359dc7979284fa2e20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Schl=C3=A4pfer?= Date: Wed, 27 Sep 2023 12:32:48 +0200 Subject: [PATCH] Cleanup & Spelling --- cspell.json | 1 + src/modules/Invoice/Controller/Client.php | 18 ++++++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/cspell.json b/cspell.json index 4bd83c3a1..f1ac5a679 100644 --- a/cspell.json +++ b/cspell.json @@ -357,6 +357,7 @@ "rulesets", "pwreset", "pagebottom", + "forceable", ], "ignorePaths": [ diff --git a/src/modules/Invoice/Controller/Client.php b/src/modules/Invoice/Controller/Client.php index 7bcd8657e..9c6bce3e0 100644 --- a/src/modules/Invoice/Controller/Client.php +++ b/src/modules/Invoice/Controller/Client.php @@ -55,10 +55,8 @@ class Client implements \FOSSBilling\InjectionAwareInterface $hash_access = $systemService->getParamValue('invoice_accessible_from_hash', '1'); // If hash_access is not 0 or if a client is logged in, get the logged-in client - if (!$this->di['auth']->isAdminLoggedIn()) { - if ($hash_access == '0') { - $this->redirectIfNotInvoiceBuyer($app, $invoice); - } + if (!$this->di['auth']->isAdminLoggedIn() && $hash_access == '0') { + $this->redirectIfNotInvoiceBuyer($app, $invoice); } return $app->render('mod_invoice_invoice', ['invoice' => $invoice]); } @@ -74,10 +72,8 @@ class Client implements \FOSSBilling\InjectionAwareInterface $hash_access = $systemService->getParamValue('invoice_accessible_from_hash', '1'); // If hash_access is not 0 or if a client is logged in, get the logged-in client - if (!$this->di['auth']->isAdminLoggedIn()) { - if ($hash_access == '0') { - $this->redirectIfNotInvoiceBuyer($app, $invoice); - } + if (!$this->di['auth']->isAdminLoggedIn() && $hash_access == '0') { + $this->redirectIfNotInvoiceBuyer($app, $invoice); } return $app->render('mod_invoice_print', ['invoice' => $invoice]); } @@ -120,10 +116,8 @@ class Client implements \FOSSBilling\InjectionAwareInterface $hash_access = $systemService->getParamValue('invoice_accessible_from_hash', '1'); // If hash_access is not 0 or if a client is logged in, get the logged-in client - if (!$this->di['auth']->isAdminLoggedIn()) { - if ($hash_access == '0') { - $this->redirectIfNotInvoiceBuyer($app, $invoice); - } + if (!$this->di['auth']->isAdminLoggedIn() && $hash_access == '0') { + $this->redirectIfNotInvoiceBuyer($app, $invoice); } return $app->render('mod_invoice_pdf', ['invoice' => $invoice]); }