fix: wrong folder for payment method logos (#227)
This commit is contained in:
parent
2ca8b82173
commit
f6c1ff2a6b
@ -136,9 +136,7 @@ If you want to trigger an Update of the exchange rates, change your main currenc
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||

|
 
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@ -183,14 +183,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO payment_methods (name, icon, enabled) VALUES (:name, :icon, :enabled)";
|
// Get the maximum existing ID
|
||||||
|
$stmt = $db->prepare("SELECT MAX(id) as maxID FROM payment_methods");
|
||||||
|
$result = $stmt->execute();
|
||||||
|
$row = $result->fetchArray(SQLITE3_ASSOC);
|
||||||
|
$maxID = $row['maxID'];
|
||||||
|
|
||||||
|
// Ensure the new ID is greater than 31
|
||||||
|
$newID = max($maxID + 1, 32);
|
||||||
|
|
||||||
|
// Insert the new record with the new ID
|
||||||
|
$sql = "INSERT INTO payment_methods (id, name, icon, enabled) VALUES (:id, :name, :icon, :enabled)";
|
||||||
$stmt = $db->prepare($sql);
|
$stmt = $db->prepare($sql);
|
||||||
|
|
||||||
|
$stmt->bindParam(':id', $newID, SQLITE3_INTEGER);
|
||||||
$stmt->bindParam(':name', $name, SQLITE3_TEXT);
|
$stmt->bindParam(':name', $name, SQLITE3_TEXT);
|
||||||
$stmt->bindParam(':icon', $icon, SQLITE3_TEXT);
|
$stmt->bindParam(':icon', $icon, SQLITE3_TEXT);
|
||||||
$stmt->bindParam(':enabled', $enabled, SQLITE3_INTEGER);
|
$stmt->bindParam(':enabled', $enabled, SQLITE3_INTEGER);
|
||||||
|
|
||||||
if ($stmt->execute()) {
|
if ($stmt->execute()) {
|
||||||
$success['success'] = true;
|
$success['success'] = true;
|
||||||
$success['message'] = translate('payment_method_added_successfuly', $i18n);
|
$success['message'] = translate('payment_method_added_successfuly', $i18n);
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
$version = "v1.16.1";
|
$version = "v1.16.2";
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user