mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-04 14:13:52 +09:00
Very minor fixes (#2199)
* Resolve various errors * Fix a copy & paste error
This commit is contained in:
1 parent
a1323b4bcd
commit
9f7daf82eb
5 files changed
+18
-11
No files matched your search
@@ -84,7 +84,8 @@ class SentryHelper
|
||||
|
||||
// Array containing instance IDs that are blacklisted from error reporting and a timestamp of when their blacklist expires.
|
||||
private static array $blacklistedInstances = [
|
||||
'82766452-ff2f-43ff-953a-3cbe3c3973ea' => '2024-07-01',
|
||||
'82766452-ff2f-43ff-953a-3cbe3c3973ea' => '2024-07-01', // Low quality modifications causing lots of errors
|
||||
'fd26d5bc-95f4-4c9f-9807-28577f43c811' => '2024-05-01', // Low quality modifications causing lots of errors
|
||||
];
|
||||
|
||||
private static string $placeholderFirstHalf = '--replace--this--';
|
||||
|
||||
@@ -335,7 +335,7 @@ class Tools
|
||||
{
|
||||
$protocol = $_SERVER['HTTPS'] ?? $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? $_SERVER['REQUEST_SCHEME'] ?? '';
|
||||
|
||||
// $_SERVER['HTTPS'] will be set to `on` to indicate HTTPS and the other to will be set to `https`, so either one means we are connected via HTTPS.
|
||||
// $_SERVER['HTTPS'] will be set to `on` to indicate HTTPS and the others to will be set to `https`, so either one means we are connected via HTTPS.
|
||||
return strcasecmp($protocol, 'on') === 0 || strcasecmp($protocol, 'https') === 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,8 +129,8 @@ class ServicePayGateway implements InjectionAwareInterface
|
||||
if ($identity instanceof \Model_Admin) {
|
||||
$result['supports_one_time_payments'] = $single;
|
||||
$result['supports_subscriptions'] = $recurrent;
|
||||
if ($model->config) {
|
||||
$result['config'] = json_decode($model->config, 1);
|
||||
if (!empty($model->config) && json_validate($model->config)) {
|
||||
$result['config'] = json_decode($model->config, true);
|
||||
} else {
|
||||
$result['config'] = [];
|
||||
}
|
||||
|
||||
@@ -335,7 +335,11 @@ class Service implements InjectionAwareInterface
|
||||
$supportService = $this->di['mod_service']('support');
|
||||
|
||||
$data = $this->di['db']->toArray($model);
|
||||
$data['config'] = json_decode($model->config, 1);
|
||||
if (!empty($model->config) && json_validate($model->config)) {
|
||||
$data['config'] = json_decode($model->config, true);
|
||||
} else {
|
||||
$data['config'] = [];
|
||||
}
|
||||
$data['total'] = $this->getTotal($model);
|
||||
$data['title'] = $model->title;
|
||||
$data['meta'] = $this->di['db']->getAssoc('SELECT name, value FROM client_order_meta WHERE client_order_id = :id', [':id' => $model->id]);
|
||||
|
||||
@@ -535,8 +535,8 @@ class Service implements InjectionAwareInterface
|
||||
$result['status_url'] = $model->status_url;
|
||||
$result['max_accounts'] = $model->max_accounts;
|
||||
$result['manager'] = $model->manager;
|
||||
if (!is_null($model->config)) {
|
||||
$result['config'] = json_decode($model->config, 1);
|
||||
if (!empty($model->config) && json_validate($model->config)) {
|
||||
$result['config'] = json_decode($model->config, true);
|
||||
} else {
|
||||
$result['config'] = [];
|
||||
}
|
||||
@@ -776,8 +776,10 @@ class Service implements InjectionAwareInterface
|
||||
$config['host'] = $model->hostname;
|
||||
$config['port'] = $model->port;
|
||||
$config['config'] = [];
|
||||
if (!is_null($model->config)) {
|
||||
$config['config'] = json_decode($model->config, 1);
|
||||
if (!empty($model->config) && json_validate($model->config)) {
|
||||
$config['config'] = json_decode($model->config, true);
|
||||
} else {
|
||||
$config['config'] = [];
|
||||
}
|
||||
$config['secure'] = $model->secure;
|
||||
$config['username'] = $model->username;
|
||||
@@ -884,8 +886,8 @@ class Service implements InjectionAwareInterface
|
||||
$model->max_park = $data['max_park'] ?? $model->max_park;
|
||||
|
||||
/* add new config value to hosting plan */
|
||||
if ($model->config) {
|
||||
$config = json_decode($model->config, 1);
|
||||
if (!empty($model->config) && json_validate($model->config)) {
|
||||
$config = json_decode($model->config, true);
|
||||
} else {
|
||||
$config = [];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user