mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-05 22:54:33 +09:00
Apply PHP Code Styling & Quality Changes (#1649)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
This commit is contained in:
1 parent
f2f9701359
commit
76d89eb410
9 files changed
+27
-36
No files matched your search
@@ -58,6 +58,7 @@ class Client implements \FOSSBilling\InjectionAwareInterface
|
||||
if (!$this->di['auth']->isAdminLoggedIn() && $hash_access === '0') {
|
||||
$this->redirectIfNotInvoiceBuyer($app, $invoice);
|
||||
}
|
||||
|
||||
return $app->render('mod_invoice_invoice', ['invoice' => $invoice]);
|
||||
}
|
||||
|
||||
@@ -75,6 +76,7 @@ class Client implements \FOSSBilling\InjectionAwareInterface
|
||||
if (!$this->di['auth']->isAdminLoggedIn() && $hash_access === '0') {
|
||||
$this->redirectIfNotInvoiceBuyer($app, $invoice);
|
||||
}
|
||||
|
||||
return $app->render('mod_invoice_print', ['invoice' => $invoice]);
|
||||
}
|
||||
|
||||
@@ -119,15 +121,16 @@ class Client implements \FOSSBilling\InjectionAwareInterface
|
||||
if (!$this->di['auth']->isAdminLoggedIn() && $hash_access === '0') {
|
||||
$this->redirectIfNotInvoiceBuyer($app, $invoice);
|
||||
}
|
||||
return $app->render('mod_invoice_pdf', ['invoice' => $invoice]);
|
||||
}
|
||||
|
||||
public function redirectIfNotInvoiceBuyer($app, $invoice) {
|
||||
return $app->render('mod_invoice_pdf', ['invoice' => $invoice]);
|
||||
}
|
||||
|
||||
public function redirectIfNotInvoiceBuyer($app, $invoice)
|
||||
{
|
||||
$client = $this->di['loggedin_client'];
|
||||
if ($invoice['client']['id'] != $client->id) {
|
||||
// redirect to client invoices/invoice'));
|
||||
return $app->redirect('/invoice');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user