diff --git a/CHANGELOG b/CHANGELOG index 67e3ec8..5fe8f9a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -75,3 +75,19 @@ Changelog - Added ability to customize the terminology used for Device, Period, and Effective/Non-effective to make OpenDRS usable in a wider range of applications. + +1.3.0 - 2022-03-05 + - Made several improvements to group functionality. The Writeup Groups + page now displays all groups in a table instead of individually + expandable sections. On the View Writeups and View Open Writeups + pages, if a writeup is a member of only one group, clicking the + icon will take you to the page for that group. If a writeup is + a member of multiple groups, clicking the icon will take you to + the detail page for that writeup where you can view or modify which + groups the writeup is a member of. On the Search page, you can + now choose which group(s) the results should include. + - Made some improvements to the installation process for Raspberry Pi + setup to accomodate the latest version of Raspberry Pi OS. + - If setting up as a Raspberry Pi terminal/server, included the option + to make the terminal a wireless access point if it connects to an + ethernet network. diff --git a/RPiSetup/ap-setup.sh b/RPiSetup/ap-setup.sh new file mode 100644 index 0000000..7ece8e7 --- /dev/null +++ b/RPiSetup/ap-setup.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# Wireless Access Point Raspberry Pi Setup +current_user=`whoami` +if [ "$current_user" != "root" ] +then + echo "You must have root privileges to run this setup." + echo "Try 'sudo ./ap-setup.sh'" + exit 1 +fi +echo "" +echo "" +echo "If this terminal connects to a network using ethernet, it can be configured" +echo "as a wireless access point for other terminals. Would you like to configure" +echo -n "this terminal as an access point? [y/N]: " +read wapconf +if [ "$wapconf" = "Y" -o "$wapconf" = "y" ] +then + echo "Configuring as wireless access point." + echo "" + echo "Copying files..." + chmod +x apsetup/usr/local/bin/* + cp apsetup/usr/local/bin/* /usr/local/bin + cp -R apsetup/etc/* /etc + echo "" + wapssidok=0 + while [ "$wapssidok" -ne 1 ] + do + echo "This access point will need an SSID. This is what will appear" + echo "as the name of this terminal when other devices connect." + echo -n "Please enter the desired SSID for this access point: " + read wapssid + if [ "$wapssid" = "" ] + then + echo "SSID cannot be blank. Try again." + else + wapssidok=1 + fi + done + wappassok=0 + while [ "$wappassok" -ne 1 ] + do + echo "You will need to set a passphrase for this access point. It should" + echo "be at least 8 characters in length and cannot be blank." + echo -n "Please enter the desired passphrase for this access point: " + read wappass + wappasslen=`echo -n $wappass | wc -m` + if [ "$wappass" = "" -o "$wappasslen" -lt 8 ] + then + echo "Passphrase doesn't satisfy requirements above. Try again." + else + wappassok=1 + fi + done + apt install hostapd + systemctl unmask hostapd + systemctl enable hostapd + echo "[NetDev]" >/etc/systemd/network/bridge-br0.netdev + echo "Name=br0" >>/etc/systemd/network/bridge-br0.netdev + echo "Kind=bridge" >>/etc/systemd/network/bridge-br0.netdev + echo "[Match]" >/etc/systemd/network/br0-member-eth0.network + echo "Name=eth0" >>/etc/systemd/network/br0-member-eth0.network + echo "" >>/etc/systemd/network/br0-member-eth0.network + echo "[Network]" >>/etc/systemd/network/br0-member-eth0.network + echo "Bridge=br0" >>/etc/systemd/network/br0-member-eth0.network + systemctl enable systemd-networkd + mv /etc/dhcpcd.conf /etc/dhcpcd.conf.old + echo "denyinterfaces wlan0 eth0" >/etc/dhcpcd.conf + cat /etc/dhcpcd.conf.old >>/etc/dhcpcd.conf + echo "interface br0" >>/etc/dhcpcd.conf + rfkill unblock wlan + echo "country_code=US" >/etc/hostapd/hostapd.conf + echo "interface=wlan0" >>/etc/hostapd/hostapd.conf + echo "bridge=br0" >>/etc/hostapd/hostapd.conf + echo "ssid=$wapssid" >>/etc/hostapd/hostapd.conf + echo "hw_mode=g" >>/etc/hostapd/hostapd.conf + echo "channel=7" >>/etc/hostapd/hostapd.conf + echo "macaddr_acl=0" >>/etc/hostapd/hostapd.conf + echo "auth_algs=1" >>/etc/hostapd/hostapd.conf + echo "ignore_broadcast_ssid=0" >>/etc/hostapd/hostapd.conf + echo "wpa=2" >>/etc/hostapd/hostapd.conf + echo "wpa_passphrase=$wappass" >>/etc/hostapd/hostapd.conf + echo "wpa_key_mgmt=WPA-PSK" >>/etc/hostapd/hostapd.conf + echo "wpa_pairwise=TKIP" >>/etc/hostapd/hostapd.conf + echo "rsn_pairwise=CCMP" >>/etc/hostapd/hostapd.conf + wget -c http://github.com/pjz/webmin-modules/releases/download/v1.0/hostap.wbm.gz + gzip -d hostap.wbm.gz + /usr/share/webmin/install-module.pl hostap.wbm + echo "" + echo "" + echo "Wireless access point setup is complete. It will be" + echo "automatically enabled after reboot. To change the SSID or" + echo "passphrase in the future, edit the file /etc/hostapd/hostapd.conf" + echo "or use the Host AP module in the Servers section of Webmin." + echo "" + echo "To disable the access point altogether in the future, run:" + echo " sudo wap-disable" + echo "at a command prompt and reboot the terminal. To re-enable it, run:" + echo " sudo wap-enable" + echo "at a command prompt and reboot the terminal." + echo "It can also be enabled or disabled via Custom Commands in the Tools" + echo "section of Webmin." + echo "" + echo -n "Press enter key to continue..." + read cont +else + exit 2 +fi + diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630026603.cmd b/RPiSetup/apsetup/etc/webmin/custom/1630026603.cmd new file mode 100644 index 0000000..f5a4235 --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630026603.cmd @@ -0,0 +1,3 @@ +sudo wap-enable +Enable Wireless Access Point +pi 0 1 0 0 0 0 0 - diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630026603.html b/RPiSetup/apsetup/etc/webmin/custom/1630026603.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630026603.html @@ -0,0 +1 @@ + diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630026756.cmd b/RPiSetup/apsetup/etc/webmin/custom/1630026756.cmd new file mode 100644 index 0000000..516f1a0 --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630026756.cmd @@ -0,0 +1,3 @@ +sudo wap-disable +Disable Wireless Access Point +pi 0 1 0 0 0 0 0 - diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630026756.html b/RPiSetup/apsetup/etc/webmin/custom/1630026756.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630026756.html @@ -0,0 +1 @@ + diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630027149.edit b/RPiSetup/apsetup/etc/webmin/custom/1630027149.edit new file mode 100644 index 0000000..0c2e4aa --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630027149.edit @@ -0,0 +1,11 @@ +/etc/hostapd/hostapd.conf +Edit Wireless Access Point Parameters + + + + +systemctl restart hostapd +0 +0 + + diff --git a/RPiSetup/apsetup/etc/webmin/custom/1630027149.html b/RPiSetup/apsetup/etc/webmin/custom/1630027149.html new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/1630027149.html @@ -0,0 +1 @@ + diff --git a/RPiSetup/apsetup/etc/webmin/custom/config b/RPiSetup/apsetup/etc/webmin/custom/config new file mode 100644 index 0000000..7e7dd2a --- /dev/null +++ b/RPiSetup/apsetup/etc/webmin/custom/config @@ -0,0 +1,8 @@ +display_mode=1 +params_file=0 +params_cmd=0 +columns=1 +height= +wrap= +width= +sort= diff --git a/RPiSetup/apsetup/usr/local/bin/wap-disable b/RPiSetup/apsetup/usr/local/bin/wap-disable new file mode 100644 index 0000000..a3fa126 --- /dev/null +++ b/RPiSetup/apsetup/usr/local/bin/wap-disable @@ -0,0 +1,4 @@ +#!/bin/bash +systemctl stop hostapd +systemctl disable hostapd + diff --git a/RPiSetup/apsetup/usr/local/bin/wap-enable b/RPiSetup/apsetup/usr/local/bin/wap-enable new file mode 100644 index 0000000..b98c60d --- /dev/null +++ b/RPiSetup/apsetup/usr/local/bin/wap-enable @@ -0,0 +1,4 @@ +#!/bin/bash +systemctl enable hostapd +systemctl start hostapd + diff --git a/RPiSetup/apsetup/usr/local/bin/wap-setpassphrase b/RPiSetup/apsetup/usr/local/bin/wap-setpassphrase new file mode 100644 index 0000000..9a010b8 --- /dev/null +++ b/RPiSetup/apsetup/usr/local/bin/wap-setpassphrase @@ -0,0 +1,16 @@ +#!/bin/bash +newppok=0 +while [ "$newppok" -ne 1 ] +do + echo -n "New passphrase: " + read newpp + newpplen=`echo -n $newpp | wc -m` + if [ "$newpp" = "" -o "$newpplen" -lt 8 ] + then + echo "Passphrase didn't satisfy requirements. Try again or hit -c to abort." + else + newppok=1 + fi +done +sed -i "/wpa_passphrase=.*/c wpa_passphrase=$newpp" /etc/hostapd/hostapd.conf +systemctl restart hostapd diff --git a/RPiSetup/apsetup/usr/local/bin/wap-setssid b/RPiSetup/apsetup/usr/local/bin/wap-setssid new file mode 100644 index 0000000..694faa4 --- /dev/null +++ b/RPiSetup/apsetup/usr/local/bin/wap-setssid @@ -0,0 +1,15 @@ +#!/bin/bash +newssidok=0 +while [ "$newssidok" -ne 1 ] +do + echo -n "New SSID: " + read newssid + if [ "$newssid" = "" ] + then + echo "SSID cannot be blank. Try again or hit -c to abort." + else + newssidok=1 + fi +done +sed -i "/ssid=.*/c ssid=$newssid" /etc/hostapd/hostapd.conf +systemctl restart hostapd diff --git a/RPiSetup/etc/drs.conf b/RPiSetup/etc/drs.conf index 97dc6af..cc2e90d 100644 --- a/RPiSetup/etc/drs.conf +++ b/RPiSetup/etc/drs.conf @@ -1,2 +1,25 @@ +# drs.conf + +# URL for OpenDRS DRS_SERVER="http://localhost" +# Set to "1" to prevent screen blanking on some monitors that go to sleep and won't wake up. +INHIBIT_BLANK="0" + +# For standard DRS functionality +APP_CMD="chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER" +ALIVE_STRING="chromium-browse" +KILL_CMD="killall chromium-browser" +CLEANUP_CMD="rm -rf ~/.{config,cache}/chromium/" + +# Notes +# --test-type will ignore any warnings and +# --ignore-certificate-errors will allow you to kiosk any https-page without displaying certificate errors + +#----------------------------------------------------------------------- +# For test use +#APP_CMD="xterm" +#ALIVE_STRING="xterm" +#KILL_CMD="killall xterm" +#CLEANUP_CMD="sleep 1" + diff --git a/RPiSetup/server-setup.sh b/RPiSetup/server-setup.sh index 0822f75..6b8b8d5 100644 --- a/RPiSetup/server-setup.sh +++ b/RPiSetup/server-setup.sh @@ -11,6 +11,13 @@ docroot_path="/var/www" apache_user="www-data" apache_group="www-data" +current_user=`whoami` +if [ "$current_user" != "root" ] +then + echo "You must have root privileges to run this setup." + echo "Try 'sudo ./server-setup.sh'" + exit 1 +fi echo "" echo "" echo "" @@ -20,7 +27,7 @@ echo "" echo "" echo "You should have already run the terminal-setup.sh script in this directory." echo "" -if [ ! -e "/etc/drs.conf" ] +if [ ! -e /etc/drs.conf ] then echo "It looks like the terminal-setup.sh script has not been run yet." echo "This is required before running the server-setup.sh script." @@ -50,23 +57,39 @@ echo "" echo "IMPORTANT!: Be sure to make note of usernames and passwords you provide below." echo "You will need them later." echo "" -echo "Installing required server packages. Select apache2 as the web server to configure" -echo "automatically. Choose Yes when prompted to install phpmyadmin database and allow it to" -echo "generate a random password(leave the field blank)." +echo "Installing required server packages. You will be prompted about a couple of things:" +echo "" +echo "- Select apache2 as the web server to configure automatically." +echo "" +echo "- Choose Yes when prompted to install phpmyadmin database and allow it to" +echo " generate a random password(leave the field blank)." +echo "" echo -n "Press enter to continue." read continueok echo "" echo "" echo "" echo "" -apt install -y apache2 php php-mcrypt mariadb-server phpmyadmin uuid-runtime +apt install -y apache2 php mariadb-server phpmyadmin uuid-runtime cp etc/apache2/mods-available/alias.conf /etc/apache2/mods-available service apache2 restart echo "...done." echo "" echo "" -echo "Configuring the mysql installation. Accept the defaults at the following prompts." -echo "Remember the password you set here. You'll need it during the OpenDRS install." +echo "Configuring the MariaDB installation. There will be some more prompts:" +echo "" +echo "- You'll be prompted for the current password for the root user. You've" +echo " just installed MariaDB and you haven't set one yet, so just press enter." +echo "" +echo "- You'll be prompted to switch to unix_socket authentication. Answer Y." +echo "" +echo "- You'll be prompted to change the root password. Answer Y and enter a password." +echo " Note that this is just the password for the MariaDB root user, not the terminal." +echo " DO NOT FORGET THIS PASSWORD. You'll need it later during OpenDRS install." +echo "" +echo "- Answer Y to remove anonymous users, disallow root login remotely, remove" +echo " test database and access, and reload privilege tables." +echo "" echo -n "Press enter to proceed." read continueok echo "" @@ -74,7 +97,6 @@ echo "" echo "" echo "" mysql_secure_installation -mysql mysql -e "update user set plugin='';flush privileges;" echo "" echo "" @@ -85,9 +107,13 @@ bad_mysql_adm=1 while [ $bad_mysql_adm -eq 1 ] do admintestdb="drsadm`date +%Y%m%d`" + echo "Starting OpenDRS installation." + echo "" echo "We need to know the username and password of a MySQL administrator" - echo "to be able to create the database and user for OpenDRS. Note that this" - echo "is not necessarily the same as the login and password for the computer." + echo "to be able to create the database and user for OpenDRS. The username" + echo "will be root and the password will be the one you were urged to remember" + echo "a minute ago." + echo "" echo -n "MySQL admin username: " read mysql_adm_user echo "" @@ -100,7 +126,7 @@ do bad_mysql_adm=0 else echo "ERROR: Either the username/password you supplied were incorrect or the user" - echo -n "is not a MySQL administrator. Try again? [Y/N]: " + echo -n "is not a MySQL administrator. Try again? [y/N]: " read admtry if [ "$admtry" != "Y" -o "$admtry" != "y" ] then @@ -208,6 +234,10 @@ fi echo "Installing distribution . . ." cp -Rv ../distfiles/* $install_path ln -s $install_path/writeups.php $install_path/index.php +if [ ! -L "$install_path/jquery-ui" ] +then + ln -s $install_path/jquery-ui* $install_path/jquery-ui +fi echo "" echo "" echo "" @@ -222,13 +252,15 @@ echo "Enter the user and group separated by a colon (username:groupname)." echo "Enter the user:group of the OpenDRS installation" echo -n "directory [$apache_user:$apache_group] :" read httpd_user_group_in -if [ "$http_user_group_in" != "" ] +if [ "$httpd_user_group_in" != "" ] then - http_user_group=$http_user_group_in + httpd_user_group="$httpd_user_group_in" +else + httpd_user_group="$apache_user:$apache_group" fi echo "" echo "Setting file ownership . . ." -chown -R $httpd_user_group $install_path +chown -R $httpd_user_group $install_path echo "" @@ -246,7 +278,27 @@ echo "" >> /etc/apache2/conf-available/$inst_name.conf echo " Options FollowSymLinks" >> /etc/apache2/conf-available/$inst_name.conf echo " DirectoryIndex index.php" >> /etc/apache2/conf-available/$inst_name.conf echo "" >> /etc/apache2/conf-available/$inst_name.conf - +grep -q "Apache2 Debian Default Page: It works" /var/www/html/index.html +if [ -$? -eq 0 ] +then + echo "This apache installation appears to be new or unconfigured. Replacing the default" + echo "site index page with a more useful one." + site_hostname=`hostname` + mv /var/www/html/index.html /var/www/html/defaultindex.html + echo " + + + + $site_hostname + + +

