Polish exception imports and invoice modal payload (#3891)

This commit is contained in:
Adam Daley authored and GitHub committed 2026-07-05 00:36:47 +01:00
1 parent 80c0322aeb
commit 2e97e7b710
6 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -27,9 +27,9 @@ class Box_AppAdmin extends Box_App
protected function checkPermission(): void
{
/**
/*
* Disable permission checks when an update is pending finalization.
*
*
* This is to make sure update finalization still works when there are changes to the
* permission system and patches need to be applied before everything starts working again.
*/
+2 -2
View File
@@ -58,9 +58,9 @@ final class Dispatcher implements InjectionAwareInterface
throw new Exception('FOSSBilling module :mod is not installed/activated', [':mod' => $mod], 715);
}
/**
/*
* Disable permission checks when an update is pending finalization.
*
*
* This is to make sure update finalization still works when there are changes to the
* permission system and patches need to be applied before everything starts working again.
*/
+1 -1
View File
@@ -535,7 +535,7 @@ class Service implements InjectionAwareInterface
}
if (!$client instanceof \Model_Client) {
throw new \FOSSBilling\InformationException('Client not found');
throw new InformationException('Client not found');
}
return $client;
+3 -3
View File
@@ -1472,14 +1472,14 @@ class Service implements InjectionAwareInterface
$invoice = $this->di['db']->findOne('Invoice', 'hash = ?', [$data['hash']]);
if (!$invoice instanceof \Model_Invoice) {
throw new \FOSSBilling\InformationException('Invoice not found', null, 812);
throw new InformationException('Invoice not found', null, 812);
}
$this->checkInvoiceAuth($invoice, InvoiceOperation::PAYMENT);
$gtw = $this->di['db']->load('PayGateway', $data['gateway_id']);
if (!$gtw instanceof \Model_PayGateway) {
throw new \FOSSBilling\InformationException('Payment method not found', null, 813);
throw new InformationException('Payment method not found', null, 813);
}
if (!$gtw->enabled) {
@@ -1547,7 +1547,7 @@ class Service implements InjectionAwareInterface
$invoice = $this->di['db']->findOne('Invoice', 'hash = :hash', [':hash' => $hash]);
if (!$invoice instanceof \Model_Invoice) {
throw new \FOSSBilling\InformationException('Invoice not found');
throw new InformationException('Invoice not found');
}
$this->checkInvoiceAuth($invoice, InvoiceOperation::READ);
@@ -153,6 +153,7 @@
</div>
<div class="modal-body">
<input type="hidden" name="id" value="{{ invoice.id }}">
<input type="hidden" name="execute" value="1">
<div class="d-flex flex-column gap-3">
<div>
<label class="form-label" for="transaction-id">{{ 'Transaction ID'|trans }}</label>
+1 -1
View File
@@ -279,7 +279,7 @@ class Service implements \FOSSBilling\InjectionAwareInterface
{
$model = $this->getMessageRepository()->find((int) $params['msg_id']);
if (!$model instanceof MassmailerMessage) {
throw new \FOSSBilling\InformationException('Mass mail message not found');
throw new InformationException('Mass mail message not found');
}
$this->sendMessage($model, (int) $params['client_id']);
}