Incorporate changes made for old version 5.2.4.3
This commit is contained in:
@@ -211,3 +211,24 @@
|
||||
5.2.4.2 - 2025-12-11
|
||||
- Fixed other bugs caused by passing a non-array as the second
|
||||
argument of the php in_array() function in various files.
|
||||
|
||||
5.2.4.3 - 2025-12-16
|
||||
- Various problems were noted resulting from php's use of UTC as the
|
||||
default timezone. Now, on installation or upgrade, the installer
|
||||
gets the correct timezone from the system and sets it as a php
|
||||
option in a .htaccess file in the install location. This solves
|
||||
multiple problems and allows today's date and the current time
|
||||
to be determined from the php date() function as part of the
|
||||
settings.php once per page load instead of having to query the
|
||||
database multiple times per page load. Also added the option to
|
||||
allow apache to read the .htaccess file to the <Directory>
|
||||
section of the application's conf file in
|
||||
/etc/apache2/conf-available
|
||||
- Renamed the installer's db.php_update.sh script to files-update.sh
|
||||
to reflect that it now can do more than just modify the db.php
|
||||
file. For this version, it's used to modify the apache conf file
|
||||
mentioned earlier.
|
||||
- Completely removed the optional package prompting/installation
|
||||
code from install.sh. This is best done using separate
|
||||
installers.
|
||||
|
||||
|
||||
@@ -722,7 +722,6 @@ function showlinklist($print) {
|
||||
function nag($tech_id) {
|
||||
// nags the user if something is pending
|
||||
global $db;
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
// maintenance forms
|
||||
$mfpending=mysqli_num_rows(mysqli_query($db,"select maintformid from maintforms where mftech=\"$tech_id\" and pending=1"));
|
||||
if ($mfpending) {
|
||||
@@ -821,7 +820,6 @@ function get_upcoming_events() {
|
||||
// takes no arguments
|
||||
// returns an array containing arrays of upcoming event data
|
||||
global $db;
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
$uceventsqry=mysqli_query($db,"select * from events where active_flag=\"1\" and (deferred_flag=\"0\" or (deferred_flag=\"1\" and deferred_date <= \"$today\"))");
|
||||
$ucevents=array();
|
||||
while ($uceventrow=mysqli_fetch_assoc($uceventsqry)) {
|
||||
|
||||
@@ -77,9 +77,6 @@ if ($edit || $delete) {
|
||||
|
||||
// ******** begin database manipulation ********
|
||||
|
||||
// determine today's date and make it the default
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
$now=mysqli_fetch_row(mysqli_query($db,"select current_time"))[0];
|
||||
if ($add) {
|
||||
if ($submit) {
|
||||
// add the entry if submit is pressed
|
||||
|
||||
@@ -29,7 +29,6 @@ if ($print) {
|
||||
}
|
||||
|
||||
// use default date values if not supplied
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
if ($tgt_date=="") $tgt_date=$today;
|
||||
|
||||
// define shifttable_classic function
|
||||
|
||||
@@ -104,9 +104,6 @@ if ($printfmt) {
|
||||
}
|
||||
|
||||
// ******** begin database manipulation ********
|
||||
// determine today's date and make it the default
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
$now=mysqli_fetch_row(mysqli_query($db,"select current_time"))[0];
|
||||
|
||||
//var_dump($_REQUEST);
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ if ($print) {
|
||||
$mbgcolor=MENUBG_COLOR;
|
||||
}
|
||||
// **** BEGIN DATABASE OPERATIONS ****
|
||||
$today=mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
$tomorrow=mysqli_fetch_row(mysqli_query($db,"select adddate((select current_date),1)"))[0];
|
||||
$errorstack=array();
|
||||
|
||||
|
||||
@@ -58,20 +58,19 @@ framework("begin","$logname Search","Search",$print);
|
||||
|
||||
// ******** begin database manipulation ********
|
||||
// get the date range of lognotes
|
||||
$todaysdate = mysqli_fetch_row(mysqli_query($db,"select current_date"))[0];
|
||||
$logdateqry=mysqli_query($db,"select min(date), max(date) from lognotes");
|
||||
$logdateresults=mysqli_fetch_row($logdateqry);
|
||||
$logmindate=$logdateresults[0];
|
||||
if ($logmindate == "") $logmindate = $todaysdate;
|
||||
if ($logmindate == "") $logmindate = $today;
|
||||
$logmaxdate=$logdateresults[1];
|
||||
if ($logmaxdate == "") $logmaxdate = $todaysdate;
|
||||
if ($logmaxdate == "") $logmaxdate = $today;
|
||||
// get the date range of maintenance forms
|
||||
$mfdateqry=mysqli_query($db,"select min(mfdate), max(mfdate) from maintforms");
|
||||
$mfdateresults=mysqli_fetch_row($mfdateqry);
|
||||
$mfmindate=$mfdateresults[0];
|
||||
if ($mfmindate == "") $mfmindate = $todaysdate;
|
||||
if ($mfmindate == "") $mfmindate = $today;
|
||||
$mfmaxdate=$mfdateresults[1];
|
||||
if ($mfmaxdate == "") $mfmaxdate = $todaysdate;
|
||||
if ($mfmaxdate == "") $mfmaxdate = $today;
|
||||
// determine entire date range
|
||||
$mindate=min($logmindate, $mfmindate);
|
||||
$maxdate=max($logmaxdate, $mfmaxdate);
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
*/
|
||||
|
||||
// determine today's date and time and assign them to variables
|
||||
$today = date("Y-m-d");
|
||||
$now = date("H:i:s");
|
||||
|
||||
$sttl=mysqli_fetch_row(mysqli_query($db,"select confvalue from configs where confname=\"session_ttl_days\""))[0];
|
||||
$ostype=strtoupper(substr(php_uname('s'), 0, 3));
|
||||
if ($ostype == 'WIN') {
|
||||
|
||||
Reference in New Issue
Block a user