+ $inst_name +

+ + " > /var/www/html/index.html +fi + a2enconf $inst_name service apache2 reload echo "OpenDRS server setup is complete." @@ -265,4 +317,4 @@ echo "REMEMBER THESE CREDENTIALS. Otherwise, you will not be able to log in and" echo "configure your new installation." echo "It is highly recommended that you change the initial password to something" echo "secure after logging in for the first time." -echo "DRS_SERVER=\"http://localhost/$inst_name\"" > /etc/drs.conf +sed -i 's,'DRS_SERVER=.*','DRS_SERVER="\"http://localhost/$inst_name/\""',' /etc/drs.conf diff --git a/RPiSetup/terminal-setup.sh b/RPiSetup/terminal-setup.sh index 2038a9a..2b563ec 100644 --- a/RPiSetup/terminal-setup.sh +++ b/RPiSetup/terminal-setup.sh @@ -6,6 +6,13 @@ # SPDX-License-Identifier: GPL-2.0 +current_user=`whoami` +if [ "$current_user" != "root" ] +then + echo "You must have root privileges to run this setup." + echo "Try 'sudo ./terminal-setup.sh'" + exit 1 +fi echo "" echo "" echo "" @@ -18,18 +25,21 @@ echo "" echo "1. Created a Raspberry Pi OS Lite SD card from the latest release." echo "2. Installed the card in a Raspberry Pi, booted it, and logged in as pi." echo "3. Ran sudo raspi-config and :" -echo " a. Set a strong password for the pi user." -echo " b. Set hostname and, if accessing a network through wifi, the SSID and" +echo " a. Set locale, timezone, keyboard layout, and wifi country under" +echo " Localisation Options. IMPORTANT: Do this first before setting" +echo " any passwords. Changing keyboard types usually changes character" +echo " mappings, meaning your password after the change may not be what" +echo " it was before the change." +echo " b. Set a strong password for the pi user." +echo " c. Set hostname and, if accessing a network through wifi, the SSID and" echo " passphrase under Network Options." -echo " c. Set locale, timezone, keyboard layout, and wifi country under" -echo " Localisation Options." echo " d. Enable SSH under Interfacing Options." echo " e. Set overscan as required to get rid of any black borders around the" echo " edge of the display." echo " f. Reboot when prompted and logged back in as pi." echo "4. Transferred the OpenDRS distribution package to /home/pi on the" echo " Raspberry Pi and extracted it." -echo "5. Changed directory to RPiSetup in the the extracted distribution directory." +echo "5. Changed directory to RPiSetup in the extracted distribution directory." echo "" echo "If you have completed these steps, press enter to continue. If not," echo -n "press ctrl-c to quit." @@ -56,6 +66,7 @@ echo "" echo "Copying files..." chmod +x usr/local/bin/* cp usr/local/bin/* /usr/local/bin +cp etc/drs.conf /etc cp etc/apt/sources.list.d/* /etc/apt/sources.list.d cp lib/systemd/system/getty@tty1.service /lib/systemd/system echo "" @@ -72,12 +83,15 @@ echo "" echo "" echo "" echo "" -wget http://www.webmin.com/jcameron-key.asc -apt-key add jcameron-key.asc +echo "deb https://download.webmin.com/download/repository sarge contrib" >/etc/apt/sources.list.d/webmin.list +wget https://download.webmin.com/jcameron-key.asc +cat jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg rm jcameron-key.asc +apt install apt-transport-https apt update apt install -y --no-install-recommends xorg openbox chromium-browser -apt install -y webmin cups libcups2-dev cmake +apt install -y cups libcups2-dev cmake +apt install -y webmin addgroup lpadmin usermod -a -G lpadmin pi systemctl enable getty@tty1.service @@ -101,7 +115,6 @@ echo "of your choosing." echo -n "Press enter to continue." read continueok echo "" -echo "" echo "Creating customer user..." sleep 10 echo "" @@ -127,11 +140,20 @@ read server_url if [[ $server_url == "" ]] then conftype="Server/Terminal" - touch /etc/drs.conf ./server-setup.sh else conftype="Terminal" - echo "DRS_SERVER=\"$server_url\"" > /etc/drs.conf + sed -i 's,'DRS_SERVER=.*','DRS_SERVER="\"$server_url\""',' /etc/drs.conf +fi +echo "" +echo "" +./ap-setup.sh +if [ $? -ne 0 ] +then + echo "If you would like to configure this terminal as an access point at some" + echo "time in the future, log in, change directory to the" + echo "extracted distribution's RPiSetup directory, and run:" + echo " sudo ./ap-setup.sh" fi echo "" echo "" @@ -144,7 +166,21 @@ echo "yourself and any other administrators using the cloneuser command" echo "(cloneuser pi )." echo "" echo "" -echo "Setup complete." -echo -n "Press enter to reboot now." +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 "" +echo "" +echo "A reboot is required to start using this terminal." +echo -n "Would you like to reboot now? [Y/n]: " read rebootok -reboot +if [ "$rebootok" = "N" -o "$rebootok" = "n" ] +then + exit 0 +else + reboot +fi + diff --git a/RPiSetup/usr/local/bin/startdrs.sh b/RPiSetup/usr/local/bin/startdrs.sh index a99817a..275ef13 100644 --- a/RPiSetup/usr/local/bin/startdrs.sh +++ b/RPiSetup/usr/local/bin/startdrs.sh @@ -1,32 +1,37 @@ #!/bin/bash +# startdrs.sh source /etc/drs.conf openbox-session & -xset s off -xset +dpms -xset dpms 0 600 1800 +if [ "$INHIBIT_BLANK" -eq "1" ] +then + xset s off + xset -dpms +else + xset s off + xset +dpms + xset dpms 0 600 1800 +fi while true do - killall chromium-browser - rm -rf ~/.{config,cache}/chromium/ - - # start browser to DRS Server - # --test-type will ignore any warnings and - # --ignore-certificate-errors will allow you to kiosk any https-page without displaying certificate errors - chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER & + $KILL_CMD + $CLEANUP_CMD + + # start application + $APP_CMD & sleep 10 while true do - pgrep chromium-browse + pgrep $ALIVE_STRING if [ "$?" -eq "1" ] then - # relaunch browser if it terminates - chromium-browser --test-type --ignore-certificate-errors --kiosk --no-first-run --check-for-update-interval=1 --simulate-upgrade --incognito $DRS_SERVER & + # relaunch application if it terminates + $APP_CMD & fi sleep 1 done diff --git a/RaspberryPiSetup.txt b/RaspberryPiSetup.txt index 4ada47d..c7064eb 100644 --- a/RaspberryPiSetup.txt +++ b/RaspberryPiSetup.txt @@ -4,34 +4,36 @@ Raspberry Pi setup 2. Insert SD card in Raspberry Pi and boot. -3. Login as pi. +3. Login as pi. Default password is raspberry. 4. sudo raspi-config and: - a. Set a strong password for the default user (pi). - - b. Set the desired hostname. - - c. Set Wireless LAN SSID and passphrase if using WiFi for networking. - - c. Use Localisation Options to: + a. Use Localisation Options to: 1. Set locale to en_US.UTF-8 UTF-8. 2. Set timezone. 3. Set keyboard layout (IMPORTANT! Raspberry Pi OS is made in England, so unless that's the kind of keyboard you have, the - default layout will make your symbols come out wrong!). + default layout will make your symbols come out wrong! Make + sure you set this before setting any passwords or you may + not be able to log back in!). 4. Set WLAN country. - d. Use Interfacing Options to enable SSH server. + b. Set a strong password for the default user (pi). - e. If you have black borders on the sides of the screen, use Display + c. Set the desired hostname. + + d. Set Wireless LAN SSID and passphrase if using WiFi for networking. + + e. Use Interfacing Options to enable SSH server. + + f. If you have black borders on the sides of the screen, use Display Underscan option to change Overscan compensation. - f. When you've finished, tab down to highlight Finish and hit enter. + g. When you've finished, tab down to highlight Finish and hit enter. - g. Reboot when prompted. + h. Reboot when prompted. - h. Log back in as pi using the password you set in a. above. + i. Log back in as pi using the password you set in b. above. 5. Copy OpenDRS distribution package to /home/pi on the Raspberry Pi and extract. diff --git a/TODO.txt b/TODO.txt index 75ecd46..78703a3 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,18 @@ TODO -- Provide ability to change terminology for "device", "period", and - "effective" to broaden the use case for the application. +- 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. + +- 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. diff --git a/boilerplate.php b/boilerplate.php index 3618b1c..5a857ec 100644 --- a/boilerplate.php +++ b/boilerplate.php @@ -2,7 +2,7 @@ /* boilerplate.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/db.php.template b/db.php.template index 237213f..ff0f24d 100644 --- a/db.php.template +++ b/db.php.template @@ -3,7 +3,7 @@ /* db.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/CHANGELOG b/distfiles/CHANGELOG index a618467..5c04c5a 100644 --- a/distfiles/CHANGELOG +++ b/distfiles/CHANGELOG @@ -1,5 +1,5 @@ OpenDRS - Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -75,3 +75,19 @@ Changelog - Added ability to customize the terminology used for Device, Period, and Effective/Non-effective to make OpenDRS usable in a wider range of applications. + +1.3.0 - 2022-03-05 + - Made several improvements to group functionality. The Writeup Groups + page now displays all groups in a table instead of individually + expandable sections. On the View Writeups and View Open Writeups + pages, if a writeup is a member of only one group, clicking the + icon will take you to the page for that group. If a writeup is + a member of multiple groups, clicking the icon will take you to + the detail page for that writeup where you can view or modify which + groups the writeup is a member of. On the Search page, you can + now choose which group(s) the results should include. + - Made some improvements to the installation process for Raspberry Pi + setup to accomodate the latest version of Raspberry Pi OS. + - If setting up as a Raspberry Pi terminal/server, included the option + to make the terminal a wireless access point if it connects to an + ethernet network. diff --git a/distfiles/about.php b/distfiles/about.php index 3c69313..e0e76b7 100644 --- a/distfiles/about.php +++ b/distfiles/about.php @@ -2,7 +2,7 @@ /* about.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/common.php b/distfiles/common.php index 1fa1163..96ad3ab 100644 --- a/distfiles/common.php +++ b/distfiles/common.php @@ -2,7 +2,7 @@ /* common.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -595,7 +595,7 @@ function displaywriteup($id) { if ($group_count == 1) { $group_ind="\"GRP\""; } else { - $group_ind="\"GRP\""; + $group_ind="\"GRP\""; } } echo " @@ -692,8 +692,14 @@ function putsetting($setting_name,$setting_value,$user_id) { } } -function group_table($groupid,$role=false,$mode="view",$selection="none",$expanded=false) { +function group_detail($groupid,$role=false,$mode="view",$selection="none") { // display a table for a single group + + // groupid is the group for which detail is to be shown + // role is true if user is logged in, false if not. + // mode is "select" if selection boxes are to be displayed, "view" if not. + // selection is "all" or "none" + // grab some important global variables global $device_term; global $discovered_term, $discovered_term_short, $disc_drop_data; @@ -708,13 +714,6 @@ function group_table($groupid,$role=false,$mode="view",$selection="none",$expand } elseif ($selection == "none") { $sel_flag=""; } - if ($expanded) { - echo " - - \"Unexpand - - "; - } $groupname=dblookup($drs_db,"groups","id","name",$groupid); if ($groupname == "") { echo "Group ID:  $groupid"; diff --git a/distfiles/config.php b/distfiles/config.php index 0e830b4..7dccd54 100644 --- a/distfiles/config.php +++ b/distfiles/config.php @@ -2,7 +2,7 @@ /* config.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/create.php b/distfiles/create.php index 28e1720..a6ab5b5 100644 --- a/distfiles/create.php +++ b/distfiles/create.php @@ -2,7 +2,7 @@ /* create.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/dbadmin.php b/distfiles/dbadmin.php index 6b0bfd7..2bda465 100644 --- a/distfiles/dbadmin.php +++ b/distfiles/dbadmin.php @@ -2,7 +2,7 @@ /* dbadmin.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/gpl.php b/distfiles/gpl.php index 9c34853..4bc2858 100644 --- a/distfiles/gpl.php +++ b/distfiles/gpl.php @@ -2,7 +2,7 @@ /* gpl.php OpenMTS Online Maintenance Tracking System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/groups.php b/distfiles/groups.php index bb7e565..d3b7e64 100644 --- a/distfiles/groups.php +++ b/distfiles/groups.php @@ -2,7 +2,7 @@ /* groups.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -38,7 +38,6 @@ $save=$incoming['save']; $targets=$incoming['targets']; $group=$incoming['group']; $name=$incoming['name']; -$expandgrp=$incoming['expandgrp']; $search=$incoming['search']; $s_status=$incoming['s_status']; @@ -317,7 +316,7 @@ if ($action=="add") { if ($save) { // show the group $mode="view"; - group_table($group,$role,$mode); + group_detail($group,$role,$mode); if ($role) { // show buttons echo " @@ -621,7 +620,7 @@ if ($action=="add") { "; - group_table($group,$role,"select","all"); + group_detail($group,$role,"select","all"); echo " Deselect the writeups you want to remove from this group.

