From d4b68d73a18a0f8bc73fe7c37aca5670f6175e6e Mon Sep 17 00:00:00 2001 From: Daniel Brendel Date: Mon, 1 Jul 2024 12:32:02 +0200 Subject: [PATCH] Resolves #222 --- README.md | 8 ++++---- app/models/PlantsModel.php | 2 +- launch.dnys | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f9e9553a..8fdd9312 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ via the admin section (e.g. environment settings, users, locations). ### Manual -In order to manually install HortusFox you need to first setup a PHP environment along with a MySQL database +In order to manually install HortusFox you need to first setup a PHP environment along with a MariaDB database and also Composer. Afterwards you can clone or download the repository. Then go to the root directory of the project and let Composer install the required dependencies. @@ -180,7 +180,7 @@ APP_GITHUB_URL="https://github.com/danielbrendel/hortusfox-web" # This must be set to true for the product to work in order to enable database connection DB_ENABLE=true -# Enter your hostname or IP address of your MySQL database server +# Enter your hostname or IP address of your MariaDB database server DB_HOST=localhost # Enter the database username @@ -192,7 +192,7 @@ DB_PASSWORD="" # Database connection port. Normally this doesn't need to be changed DB_PORT=3306 -# The actual database of your MySQL server to be used +# The actual database of your MariaDB server to be used DB_DATABASE=hortusfox # Database driver. This needs to be unaltered for now @@ -339,7 +339,7 @@ GET /cronjob/calendar/reminder?cronpw={your-auth-token} ## System requirements - PHP ^8.3 -- MySQL (10.4.27-MariaDB or similar) +- MariaDB ^11.4 - SMTP server for e-mailing - Docker with Docker-Compose for containerization diff --git a/app/models/PlantsModel.php b/app/models/PlantsModel.php index e7c370fa..f23444f1 100644 --- a/app/models/PlantsModel.php +++ b/app/models/PlantsModel.php @@ -243,7 +243,7 @@ public static function getHistory($year = null, $limit = null, $sorting = null, public static function getHistoryYears() { try { - return static::raw('SELECT DISTINCT YEAR(history_date) AS history_year FROM `' . self::tableName() . '` WHERE history = 1 AND history_date IS NOT NULL ORDER BY history_date DESC'); + return static::raw('SELECT DISTINCT YEAR(history_date) AS history_year FROM `' . self::tableName() . '` WHERE history = 1 AND history_date IS NOT NULL ORDER BY YEAR(history_date) DESC'); } catch (\Exception $e) { throw $e; } diff --git a/launch.dnys b/launch.dnys index 1298a4e1..5c844ab1 100644 --- a/launch.dnys +++ b/launch.dnys @@ -2,7 +2,7 @@ # # This script launches a local web environment and opens the default browser with the URL of the web app. # -# Requires AquaShell, Windows and Apache & MySQL (e.g. XAMPP installation) +# Requires AquaShell, Windows and Apache & MariaDB (e.g. XAMPP installation) # On first start you'll need to specify your paths to httpd and mysqld. #