diff --git a/CHANGELOG b/CHANGELOG
index 302084b..a2b1f27 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -95,3 +95,31 @@ Changelog
1.3.1 - 2022-05-11
- Updated installation scripts and instructions to reflect changes in
Raspberry Pi OS Release 2022-04-04.
+
+1.3.2 - 2022-08-08
+ - Fixed typo in dbadmin.php that prevented adding new When Discovered
+ items.
+ - Fixed bug in create.php that prevented the page from working.
+ - Fixed bug in config.php that prevented banners from being modified.
+ - Fixed bug where action_by and action_reason were not preselected for
+ subsequent searches in search.php.
+ - Fixed bug in about.php and gpl.php that still used old $mts_db
+ database handle.
+ - Removed the server session directory option in config.php
+ Miscellaneous settings. For this to make sense, you'd have to have
+ shell access to the server and if that's the case, you'd be able
+ to make the necessary database changes as well.
+ - Fixed opendrs-initial.sql to make the default banner colors match
+ the ones in common.php.
+ - Created changelog.php for use by the "changes" link on the About
+ page so kiosk terminal users don't get dead-ended in the CHANGELOG
+ text file with no way to get back to the app.
+ - Extensive code cleanups/updates in all php files to make application
+ compatible with php8 and eliminate php warnings in apache2 error
+ log file.
+ - For Raspberry Pi:
+ - Updated server-setup.sh to attempt to install the php-mysqli package
+ for compatibility with php8.
+ - Chromium browser will use the printer designated as the local
+ default if it is selected as such in the Cups printer
+ configuration.
diff --git a/RPiSetup/server-setup.sh b/RPiSetup/server-setup.sh
index 2edaea3..e46c05f 100644
--- a/RPiSetup/server-setup.sh
+++ b/RPiSetup/server-setup.sh
@@ -71,6 +71,7 @@ echo ""
echo ""
echo ""
apt install -y apache2 php mariadb-server phpmyadmin uuid-runtime
+apt install -y php-mysqli
cp etc/apache2/mods-available/alias.conf /etc/apache2/mods-available
service apache2 restart
echo "...done."
diff --git a/RPiSetup/terminal-setup.sh b/RPiSetup/terminal-setup.sh
index b3695be..e0482ab 100644
--- a/RPiSetup/terminal-setup.sh
+++ b/RPiSetup/terminal-setup.sh
@@ -176,11 +176,14 @@ echo ""
echo ""
echo "Terminal setup complete."
echo ""
-echo "If you would like to use this terminal as a DRS server, after rebooting"
-echo "and logging back in, change directory to the extracted distribution's"
-echo "RPiSetup directory, and run:"
-echo " sudo ./server-setup.sh"
-echo ""
+if [ "$conftype" = "Terminal" ]
+then
+ echo "If you would like to use this terminal as a DRS server, after rebooting"
+ echo "and logging back in, change directory to the extracted distribution's"
+ echo "RPiSetup directory, and run:"
+ echo " sudo ./server-setup.sh"
+ echo ""
+fi
echo ""
echo "A reboot is required to start using this terminal."
echo -n "Would you like to reboot now? [Y/n]: "
diff --git a/TODO.txt b/TODO.txt
index 78703a3..d605ec2 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,18 +1,11 @@
TODO
-- Fix search.php to validate action taken date and time entries
-
-- Fix occurrences of $mts_db (should be $drs_db)in about.php and gpl.php
-
- Add ability to save/restore configuration.
- Add ability to backup/restore writeups.
-- Get Chromium to remember printer selection across reboots.
+- Add a $border_visible debug variable to the end of settings.php and
+ use it wherever there's a "border=\"0\"" to be able to see and fix
+ table layout issues.
-- Fix default banner colors in opendrs-initial.sql to match the ones shown in common.php.
-
-- Fix failure to preselect "action taken by" users on the search page for subsequent searches.
-
-- $border_visible debug variable to the end of settings.php and use it wherever there's a
- "border=\"0\"" to be able to see and fix table layout issues.
+- Automate installation on servers running Nginx as well as Apache.
diff --git a/boilerplate.php b/boilerplate.php
index 5a857ec..47890d5 100644
--- a/boilerplate.php
+++ b/boilerplate.php
@@ -8,6 +8,11 @@
*/
include("common.php");
+if (array_key_exists('print',$_REQUEST)) {
+ $print=true;
+} else {
+ $print=false;
+}
// redirect to index.php on cancel button press
if ($_REQUEST['cancel']) {
@@ -18,38 +23,46 @@ if ($_REQUEST['cancel']) {
}
// import session variables
-if (isset($_SESSION['userid'])) $userid=$_SESSION['userid'];
+if (isset($_SESSION['userid'])) {
+ $userid=$_SESSION['userid'];
+} else {
+ $userid=NULL;
+}
// import incoming arrays
-$print=$_REQUEST['print'];
if ($print) {
// if printer friendly was clicked, values will be passed in serialized
- // form as "all_parameters" so we need to load those into $incoming
+ // form as "all_parameters" so we need to load those into $incoming[]
$incoming=unserialize($_REQUEST['all_parameters']);
+
} else {
- // copy $_REQUEST to $incoming
+ // copy $_REQUEST[] to $incoming[]
$incoming=arrayCopy($_REQUEST);
}
-// load variables from incoming array
-
-
-// define local functions
-
-
+// extract incoming array keys into variables
+extract($incoming, EXTR_SKIP);
+/*
+ * possible keys are:
+ *
+ */
+
// assign variables from constants
$appname=APP_NAME;
-if ($print=="Printer Friendly") {
- $sbcolor=P_SIDEBAR_COLOR;
+if ($print) {
$mbgcolor=P_MENUBG_COLOR;
} else {
- $sbcolor=SIDEBAR_COLOR;
$mbgcolor=MENUBG_COLOR;
}
$role=dblookup($drs_db,"users","id","role",$userid);
+// define local functions
+
+
+
+
framework("begin","$appname","Boilerplate Page",$print);
//echo "_REQUEST array
";
diff --git a/distfiles/CHANGELOG b/distfiles/CHANGELOG
index 98c8823..ce3c49c 100644
--- a/distfiles/CHANGELOG
+++ b/distfiles/CHANGELOG
@@ -95,3 +95,31 @@ Changelog
1.3.1 - 2022-05-11
- Updated installation scripts and instructions to reflect changes in
Raspberry Pi OS Release 2022-04-04.
+
+1.3.2 - 2022-08-08
+ - Fixed typo in dbadmin.php that prevented adding new When Discovered
+ items.
+ - Fixed bug in create.php that prevented the page from working.
+ - Fixed bug in config.php that prevented banners from being modified.
+ - Fixed bug where action_by and action_reason were not preselected for
+ subsequent searches in search.php.
+ - Fixed bug in about.php and gpl.php that still used old $mts_db
+ database handle.
+ - Removed the server session directory option in config.php
+ Miscellaneous settings. For this to make sense, you'd have to have
+ shell access to the server and if that's the case, you'd be able
+ to make the necessary database changes as well.
+ - Fixed opendrs-initial.sql to make the default banner colors match
+ the ones in common.php.
+ - Created changelog.php for use by the "changes" link on the About
+ page so kiosk terminal users don't get dead-ended in the CHANGELOG
+ text file with no way to get back to the app.
+ - Extensive code cleanups/updates in all php files to make application
+ compatible with php8 and eliminate php warnings in apache2 error
+ log file.
+ - For Raspberry Pi:
+ - Updated server-setup.sh to attempt to install the php-mysqli package
+ for compatibility with php8.
+ - Chromium browser will use the printer designated as the local
+ default if it is selected as such in the Cups printer
+ configuration.
diff --git a/distfiles/about.php b/distfiles/about.php
index 0686df9..cb683e3 100644
--- a/distfiles/about.php
+++ b/distfiles/about.php
@@ -8,9 +8,14 @@
*/
include("common.php");
+if (array_key_exists('print',$_REQUEST)) {
+ $print=true;
+} else {
+ $print=false;
+}
// redirect to index.php on cancel button press
-if ($_REQUEST['cancel']) {
+if (array_key_exists('cancel',$_REQUEST)) {
header("Cache-Control:no-cache, must-revalidate");
header("Pragma:no-cache");
header("Location:index.php");
@@ -21,7 +26,6 @@ if ($_REQUEST['cancel']) {
if (isset($_SESSION['userid'])) $userid=$_SESSION['userid'];
// import incoming arrays
-$print=$_REQUEST['print'];
if ($print) {
// if printer friendly was clicked, values will be passed in serialized
// form as "all_parameters" so we need to load those into $incoming
@@ -31,7 +35,7 @@ if ($print) {
$incoming=arrayCopy($_REQUEST);
}
-// load variables from incoming array
+// extract incoming array keys into variables
// define local functions
@@ -42,14 +46,12 @@ $appname=APP_NAME;
$drs_version=DRS_VERSION;
if ($print=="Printer Friendly") {
- $sbcolor=P_SIDEBAR_COLOR;
$mbgcolor=P_MENUBG_COLOR;
} else {
- $sbcolor=SIDEBAR_COLOR;
$mbgcolor=MENUBG_COLOR;
}
-$role=dblookup($mts_db,"users","id","role",$userid);
+$role=dblookup($drs_db,"users","id","role",$userid);
framework("begin","$appname","About OpenDRS",$print);
@@ -85,7 +87,7 @@ OpenDRS is a simple online maintenance tracking/discrepancy reporting applicatio
view, and search writeups. The look and feel of the OpenDRS pages are easily changed.
Settings that affect all users can be changed in the Admin Functions menu. User specific settings can be changed in the
My Profile menu. No browser specific HTML is used in OpenDRS, so it should be useable in any browser, and it has been
-tested using Google Chrome, Mozilla Firefox and Microsoft Internet Explorer.
+tested using Google Chrome, Mozilla Firefox, Microsoft Internet Explorer, and Microsoft Edge.
OpenDRS is highly flexible. Instructions are included in the distribution for creating a user terminal with a Raspberry Pi. OpenDRS can be hosted on a @@ -93,7 +95,7 @@ centralized server, accessed by networked PCs and/or Raspberry Pi terminals. It terminal as a non-networked standalone system or in a small network of Raspberry Pi terminals.
-To read about the changes in this latest version of OpenDRS, click on the link or see the CHANGELOG file in the distribution. +To read about the changes in this latest version of OpenDRS, click on the link or see the CHANGELOG file in the distribution.
Several pieces of Open Source software make OpenDRS possible.
diff --git a/distfiles/changelog.php b/distfiles/changelog.php
new file mode 100644
index 0000000..c103fce
--- /dev/null
+++ b/distfiles/changelog.php
@@ -0,0 +1,92 @@
+";
+//var_dump($_REQUEST);
+//echo "
+";
+echo file_get_contents("CHANGELOG");
+echo "
+
+";
+
+echo "|
|