NOTE: Deselecting them all will dissolve the group. @@ -653,7 +652,7 @@ if ($action=="add") { } // show the group $mode="view"; - group_table($group,$role,$mode); + group_detail($group,$role,$mode); if ($role) { // show buttons echo " @@ -694,7 +693,7 @@ if ($action=="add") { } // show the group $mode="view"; - group_table($group,$role,$mode); + group_detail($group,$role,$mode); if ($role) { // show buttons echo " @@ -720,7 +719,7 @@ if ($action=="add") { } // show the group $mode="view"; - group_table($group,$role,$mode); + group_detail($group,$role,$mode); if ($role && ! $save) { // show action form echo " @@ -821,7 +820,7 @@ if ($action=="add") { if ($group) { // show only the requested group $mode="view"; - group_table($group,$role,$mode); + group_detail($group,$role,$mode); if ($role) { // show buttons echo " @@ -841,48 +840,42 @@ if ($action=="add") { } echo "

"; } else { - // show all groups - $mode="view"; - $groups_qry=mysqli_query($drs_db,"select id from groups"); + // show group table + $groups_qry=mysqli_query($drs_db,"select * from groups"); if (mysqli_num_rows($groups_qry)) { + echo " +

+ + + + + + + "; while ($grouprow=mysqli_fetch_assoc($groups_qry)) { - if ($expandgrp == $grouprow['id']) { - group_table($grouprow['id'],$role,$mode,"none",$expandgrp); - if ($role) { - // show buttons - echo " - - - -       - -       - -       - -       - - - "; - } - } else { - echo " - - \"Expand - - "; - $groupname=dblookup($drs_db,"groups","id","name",$grouprow['id']); - if ($groupname == "") { - echo "Group ID:  {$grouprow['id']}"; - } else { - echo "Group Name:  $groupname"; - } - } - echo "

