Incorporate changes made for old version 5.2.4.2
This commit is contained in:
@@ -207,3 +207,7 @@
|
|||||||
any results. This was due to a php fatal error caused by passing
|
any results. This was due to a php fatal error caused by passing
|
||||||
a non-array as the second argument of the php in_array()
|
a non-array as the second argument of the php in_array()
|
||||||
function.
|
function.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ CREATE TABLE `configs` (
|
|||||||
LOCK TABLES `configs` WRITE;
|
LOCK TABLES `configs` WRITE;
|
||||||
/*!40000 ALTER TABLE `configs` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `configs` DISABLE KEYS */;
|
||||||
INSERT INTO `configs` VALUES
|
INSERT INTO `configs` VALUES
|
||||||
(1,'ol_version','5.2.4.1'),
|
(1,'ol_version','5.2.4.2'),
|
||||||
(2,'log_name','OpenLog'),
|
(2,'log_name','OpenLog'),
|
||||||
(3,'banner','1'),
|
(3,'banner','1'),
|
||||||
(4,'background_color','#003333'),
|
(4,'background_color','#003333'),
|
||||||
|
|||||||
@@ -35,3 +35,8 @@ UPDATE configs SET confvalue="5.2.4" WHERE confname="ol_version";
|
|||||||
-- Update version number
|
-- Update version number
|
||||||
UPDATE configs SET confvalue="5.2.4.1" WHERE confname="ol_version";
|
UPDATE configs SET confvalue="5.2.4.1" WHERE confname="ol_version";
|
||||||
-- --------------------------------------
|
-- --------------------------------------
|
||||||
|
|
||||||
|
-- ---------- version 5.2.4.2 -------------
|
||||||
|
-- Update version number
|
||||||
|
UPDATE configs SET confvalue="5.2.4.2" WHERE confname="ol_version";
|
||||||
|
-- --------------------------------------
|
||||||
|
|||||||
@@ -21,3 +21,7 @@ install_path=$1
|
|||||||
# ---------- version 5.2.4.1 ------------
|
# ---------- version 5.2.4.1 ------------
|
||||||
# No changes to the db.php file
|
# No changes to the db.php file
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
||||||
|
# ---------- version 5.2.4.2 ------------
|
||||||
|
# No changes to the db.php file
|
||||||
|
# ---------------------------------------
|
||||||
|
|||||||
@@ -207,3 +207,7 @@
|
|||||||
any results. This was due to a php fatal error caused by passing
|
any results. This was due to a php fatal error caused by passing
|
||||||
a non-array as the second argument of the php in_array()
|
a non-array as the second argument of the php in_array()
|
||||||
function.
|
function.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|||||||
@@ -249,6 +249,7 @@ if ($add) {
|
|||||||
$flagids=mysqli_query($db,"select flagid from flags");
|
$flagids=mysqli_query($db,"select flagid from flags");
|
||||||
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
||||||
$thisflag_tbl="flag_".$thisflagid[0];
|
$thisflag_tbl="flag_".$thisflagid[0];
|
||||||
|
if ($flags[0]=="") $flags=[];
|
||||||
if (in_array($thisflagid[0],$flags)) {
|
if (in_array($thisflagid[0],$flags)) {
|
||||||
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"notetemplates\" and id=\"$templateid\""))) {
|
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"notetemplates\" and id=\"$templateid\""))) {
|
||||||
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"notetemplates\",\"$templateid\")");
|
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"notetemplates\",\"$templateid\")");
|
||||||
@@ -368,6 +369,7 @@ if ($edit) {
|
|||||||
$chainmembers=generate_chain($noteid);
|
$chainmembers=generate_chain($noteid);
|
||||||
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
||||||
$thisflag_tbl="flag_".$thisflagid[0];
|
$thisflag_tbl="flag_".$thisflagid[0];
|
||||||
|
if ($flags[0]=="") $flags=[];
|
||||||
if (in_array($thisflagid[0],$flags)) {
|
if (in_array($thisflagid[0],$flags)) {
|
||||||
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"lognotes\" and id=\"$noteid\""))) {
|
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"lognotes\" and id=\"$noteid\""))) {
|
||||||
// set flag for this noteid
|
// set flag for this noteid
|
||||||
|
|||||||
@@ -146,9 +146,7 @@ if ($mfadd) {
|
|||||||
}
|
}
|
||||||
// remove cruft from malfunction text
|
// remove cruft from malfunction text
|
||||||
$mfmalfunction=htmlentities($mfmalfunction);
|
$mfmalfunction=htmlentities($mfmalfunction);
|
||||||
if (!get_magic_quotes_gpc()) {
|
$mfmalfunction=addslashes($mfmalfunction);
|
||||||
$mfmalfunction=addslashes($mfmalfunction);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mfauthorized) {
|
if ($mfauthorized) {
|
||||||
$partdatainput=array();
|
$partdatainput=array();
|
||||||
@@ -170,6 +168,8 @@ if ($mfadd) {
|
|||||||
if ($uid =="" || $partnum == "" || $sernum == "") {
|
if ($uid =="" || $partnum == "" || $sernum == "") {
|
||||||
// have the maintenance form stay pending due to incomplete part data
|
// have the maintenance form stay pending due to incomplete part data
|
||||||
$pending=1;
|
$pending=1;
|
||||||
|
} else {
|
||||||
|
$pending=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the record to maintforms
|
// add the record to maintforms
|
||||||
@@ -195,13 +195,14 @@ if ($mfedit) {
|
|||||||
if ($mfmalfunction && ($uid || ($partnum && $sernum))) {
|
if ($mfmalfunction && ($uid || ($partnum && $sernum))) {
|
||||||
// remove cruft from malfunction text
|
// remove cruft from malfunction text
|
||||||
$mfmalfunction=htmlentities($mfmalfunction);
|
$mfmalfunction=htmlentities($mfmalfunction);
|
||||||
if (!get_magic_quotes_gpc()) {
|
$mfmalfunction=addslashes($mfmalfunction);
|
||||||
$mfmalfunction=addslashes($mfmalfunction);
|
|
||||||
}
|
|
||||||
// update parts table
|
// update parts table
|
||||||
if ($uid =="" || $partnum == "" || $sernum == "") {
|
if ($uid =="" || $partnum == "" || $sernum == "") {
|
||||||
// have the maintenance form stay pending due to incomplete part data
|
// have the maintenance form stay pending due to incomplete part data
|
||||||
$pending=1;
|
$pending=1;
|
||||||
|
} else {
|
||||||
|
$pending=0;
|
||||||
}
|
}
|
||||||
if (! $pdatamismatch) {
|
if (! $pdatamismatch) {
|
||||||
mysqli_query($db,"update parts set uid=\"$uid\", partnum=\"$partnum\", sernum=\"$sernum\", partname=\"$partname\" where partid=\"$mfpart\"");
|
mysqli_query($db,"update parts set uid=\"$uid\", partnum=\"$partnum\", sernum=\"$sernum\", partname=\"$partname\" where partid=\"$mfpart\"");
|
||||||
@@ -215,6 +216,7 @@ if ($mfedit) {
|
|||||||
$flagids=mysqli_query($db,"select flagid from flags");
|
$flagids=mysqli_query($db,"select flagid from flags");
|
||||||
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
||||||
$thisflag_tbl="flag_".$thisflagid[0];
|
$thisflag_tbl="flag_".$thisflagid[0];
|
||||||
|
if ($flags[0]=="") $flags=[];
|
||||||
if (in_array($thisflagid[0],$flags)) {
|
if (in_array($thisflagid[0],$flags)) {
|
||||||
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"maintforms\" and id=\"$maintformid\""))) {
|
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"maintforms\" and id=\"$maintformid\""))) {
|
||||||
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"maintforms\",\"$maintformid\")");
|
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"maintforms\",\"$maintformid\")");
|
||||||
@@ -256,9 +258,7 @@ if ($actionadd) {
|
|||||||
}
|
}
|
||||||
// remove cruft from action text
|
// remove cruft from action text
|
||||||
$action=htmlentities($action);
|
$action=htmlentities($action);
|
||||||
if (!get_magic_quotes_gpc()) {
|
$action=addslashes($action);
|
||||||
$action=addslashes($action);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add to maintactions table
|
// add to maintactions table
|
||||||
mysqli_query($db,"insert into maintactions (actiondate,actiontime,maintformnum,actiontech,action)
|
mysqli_query($db,"insert into maintactions (actiondate,actiontime,maintformnum,actiontech,action)
|
||||||
@@ -273,9 +273,8 @@ if ($actionedit) {
|
|||||||
// update the action
|
// update the action
|
||||||
// remove cruft from action text
|
// remove cruft from action text
|
||||||
$action=htmlentities($action);
|
$action=htmlentities($action);
|
||||||
if (!get_magic_quotes_gpc()) {
|
$action=addslashes($action);
|
||||||
$action=addslashes($action);
|
|
||||||
}
|
|
||||||
// update maintactions table
|
// update maintactions table
|
||||||
mysqli_query($db,"update maintactions set actiondate=\"$actiondate\", actiontime=\"$actiontime\", action=\"$action\" where maintactionid=\"$maintactionid\"");
|
mysqli_query($db,"update maintactions set actiondate=\"$actiondate\", actiontime=\"$actiontime\", action=\"$action\" where maintactionid=\"$maintactionid\"");
|
||||||
}
|
}
|
||||||
@@ -399,6 +398,7 @@ if ($printfmt) {
|
|||||||
}
|
}
|
||||||
$flagslist=mysqli_query($db,"select * from flags");
|
$flagslist=mysqli_query($db,"select * from flags");
|
||||||
while ($flagsymbol=mysqli_fetch_assoc($flagslist)) {
|
while ($flagsymbol=mysqli_fetch_assoc($flagslist)) {
|
||||||
|
if ($theseflags[0]=="") $theseflags=[];
|
||||||
if (in_array($flagsymbol["flagid"],$theseflags)) {
|
if (in_array($flagsymbol["flagid"],$theseflags)) {
|
||||||
echo $flagsymbol['flagsym']." ";
|
echo $flagsymbol['flagsym']." ";
|
||||||
}
|
}
|
||||||
@@ -491,6 +491,7 @@ if ($printfmt) {
|
|||||||
$flagsperline=8;
|
$flagsperline=8;
|
||||||
$flagcount=1;
|
$flagcount=1;
|
||||||
while ($flagcheckbox=mysqli_fetch_assoc($flagslist)) {
|
while ($flagcheckbox=mysqli_fetch_assoc($flagslist)) {
|
||||||
|
if ($theseflags[0]=="") $theseflags=[];
|
||||||
if (in_array($flagcheckbox["flagid"],$theseflags)) {
|
if (in_array($flagcheckbox["flagid"],$theseflags)) {
|
||||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ if ($search) {
|
|||||||
$srchpname=trim($srchpname);
|
$srchpname=trim($srchpname);
|
||||||
$srchploc=trim($srchploc);
|
$srchploc=trim($srchploc);
|
||||||
$srchnha=trim($srchnha);
|
$srchnha=trim($srchnha);
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("log",$target)) {
|
if (in_array("log",$target)) {
|
||||||
// define the query constraints
|
// define the query constraints
|
||||||
// log note id
|
// log note id
|
||||||
@@ -188,6 +189,7 @@ if ($search) {
|
|||||||
$logwhereclause=implode(" and ",$logconstraints);
|
$logwhereclause=implode(" and ",$logconstraints);
|
||||||
$logrowqry=mysqli_query($db,"select lognotes.* from $logfromclause where $logwhereclause order by lognotes.date asc, lognotes.time asc");
|
$logrowqry=mysqli_query($db,"select lognotes.* from $logfromclause where $logwhereclause order by lognotes.date asc, lognotes.time asc");
|
||||||
}
|
}
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("maintform",$target)) {
|
if (in_array("maintform",$target)) {
|
||||||
// maintforms search
|
// maintforms search
|
||||||
// define the query constraints
|
// define the query constraints
|
||||||
@@ -284,6 +286,7 @@ if ($search) {
|
|||||||
$mfwhereclause=implode(" and ",$mfconstraints);
|
$mfwhereclause=implode(" and ",$mfconstraints);
|
||||||
$mfrowqry=mysqli_query($db,"select maintforms.* from $mffromclause where $mfwhereclause order by maintforms.mfdate asc, maintforms.mftime asc");
|
$mfrowqry=mysqli_query($db,"select maintforms.* from $mffromclause where $mfwhereclause order by maintforms.mfdate asc, maintforms.mftime asc");
|
||||||
}
|
}
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("part",$target)) {
|
if (in_array("part",$target)) {
|
||||||
// parts search
|
// parts search
|
||||||
// define the query constraints
|
// define the query constraints
|
||||||
@@ -491,6 +494,7 @@ if (!$print) {
|
|||||||
echo "
|
echo "
|
||||||
<b>Search in:</b>
|
<b>Search in:</b>
|
||||||
";
|
";
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("log", $target)) {
|
if (in_array("log", $target)) {
|
||||||
echo "<input type=\"checkbox\" name=\"target[]\" value=\"log\" title=\"Search in Logbook\" checked>Logbook ";
|
echo "<input type=\"checkbox\" name=\"target[]\" value=\"log\" title=\"Search in Logbook\" checked>Logbook ";
|
||||||
} else {
|
} else {
|
||||||
@@ -590,6 +594,7 @@ if (!$print) {
|
|||||||
$flagcount=1;
|
$flagcount=1;
|
||||||
while ($flagcheckbox=mysqli_fetch_assoc($flagslist)) {
|
while ($flagcheckbox=mysqli_fetch_assoc($flagslist)) {
|
||||||
if ($srchflags) {
|
if ($srchflags) {
|
||||||
|
if ($srchflags[0]=="") $srchflags=[];
|
||||||
if (in_array($flagcheckbox["flagid"],$srchflags)) {
|
if (in_array($flagcheckbox["flagid"],$srchflags)) {
|
||||||
printf("<font color=\"%s\">%s</font>",
|
printf("<font color=\"%s\">%s</font>",
|
||||||
$flagcheckbox["flagcolor"],$flagcheckbox["flagsym"]);
|
$flagcheckbox["flagcolor"],$flagcheckbox["flagsym"]);
|
||||||
@@ -607,6 +612,7 @@ if (!$print) {
|
|||||||
<br><br>
|
<br><br>
|
||||||
";
|
";
|
||||||
if ($doparts) {
|
if ($doparts) {
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
echo "
|
echo "
|
||||||
<b>Search in:</b>
|
<b>Search in:</b>
|
||||||
";
|
";
|
||||||
@@ -629,6 +635,7 @@ if (!$print) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($search) {
|
if ($search) {
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("log",$target)) {
|
if (in_array("log",$target)) {
|
||||||
// run lognotes query and show results
|
// run lognotes query and show results
|
||||||
if(mysqli_num_rows($logrowqry)) {
|
if(mysqli_num_rows($logrowqry)) {
|
||||||
@@ -686,6 +693,7 @@ if ($search) {
|
|||||||
echo "<font size=\"+1\">No Logbook notes match your search criteria.</font><br><hr>";
|
echo "<font size=\"+1\">No Logbook notes match your search criteria.</font><br><hr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("maintform",$target)) {
|
if (in_array("maintform",$target)) {
|
||||||
// run maintforms query and show results
|
// run maintforms query and show results
|
||||||
if(mysqli_num_rows($mfrowqry)) {
|
if(mysqli_num_rows($mfrowqry)) {
|
||||||
@@ -748,6 +756,7 @@ if ($search) {
|
|||||||
echo "<font size=\"+1\">No Maintenance Forms match your search criteria.</font><br><hr>";
|
echo "<font size=\"+1\">No Maintenance Forms match your search criteria.</font><br><hr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($target[0]=="") $target=[];
|
||||||
if (in_array("part",$target)) {
|
if (in_array("part",$target)) {
|
||||||
// run parts query and show results
|
// run parts query and show results
|
||||||
if(mysqli_num_rows($prowqry)) {
|
if(mysqli_num_rows($prowqry)) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
APP_NAME="OpenLog"
|
APP_NAME="OpenLog"
|
||||||
DEFAULT_DB_NAME="openlog"
|
DEFAULT_DB_NAME="openlog"
|
||||||
APP_VERSION="5.2.4.1"
|
APP_VERSION="5.2.4.2"
|
||||||
DOC_ROOT="/var/www"
|
DOC_ROOT="/var/www"
|
||||||
INSTALL_LOC="openlog"
|
INSTALL_LOC="openlog"
|
||||||
APACHE_USER="www-data"
|
APACHE_USER="www-data"
|
||||||
|
|||||||
Reference in New Issue
Block a user