fix: undefined var if sort cookie is not set (#207)
This commit is contained in:
parent
9fd353fc3f
commit
288c106245
@ -16,11 +16,11 @@
|
||||
|
||||
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) {
|
||||
$sort = "next_payment";
|
||||
$order = "ASC";
|
||||
$sql = "SELECT * FROM subscriptions ORDER BY next_payment ASC, inactive ASC";
|
||||
if (isset($_COOKIE['sortOrder']) && $_COOKIE['sortOrder'] != "") {
|
||||
$sort = $_COOKIE['sortOrder'];
|
||||
$allowedSortCriteria = ['name', 'id', 'next_payment', 'price', 'payer_user_id', 'category_id', 'payment_method_id'];
|
||||
$order = "ASC";
|
||||
if ($sort == "price" || $sort == "id") {
|
||||
$order = "DESC";
|
||||
}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
$version = "v1.15.0";
|
||||
$version = "v1.15.1";
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user