"; - } - } else { - echo "
No writeup groups were found.


"; - } + $num_query=mysqli_query($drs_db,"select id from links where linkgroup={$grouprow['id']}"); + $num_writeups=mysqli_num_rows($num_query); + if($grouprow['name']=="") { + $name_text="Group {$grouprow['id']} has not been named"; + } else { + $name_text="{$grouprow['name']}"; + } + // print table row + printf( + " + + + + \n", + $grouprow["id"],$grouprow["id"], + $name_text, + $num_writeups + ); + } + echo "
IDNameWriteups assigned
%s%s%s

"; + } else { + echo "
No writeup groups were found.


"; + } } } diff --git a/distfiles/login.php b/distfiles/login.php index 630d015..cda89e7 100644 --- a/distfiles/login.php +++ b/distfiles/login.php @@ -2,7 +2,7 @@ /* login.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/profile.php b/distfiles/profile.php index 6c15e0a..1b58531 100644 --- a/distfiles/profile.php +++ b/distfiles/profile.php @@ -2,7 +2,7 @@ /* profile.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/search.php b/distfiles/search.php index de147f3..d7997cd 100644 --- a/distfiles/search.php +++ b/distfiles/search.php @@ -2,7 +2,7 @@ /* search.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -304,14 +304,21 @@ if ($search) { // group membership if ($s_group) { - $group_param="Group member:"; + $group_param="Group member: "; + // create an array of writeups that are members of the groups specified + $group_writeups=array(); foreach ($s_group as $group_val) { - if ($group_val=="0") $group_dsp="No"; - if ($group_val=="1") $group_dsp="Yes"; - $group_param="{$group_param} {$group_dsp}, "; - } - $group_param=rtrim($group_param,", "); - } + $wulink_query=mysqli_query($drs_db,"select writeupid from links where linkgroup=$group_val"); + while($wulinkrow=mysqli_fetch_assoc($wulink_query)){ + $group_writeups[]=$wulinkrow['writeupid']; + } + $group_name=dblookup($drs_db,"groups","id","name",$group_val); + $group_param="{$group_param} {$group_val}, "; + } + $group_param=rtrim($group_param,", "); + } else { + $group_param="Group member: any"; + } } @@ -495,20 +502,30 @@ if (! $exportcsv) { "; // Group status cell ************** echo " - Group Member?
+ Group Assignments:
+ - - + $grow=mysqli_query($drs_db,"select * from groups order by id asc"); + while ($gitem=mysqli_fetch_assoc($grow)) { + if ($gitem["name"]=="") { + $gname="Group ".$gitem["id"]; + } else { + $gname=$gitem["name"]; + } + if($search) { + if (in_array($gitem["id"],$s_group,true)) { + printf("",$gitem["id"],$gname); + } else { + printf("",$gitem["id"],$gname); + } + } else { + printf("",$gitem["id"],$gname); + } + } + echo " "; + // ************************************ echo " @@ -763,25 +780,10 @@ if ($search) { while ($eachid=mysqli_fetch_assoc($writeup)) { $result_ids[]=$eachid['id']; } - mysqli_data_seek($writeup,0); - // create an array of all ids in groups - $groupmems=array(); - $groupmem_qry=mysqli_query($drs_db,"select writeupid from links"); - while ($groupmemrow=mysqli_fetch_row($groupmem_qry)) { - $groupmems[]=$groupmemrow[0]; - } - $groupmems=array_unique($groupmems); - // determine how many group members are in results - $member_count=0; - foreach($result_ids as $result_id) { - if (in_array($result_id,$groupmems)) $member_count += 1; - } - if (in_array("1",$s_group)) $show_groupmems=true; - if (in_array("0",$s_group)) $show_nongroupmems=true; - if ($show_groupmems == $show_nongroupmems) $num_results=mysqli_num_rows($writeup); //show members and nonmembers - if ($show_groupmems && !$show_nongroupmems) $num_results=$member_count; //only show members - if (!$show_groupmems && $show_nongroupmems) $num_results=mysqli_num_rows($writeup)-$member_count; //only show nonmembers + mysqli_data_seek($writeup,0); + reset($group_writeups); + $num_results=mysqli_num_rows($writeup); if ($num_results > 0) { if ($exportcsv) { // generate csv file @@ -886,7 +888,6 @@ if ($search) { rewind($csv_fp); // send file contents $csv_contents=stream_get_contents($csv_fp); - //fpassthru($csv_fp); // Close our pointer and free up memory and /tmp space fclose($csv_fp); echo $csv_contents; @@ -946,11 +947,11 @@ if ($search) { } $disc_txt=$disc_txt."
\"GRP\"
"; } else { - $disc_txt=$disc_txt."
\"GRP\"
"; + $disc_txt=$disc_txt."
\"GRP\"
"; } } - if (($show_groupmems == $show_nongroupmems) || ($is_member && $show_groupmems) || (!$is_member && $show_nongroupmems)) { + if(in_array($tablerow['id'],$group_writeups) || count($s_group)==0) { // print table row printf( " @@ -985,7 +986,7 @@ if ($search) { // determine if this is a member of a group $member_qry=mysqli_query($drs_db,"select linkgroup from links where writeupid=\"{$tablerow['id']}\""); $is_member=mysqli_num_rows($member_qry); - if (($show_groupmems == $show_nongroupmems) || ($is_member && $show_groupmems) || (!$is_member && $show_nongroupmems)) { + if(in_array($tablerow['id'],$group_writeups) || count($s_group)==0) { displaywriteup($tablerow['id']); echo "
"; } diff --git a/distfiles/settings.php b/distfiles/settings.php index f3d92e4..5ea598c 100644 --- a/distfiles/settings.php +++ b/distfiles/settings.php @@ -2,7 +2,7 @@ /* settings.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ diff --git a/distfiles/writeupdetail.php b/distfiles/writeupdetail.php index 7a46929..56aec41 100644 --- a/distfiles/writeupdetail.php +++ b/distfiles/writeupdetail.php @@ -2,7 +2,7 @@ /* writeupdetail.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -52,6 +52,7 @@ $action_date=$incoming['action_date']; $action_time=$incoming['action_time']; $action_reason=$incoming['action_reason']; $action_text=$incoming['action_text']; +$group=$incoming['group']; // assign variables from constants $appname=APP_NAME; @@ -93,6 +94,18 @@ if ($usersave) { // update the record in writeups mysqli_query($drs_db,"update writeups set device=\"$device\",discovered=\"$discovered\",functional=\"$functional\",reported_by=\"$clean_reported_by\",report_date=\"$report_date\",report_time=\"$report_time\",subsystem=\"$subsystem\",discrepancy_text=\"$clean_discrepancy_text\" where id=\"$id\""); + + // remove writeup from all groups and add to only selected groups + mysqli_query($drs_db,"delete from links where writeupid=\"$id\""); + foreach($group as &$link) { + if($link==0) { + // new group was requested + mysqli_query($drs_db,"insert into groups(name) value(\"\")"); + $newgroup=mysqli_insert_id($drs_db); + $link=$newgroup; + } + mysqli_query($drs_db,"insert into links(linkgroup, writeupid) values(\"$link\", \"$id\")"); + } } } elseif ($techsave) { @@ -371,13 +384,72 @@ if ($useredit) { - + Group Assignments:   + "; + // Group multi-select ******************** + echo " + + "; + echo " + + "; } else { + echo "Group Assignments:  "; $wustat=dblookup($drs_db,"writeups","id","status",$id); if ($wustat==2 && !$role) $allowuseredit="disabled"; + // Group multi-select ******************** + echo " + + + "; echo " diff --git a/distfiles/writeups.php b/distfiles/writeups.php index 4015377..d5e76c6 100644 --- a/distfiles/writeups.php +++ b/distfiles/writeups.php @@ -2,7 +2,7 @@ /* writeups.php OpenDRS Online Discrepancy Reporting System - Copyright (C) 2021 Rod Wright + Copyright (C) 2022 Rod Wright SPDX-License-Identifier: GPL-2.0 */ @@ -133,7 +133,7 @@ function opentable($start_date,$end_date,$print,$drs_db,$viewtype="summary") { if ($group_count == 1) { $disc_txt=$disc_txt."
\"GRP\"
"; } else { - $disc_txt=$disc_txt."
\"GRP\"
"; + $disc_txt=$disc_txt."
\"GRP\"
"; } } @@ -279,7 +279,7 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol if ($group_count == 1) { $disc_txt=$disc_txt."
\"GRP\"
"; } else { - $disc_txt=$disc_txt."
\"GRP\"
"; + $disc_txt=$disc_txt."
\"GRP\"
"; } } @@ -337,7 +337,12 @@ function viewtable($start_date,$end_date,$print,$drs_db,$viewtype="summary",$rol "; $tgrow=mysqli_query($drs_db,"select id,name from groups order by id asc"); while ($tgitem=mysqli_fetch_assoc($tgrow)) { - printf("",$tgitem["id"],$tgitem["name"]); + if($tgitem["name"]=="") { + $tgname="Group ".$tgitem["id"]; + } else { + $tgname=$tgitem["name"]; + } + printf("",$tgitem["id"],$tgname); } echo " diff --git a/install.sh b/install.sh index 273cb77..adccdb9 100644 --- a/install.sh +++ b/install.sh @@ -2,12 +2,12 @@ # install.sh # OpenDRS Online Discrepancy Reporting System -# Copyright (C) 2021 Rod Wright +# Copyright (C) 2022 Rod Wright # SPDX-License-Identifier: GPL-2.0 -DRS_VERSION="1.1.2" +DRS_VERSION="1.3.0" DOC_ROOT="/var/www" INSTALL_LOC="opendrs" APACHE_USER="www-data" @@ -91,6 +91,14 @@ then # copy distribution to install location echo "Installing distribution . . ." cp -R distfiles/* $install_path + if [ ! -L "$install_path/jquery-ui" ] + then + ln -s $install_path/jquery-ui* $install_path/jquery-ui + fi + if [ ! -L "$install_path/index.php" ] + then + ln -s $install_path/writeups.php $install_path/index.php + fi # set ownership echo "In order to set the ownership correctly, we need to know the user and" echo "group that the webserver expects its files to be owned by. This is" @@ -227,7 +235,14 @@ else # copy distribution to install location echo "Installing distribution . . ." cp -Rv distfiles/* $install_path - + if [ ! -L "$install_path/jquery-ui" ] + then + ln -s $install_path/jquery-ui* $install_path/jquery-ui + fi + if [ ! -L "$install_path/index.php" ] + then + ln -s $install_path/writeups.php $install_path/index.php + fi # set ownership echo "In order to set the ownership correctly, we need to know the user and" echo "group that the webserver expects its files to be owned by. This is" diff --git a/opendrs-initial.sql b/opendrs-initial.sql index 712524a..f098df3 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.2.0','1.2.0'), +(1,'drs_version','1.3.0','1.3.0'), (5,'app_name','OpenDRS - Discrepancy Reporting System','OpenDRS Discrepancy Reporting System'), (6,'banner','1','1'), (7,'background_color','0B3144','0B3144'), @@ -172,6 +172,7 @@ CREATE TABLE `discovered` ( LOCK TABLES `discovered` WRITE; /*!40000 ALTER TABLE `discovered` DISABLE KEYS */; +INSERT INTO `discovered` VALUES (1,'Install','Initial installation',1); /*!40000 ALTER TABLE `discovered` ENABLE KEYS */; UNLOCK TABLES; @@ -272,6 +273,7 @@ CREATE TABLE `devices` ( LOCK TABLES `devices` WRITE; /*!40000 ALTER TABLE `devices` DISABLE KEYS */; +INSERT INTO `devices` VALUES (1,'OpenDRS Server',1); /*!40000 ALTER TABLE `devices` ENABLE KEYS */; UNLOCK TABLES; @@ -337,6 +339,7 @@ CREATE TABLE `writeups` ( LOCK TABLES `writeups` WRITE; /*!40000 ALTER TABLE `writeups` DISABLE KEYS */; +INSERT INTO `writeups` VALUES (1,1,1,1,'R. Wright',CURRENT_DATE(),CURRENT_TIME(),1,'This is a new installation of OpenDRS. There is one admin user (username: drsadmin password: OpenDRS-1). You should immediately log in and click on Manage Database under Admin Functions, go to the User Management tab, and add yourself as a new user, making sure to click the Admin checkbox to give yourself admin rights. You should then edit the DRS Admin user by clicking the User ID number in the table of existing users, and uncheck the Active checkbox. After you have done that, you can close this writeup.',1,0,NULL,NULL,0,NULL); /*!40000 ALTER TABLE `writeups` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; diff --git a/opendrs-update.sql b/opendrs-update.sql index 06a38c1..54d1526 100644 --- a/opendrs-update.sql +++ b/opendrs-update.sql @@ -210,3 +210,9 @@ ALTER TABLE `writeups` CHANGE COLUMN `period` `discovered` int not null; -- Rename period_effective column of writeups table to functional ALTER TABLE `writeups` CHANGE COLUMN `period_effective` `functional` tinyint(1) not null; +-- -------------------------------------- + +-- ---------- version 1.3.0 ------------- +-- Update version number +UPDATE config SET value="1.3.0",defaultvalue="1.3.0" WHERE name="drs_version"; +-- --------------------------------------