From cd7201e5ac4d8287419ec0649d14f7a5c3c1534e Mon Sep 17 00:00:00 2001 From: Ente Date: Thu, 4 Dec 2025 23:15:47 +0100 Subject: [PATCH 1/7] TT-207: v8.5.1 --- CHANGELOG.md | 7 ++++ README.md | 36 +++++++++++++++++-- VERSION | 2 +- api/v1/class/benutzer/benutzer.arbeit.inc.php | 7 ++-- api/v1/inc/app.json.sample | 4 +-- composer.json | 2 +- suite/users/settings.php | 3 +- 7 files changed, 51 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebf627..9f288f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # CHANGELOG +## v8.5.1 + +* Fixed undefined variable warning message +* Changed app.json.sample default values +* Updated README.md + ## v8.5 + * Fixed an issue with IDs not generated correctly for project items. * Added functionality to delete and edit project items. * Adding users to a project has been made easier. diff --git a/README.md b/README.md index e9172e7..76ef680 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,41 @@ Simply install the software by following these steps: - Create a new database, e.g. with the name `ab` and create a dedicated user, login (`mysql -u root -p`) then e.g. `timetool`: `CREATE DATABASE ab;` and `CREATE USER 'timetool'@'localhost' IDENTIFIED BY 'yourpassword';` and `GRANT ALL PRIVILEGES ON ab.* TO 'timetool'@'localhost';` don't forget to `FLUSH PRIVILEGES;`! - Configure `app.json` (see below - required changes: `base_url`, `db_user`, `db_password`, `smtp` section and any other if your installation is different) then `mv api/v1/inc/app.json.sample app.json && cd /var/www/timetrack` - Run DB migrations: `vendor/bin/phinx migrate` -- Start webserver e.g. `service apache2 stop && php -S 0.0.0.0:80` or using apache2 (then you have to configure the `sites-available` conf yourself) -- You can then access TimeTrack in your browser at `http://localhost`, default login is `admin` with password `admin`. Create yourself a new admin account, login and delete the default account afterwards. +- Follow "Use with ..." guides + +#### Use with apache2.4 + +- Create a new virtual host: `sudo nano /etc/apache2/sites-available/timetrack.conf` +- Content: + +```conf + + ServerName timetrack.yourdomain.de + DocumentRoot /var/www/timetrack + + + AllowOverride All + Require all granted + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + +``` + +- Enable site and module: `sudo a2ensite timetrack && a2enmod rewrite` + +#### Use with PHP development server + +- Start server: `cd /var/www/timetrack && php -S 0.0.0.0:80` + +#### Finalize + +You can now access TimeTrack in your browser at `http://localhost`, default login is `admin` with password `admin`. Create yourself a new admin account, login and delete the default account afterwards. To save log files, please create the subfolder `data/logs` and make it writeable to the web server (e.g. `chown www-data:www-data data/logs && chmod 775 data/logs`). -Please also make sure that the `/data` directory is writable by the webserver, aswell as the plugins directory (default: `api/v1/class/plugins/plugins`). +Please also make sure that the `/data` directory is writable by the webserver, aswell as the plugins directory (default: `api/v1/class/plugins/plugins`). The `/api/v1/toil/permissions.json` also needs to be writeable by the webserver. ### Configure app.json diff --git a/VERSION b/VERSION index 188c409..f9c71a5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.5 +8.5.1 diff --git a/api/v1/class/benutzer/benutzer.arbeit.inc.php b/api/v1/class/benutzer/benutzer.arbeit.inc.php index 7b567a0..d7dd5df 100644 --- a/api/v1/class/benutzer/benutzer.arbeit.inc.php +++ b/api/v1/class/benutzer/benutzer.arbeit.inc.php @@ -410,12 +410,15 @@ public function loadUserTheme() $themes = scandir($_SERVER["DOCUMENT_ROOT"] . "/assets/css"); $themes = array_diff($themes, [".", ".."]); + if(!isset($_COOKIE["theme"])){ + return "/assets/css/v8.css"; + } $check = in_array($_COOKIE["theme"], $themes); if ($this->get_app_ini()["general"]["force_theme"] == "true") { return $this->get_app_ini()["general"]["theme_file"]; } - if (!isset($_COOKIE["theme"]) || !$check) { + if (!$check) { return "/assets/css/v8.css"; } else { return "/assets/css/" . $_COOKIE["theme"]; @@ -446,7 +449,7 @@ public function setUserTheme($theme) public function checkThemeForce() { - if ($this->get_app_ini()["general"]["force_theme"] == "true" || $this->get_app_ini()["general"]["force_theme"] == true) { + if ($this->get_app_ini()["general"]["force_theme"] == true) { return true; } else { return false; diff --git a/api/v1/inc/app.json.sample b/api/v1/inc/app.json.sample index 785dbba..e4b05bf 100644 --- a/api/v1/inc/app.json.sample +++ b/api/v1/inc/app.json.sample @@ -7,9 +7,9 @@ "auto_update": "false", "timezone": "UTC", "theme_file": "/assets/css/v8.css", - "force_theme": "false", + "force_theme": false, "demo": false, - "telemetry": "enabled", + "telemetry": "disabled", "telemetry_server_url": "https://telemetry.openducks.org/timetrack/submit" }, "mysql": { diff --git a/composer.json b/composer.json index f518736..4e0b92d 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "TimeTrack is a PHP-written time recording tool for small businesses", "type": "software", "license": "GNU GPL", - "version": "8.5", + "version": "8.5.1", "authors": [ { "name": "Bryan Boehnke-Avan", diff --git a/suite/users/settings.php b/suite/users/settings.php index 94d8e0a..a8c9b3c 100644 --- a/suite/users/settings.php +++ b/suite/users/settings.php @@ -64,10 +64,11 @@