From 1d26b8bfedb4ddfdb1a6db1737406a77d8d58b72 Mon Sep 17 00:00:00 2001 From: Rod Wright Date: Tue, 24 Feb 2026 21:06:26 -0500 Subject: [PATCH] Incorporated changes for release 1.4.4 --- CHANGELOG | 7 +++++ db.php.template | 2 +- distfiles/CHANGELOG | 7 +++++ distfiles/writeupdetail.php | 1 + install.sh | 2 +- opendrs-initial.sql | 2 +- opendrs-update.sh | 54 +++++++++++++++++++++++++++++++++++++ opendrs-update.sql | 5 ++++ 8 files changed, 77 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d1809b4..331f63f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -180,3 +180,10 @@ Changelog Open Writeups page entirely. The writeups page now shows all writeups for the selected date range, or today if no dates are specified. + +1.4.4 - 2025-12-10 + - Fixed bug in writeupdetail.php that emerged with installation on a + system using MariaDB-10.11.14. A fatal error occurred when + trying to insert a null value into the action_reason field of + the writeups table (you left the action reason dropdown blank). + Previous versions just left it as is without complaint. diff --git a/db.php.template b/db.php.template index cd2010e..968032e 100644 --- a/db.php.template +++ b/db.php.template @@ -26,7 +26,7 @@ function dberrmsg($dbname) { Could not connect to the $dbname database. Please ensure the MySQL server is running. If this is - the first time you have used OpenMTS, please consult the INSTALL file included in the distribution. + the first time you have used OpenDRS, please consult the INSTALL file included in the distribution. "; diff --git a/distfiles/CHANGELOG b/distfiles/CHANGELOG index d1809b4..331f63f 100644 --- a/distfiles/CHANGELOG +++ b/distfiles/CHANGELOG @@ -180,3 +180,10 @@ Changelog Open Writeups page entirely. The writeups page now shows all writeups for the selected date range, or today if no dates are specified. + +1.4.4 - 2025-12-10 + - Fixed bug in writeupdetail.php that emerged with installation on a + system using MariaDB-10.11.14. A fatal error occurred when + trying to insert a null value into the action_reason field of + the writeups table (you left the action reason dropdown blank). + Previous versions just left it as is without complaint. diff --git a/distfiles/writeupdetail.php b/distfiles/writeupdetail.php index 3b9c8f8..17ac3f2 100644 --- a/distfiles/writeupdetail.php +++ b/distfiles/writeupdetail.php @@ -146,6 +146,7 @@ elseif ($techsave) { $clean_action_text=mysqli_real_escape_string($drs_db,$action_text); // update the record in writeups + if ($action_reason=='') $action_reason=0; mysqli_query($drs_db,"update writeups set status=\"$status\",action_by=\"$action_by\",action_date=\"$action_date\",action_time=\"$action_time\",action_reason=\"$action_reason\",action_text=\"$clean_action_text\" where id=\"$id\""); } } diff --git a/install.sh b/install.sh index 00018a9..45caf13 100644 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ # SPDX-License-Identifier: GPL-2.0 -DRS_VERSION="1.4.3" +DRS_VERSION="1.4.4" DOC_ROOT="/var/www" INSTALL_LOC="opendrs" APACHE_USER="www-data" diff --git a/opendrs-initial.sql b/opendrs-initial.sql index eef8b31..4fc09c1 100644 --- a/opendrs-initial.sql +++ b/opendrs-initial.sql @@ -69,7 +69,7 @@ CREATE TABLE `config` ( LOCK TABLES `config` WRITE; /*!40000 ALTER TABLE `config` DISABLE KEYS */; INSERT INTO `config` VALUES -(1,'drs_version','1.4.3','1.4.3'), +(1,'drs_version','1.4.4','1.4.4'), (5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'), (6,'banner','1','1'), (7,'background_color','0B3144','0B3144'), diff --git a/opendrs-update.sh b/opendrs-update.sh index d04c78b..9103caf 100644 --- a/opendrs-update.sh +++ b/opendrs-update.sh @@ -1,8 +1,62 @@ +#!/bin/bash # opendrs-update.sh install_path=$1 +# ---------- version 1.0.0 ------------- +# Initial release +# -------------------------------------- + # ---------- version 1.1.0 ------------- # Change global database value from $mts_db to $drs_db sed -i "s/mts_db/drs_db/g" $install_path/db.php # --------------------------------------- + +# ---------- version 1.1.1 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.1.2 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.2.0 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.3.0 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.3.1 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.3.2 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.3.3 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.4.0 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.4.1 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.4.2 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.4.3 ------------- +# Nothing to do for this version +# -------------------------------------- + +# ---------- version 1.4.4 ------------- +# Nothing to do for this version +# -------------------------------------- + diff --git a/opendrs-update.sql b/opendrs-update.sql index bad751f..5d57bf9 100644 --- a/opendrs-update.sql +++ b/opendrs-update.sql @@ -265,3 +265,8 @@ UPDATE config SET value="1.4.2",defaultvalue="1.4.2" WHERE name="drs_version"; -- Update version number UPDATE config SET value="1.4.3",defaultvalue="1.4.3" WHERE name="drs_version"; -- -------------------------------------- + +-- ---------- version 1.4.4 ------------- +-- Update version number +UPDATE config SET value="1.4.4",defaultvalue="1.4.4" WHERE name="drs_version"; +-- --------------------------------------