From 9ca3827a2e35957a5cc46783b10f3debd4528da1 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Tue, 6 Aug 2024 21:58:56 +0200 Subject: [PATCH] fix: deprecation message for null value --- admin.php | 8 ++++++-- includes/version.php | 2 +- index.php | 20 +++++++++++++------- migrations/000025.php | 2 +- scripts/admin.js | 3 +++ 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/admin.php b/admin.php index 365221948..414de6ca8 100644 --- a/admin.php +++ b/admin.php @@ -237,8 +237,12 @@ class="one-third" value="" /> \ No newline at end of file diff --git a/index.php b/index.php index 0d00cd308..b35fa6d55 100644 --- a/index.php +++ b/index.php @@ -73,12 +73,17 @@
-
- : -
- +
+ : +
+ @@ -219,7 +224,8 @@ id="sort-category_id">
  • onClick="setSortOption('payment_method_id')" id="sort-payment_method_id"> -
  • + + diff --git a/migrations/000025.php b/migrations/000025.php index f46f4a52c..26d0afdbc 100644 --- a/migrations/000025.php +++ b/migrations/000025.php @@ -14,7 +14,7 @@ $columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false; if ($columnRequired) { - $db->exec('ALTER TABLE admin ADD COLUMN latest_version TEXT'); + $db->exec("ALTER TABLE admin ADD COLUMN latest_version TEXT DEFAULT 'v2.21.1'"); } $columnQuery = $db->query("SELECT * FROM pragma_table_info('admin') where name='update_notification'"); diff --git a/scripts/admin.js b/scripts/admin.js index 2d89161b3..8a267515a 100644 --- a/scripts/admin.js +++ b/scripts/admin.js @@ -305,6 +305,9 @@ function toggleUpdateNotification() { .then(data => { if (data.success) { showSuccessMessage(data.message); + if (notificationEnabled === 1) { + fetch('endpoints/cronjobs/checkforupdates.php'); + } } else { showErrorMessage(data.message); }