Compare commits
13 Commits
ec8efec61e
...
Issue-2
| Author | SHA1 | Date | |
|---|---|---|---|
| c17c4d4608 | |||
| 5d3296c3bc | |||
| 09464aace5 | |||
| e3de786766 | |||
| b0aaf70e4d | |||
| b70996b4d9 | |||
| 8647c9b4d8 | |||
| b201ac6d24 | |||
| 1480feecf0 | |||
| f84395f79a | |||
| f3db1c1523 | |||
| 962bd7b504 | |||
| f20b4cd8b6 |
@@ -280,4 +280,11 @@
|
||||
is enabled.
|
||||
- Validate all date and time fields to prevent user entered invalid date
|
||||
formats from crashing php.
|
||||
- Fixed profile page to automatically refresh page to show the results
|
||||
when a user changes their color preferences.
|
||||
|
||||
5.3.1 - 2026-02-25
|
||||
- Fixed bug reported as Issue 1 where failure to select an action for a
|
||||
part entered in a lognote crashed php in logentry.php.
|
||||
- Fixed bug where the prompt to set flags on reference chain appeared
|
||||
even when no flags were available to select in logentry.php.
|
||||
|
||||
4
INSTALL
4
INSTALL
@@ -4,7 +4,6 @@
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
|
||||
Installation of OpenLog is straightforward.
|
||||
|
||||
1. Gather the required information.
|
||||
@@ -31,5 +30,4 @@ settings. You will need to log in as OpenLogAdmin. The initial default password
|
||||
is "OpenLog-1". From the Administration page, you can click on the links at the
|
||||
top to add techs, subjects, shifts, etc.
|
||||
|
||||
7. Start using OpenLog.
|
||||
|
||||
6. Start using OpenLog.
|
||||
|
||||
@@ -1 +1 @@
|
||||
5.3.0
|
||||
5.3.1
|
||||
|
||||
@@ -122,7 +122,7 @@ set autocommit = 0;
|
||||
|
||||
INSERT INTO
|
||||
`configs`
|
||||
VALUES (1, 'ol_version', '5.3.0'),
|
||||
VALUES (1, 'ol_version', '5.3.1'),
|
||||
(2, 'log_name', 'OpenLog'),
|
||||
(3, 'banner', '1'),
|
||||
(
|
||||
|
||||
@@ -144,3 +144,7 @@ do
|
||||
done
|
||||
echo "...done."
|
||||
# -------------------------------------
|
||||
|
||||
# ---------- version 5.3.1 ------------
|
||||
# Nothing to do
|
||||
# -------------------------------------
|
||||
@@ -84,3 +84,8 @@ CREATE TABLE IF NOT EXISTS `reflinks` (
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------
|
||||
|
||||
-- ---------- version 5.3.1 -------------
|
||||
-- Update version number
|
||||
UPDATE configs SET confvalue = "5.3.1" WHERE confname = "ol_version";
|
||||
-- --------------------------------------
|
||||
@@ -280,4 +280,12 @@
|
||||
is enabled.
|
||||
- Validate all date and time fields to prevent user entered invalid date
|
||||
formats from crashing php.
|
||||
- Fixed profile page to automatically refresh page to show the results
|
||||
when a user changes their color preferences.
|
||||
|
||||
5.3.1 - 2026-02-25
|
||||
- Fixed bug reported as Issue 1 where failure to select an action for a
|
||||
part entered in a lognote crashed php in logentry.php.
|
||||
- Fixed bug where the prompt to set flags on reference chain appeared
|
||||
even when no flags were available to select in logentry.php.
|
||||
|
||||
|
||||
@@ -764,6 +764,7 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from techs where techid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["techname"];
|
||||
$pass = $passconf = "password_is_unchanged";
|
||||
$shift = $currentvalues["shift"];
|
||||
@@ -777,6 +778,13 @@ switch ($table) {
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = NULL;
|
||||
$pass = NULL;
|
||||
$shift = NULL;
|
||||
$admintag = "<input type=\"checkbox\" name=\"admin\">";
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
// set form options for add
|
||||
$sectiontitle = "<b>Add New Tech</b><br><br>";
|
||||
@@ -878,12 +886,17 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from shifts where shiftid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["shiftname"];
|
||||
if ($currentvalues["status"] == 1) {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\" checked>";
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = NULL;
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
// set form options for add
|
||||
$sectiontitle = "<b>Add New Shift</b><br><br>";
|
||||
@@ -952,12 +965,17 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from subjects where subjectid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["subjectname"];
|
||||
if ($currentvalues["status"] == 1) {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\" checked>";
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = "";
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
// set form options for add
|
||||
$sectiontitle = "<b>Add New Subject</b><br><br>";
|
||||
@@ -1026,6 +1044,7 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from links where linkid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["displaytxt"];
|
||||
$priority = $currentvalues["linkpriority"];
|
||||
$url = $currentvalues["urltxt"];
|
||||
@@ -1034,6 +1053,12 @@ switch ($table) {
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = NULL;
|
||||
$priority = NULL;
|
||||
$url = NULL;
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
// determine where we are in the priority stack
|
||||
$prow = mysqli_fetch_assoc(mysqli_query($db, "select min(linkpriority) as highest from links"));
|
||||
if ($prow["highest"] == $priority) {
|
||||
@@ -1145,10 +1170,22 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from flags where flagid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["flagname"];
|
||||
$flagsym = $currentvalues["flagsym"];
|
||||
$flagcolor = $currentvalues["flagcolor"];
|
||||
$flagcoloropts = "";
|
||||
if ($currentvalues["status"] == 1) {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\" checked>";
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = NULL;
|
||||
$flagsym = NULL;
|
||||
$flagcolor = NULL;
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
foreach ($basic_colors as $cname => $chex) {
|
||||
if ($chex == $flagcolor) {
|
||||
$flagcoloropts = $flagcoloropts . "<option value=\"$chex\" selected>$cname</option>";
|
||||
@@ -1156,11 +1193,6 @@ switch ($table) {
|
||||
$flagcoloropts = $flagcoloropts . "<option value=\"$chex\">$cname</option>";
|
||||
}
|
||||
}
|
||||
if ($currentvalues["status"] == 1) {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\" checked>";
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
// set form options for add
|
||||
$sectiontitle = "<b>Add New Flag</b><br><br>";
|
||||
@@ -1246,12 +1278,17 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from logpartactions where lpactionid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["lpactionname"];
|
||||
if ($currentvalues["status"] == 1) {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\" checked>";
|
||||
} else {
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
$name = NULL;
|
||||
$activetag = "<input type=\"checkbox\" name=\"active\">";
|
||||
}
|
||||
} else {
|
||||
// set form options for add
|
||||
$sectiontitle = "<b>Add New Part Action</b><br><br>";
|
||||
@@ -1320,9 +1357,15 @@ switch ($table) {
|
||||
";
|
||||
// pull current values from database
|
||||
$currentvalues = mysqli_fetch_assoc(mysqli_query($db, "select * from banners where bannerid=$id"));
|
||||
if (!empty($currentvalues)) {
|
||||
$name = $currentvalues["bannername"];
|
||||
$bnrcolor = $currentvalues["bannercolor"];
|
||||
$bnrtextcolor = $currentvalues["textcolor"];
|
||||
} else {
|
||||
$name = NULL;
|
||||
$bnrcolor = NULL;
|
||||
$bnrtextcolor = NULL;
|
||||
}
|
||||
$bnrcoloropts = "";
|
||||
foreach ($basic_colors as $cname => $chex) {
|
||||
if ($chex == $bnrcolor) {
|
||||
|
||||
@@ -40,7 +40,7 @@ $uids = $_POST['uids'] ?? [];
|
||||
$partnums = $_POST['partnums'] ?? [];
|
||||
$sernums = $_POST['sernums'] ?? [];
|
||||
$actions = $_POST['actions'] ?? [];
|
||||
$mfreqs = $_POST['mfreqs'] ?? [];
|
||||
$mfreqs = $_POST['mfreqs'] ?? ["off"];
|
||||
$schedmaintcomplete = $_REQUEST['schedmaintcomplete'] ?? NULL;
|
||||
$partview = $_REQUEST['partview'] ?? NULL;
|
||||
|
||||
@@ -199,7 +199,7 @@ if ($add) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$newnoteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$newnoteid\")");
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ if ($add) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$newnoteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$newnoteid\")");
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ if ($add) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$newnoteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$newnoteid\")");
|
||||
}
|
||||
} else {
|
||||
@@ -364,7 +364,7 @@ if ($edit) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$noteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$noteid\")");
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ if ($edit) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$noteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$noteid\")");
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ if ($edit) {
|
||||
// add it to logparts table
|
||||
mysqli_query($db, "insert into logparts(lognoteid,partid,action) values(\"$noteid\",\"$lpid\",\"$actions[$plidx]\")");
|
||||
// create a maintenance form if required
|
||||
if ($mfreqs[$plidx] == "on") {
|
||||
if (array_key_exists($plidx,$mfreqs) && $mfreqs[$plidx] == "on") {
|
||||
mysqli_query($db, "insert into maintforms(mfdate,mftech,mfpart,pending,lognoteid) values(\"$date\",\"$techid\",\"$lpid\",1,\"$noteid\")");
|
||||
}
|
||||
} else {
|
||||
@@ -619,7 +619,6 @@ $flagcount = 1;
|
||||
|
||||
// display checkboxes for all the flags, selecting the ones that are set for this note/template
|
||||
while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
||||
|
||||
if (in_array($flagcheckbox["flagid"], $theseflags)) {
|
||||
printf(
|
||||
"<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||
@@ -648,9 +647,15 @@ while ($flagcheckbox = mysqli_fetch_assoc($flagslist)) {
|
||||
$flagcount = 1;
|
||||
}
|
||||
}
|
||||
if (mysqli_num_rows($flagslist)) {
|
||||
echo "
|
||||
<br><input type=\"checkbox\" name=\"syncflags\" value=\"1\"><font title=\"Set the selected flags on the other notes in the reference chain\">Set flags on reference chain</font>
|
||||
";
|
||||
} else {
|
||||
echo "
|
||||
<input type=\"hidden\" name=\"syncflags\" value=\"0\">
|
||||
";
|
||||
}
|
||||
|
||||
if ($add && $refto) $refstring = $refto;
|
||||
echo "
|
||||
@@ -678,18 +683,14 @@ if ($add) {
|
||||
<td align=\"center\"><input type=\"text\" name=\"partnums[$partline]\" size=\"20\"></td>
|
||||
<td align=\"center\"><input type=\"text\" name=\"sernums[$partline]\" size=\"20\"></td>
|
||||
<td align=\"center\"><select name=\"actions[$partline]\">
|
||||
<option value=\"select\">Select Action</option>
|
||||
<option value=\"$defaultaction\" selected>Select Action</option>
|
||||
";
|
||||
$actrow = mysqli_query($db, "select * from logpartactions");
|
||||
while ($actitem = mysqli_fetch_assoc($actrow)) {
|
||||
if ($actitem["status"] == 1) {
|
||||
if ($actitem["lpactionid"] == $defaultaction) {
|
||||
printf("<option value=\"%s\" selected>%s</option>", $actitem["lpactionid"], $actitem["lpactionname"]);
|
||||
} else {
|
||||
printf("<option value=\"%s\">%s</option>", $actitem["lpactionid"], $actitem["lpactionname"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</select>
|
||||
</td>
|
||||
@@ -739,19 +740,28 @@ if ($edit) {
|
||||
<td align=\"center\">$epsn</td>
|
||||
<td align=\"center\">
|
||||
";
|
||||
$actrow = mysqli_query($db, "select * from logpartactions");
|
||||
while ($actitem = mysqli_fetch_assoc($actrow)) {
|
||||
if ($actitem["lpactionid"] == $defaultaction) {
|
||||
echo "$actitem[lpactionname]";
|
||||
}
|
||||
if ($defaultaction) {
|
||||
// an action was selected previously, so just display it
|
||||
$actname = dblookup($db, "logpartactions", "lpactionid", "lpactionname", $defaultaction);
|
||||
echo "$actname";
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
";
|
||||
// find maint form for this line and show link
|
||||
$mflinknum = mysqli_fetch_assoc(mysqli_query($db, "select maintformid from maintforms where lognoteid=\"$noteid\" and mfpart=\"$lpidvar\""))["maintformid"];
|
||||
echo "
|
||||
<td align=\"center\"><a href=\"maintformentry.php?mfedit=1&maintformid=$mflinknum\" title=\"Click to view/edit this maintenance form\">$mflinknum</a></td>
|
||||
<td align=\"center\">
|
||||
";
|
||||
$mflinkqry = mysqli_query($db, "select maintformid from maintforms where lognoteid=\"$noteid\" and mfpart=\"$lpidvar\"");
|
||||
if (mysqli_num_rows($mflinkqry)) {
|
||||
$mflinkdata = mysqli_fetch_assoc($mflinkqry);
|
||||
$mflinknum = $mflinkdata["maintformid"];
|
||||
echo "
|
||||
<a href=\"maintformentry.php?mfedit=1&maintformid=$mflinknum\" title=\"Click to view/edit this maintenance form\">$mflinknum</a>
|
||||
";
|
||||
}
|
||||
echo "
|
||||
</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
@@ -764,18 +774,14 @@ if ($edit) {
|
||||
<td align=\"center\"><input type=\"text\" name=\"partnums[$partline]\" size=\"20\"></td>
|
||||
<td align=\"center\"><input type=\"text\" name=\"sernums[$partline]\" size=\"20\"></td>
|
||||
<td align=\"center\"><select name=\"actions[$partline]\">
|
||||
<option value=\"select\">Select Action</option>
|
||||
<option value=\"$defaultaction\" selected>Select Action</option>
|
||||
";
|
||||
$actrow = mysqli_query($db, "select * from logpartactions");
|
||||
while ($actitem = mysqli_fetch_assoc($actrow)) {
|
||||
if ($actitem["status"] == 1) {
|
||||
if ($actitem["lpactionid"] == $defaultaction) {
|
||||
printf("<option value=\"%s\" selected>%s</option>", $actitem["lpactionid"], $actitem["lpactionname"]);
|
||||
} else {
|
||||
printf("<option value=\"%s\">%s</option>", $actitem["lpactionid"], $actitem["lpactionname"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@@ -116,6 +116,8 @@ if (!$print) {
|
||||
// color settings
|
||||
$hexcolor = "#" . ltrim($hexcolor);
|
||||
putsetting($modcolor, $hexcolor, $techid);
|
||||
$currentpage = $_SERVER['PHP_SELF'];
|
||||
header("Refresh: .1; url=$currentpage");
|
||||
}
|
||||
if ($resetcustom) mysqli_query($db, "delete from customs where customtech=\"$techid\"");
|
||||
|
||||
|
||||
@@ -130,7 +130,6 @@ if ($add) {
|
||||
}
|
||||
// run through the memberlist and modify the table
|
||||
foreach ($memberlist as $memberdev) {
|
||||
|
||||
$addqry = ("insert into events(task,device,start_date,last_date,deferred_flag,deferred_date,active_flag)
|
||||
values(\"$task\",\"$memberdev\",\"$start_date\",\"$last_date\",\"$deferred_flag\",\"$deferred_date\",\"$active_flag\")");
|
||||
mysqli_query($db, $addqry);
|
||||
|
||||
@@ -34,8 +34,8 @@ $srchpname = $_REQUEST['srchpname'] ?? NULL;
|
||||
$srchploc = $_REQUEST['srchploc'] ?? NULL;
|
||||
$srchnha = $_REQUEST['srchnha'] ?? NULL;
|
||||
$srchrepord = $_REQUEST['srchrepord'] ?? NULL;
|
||||
$srchflags = $_POST['srchflags'] ?? [];
|
||||
$target = $_REQUEST['target'] ?? NULL;
|
||||
$srchflags = $_REQUEST['srchflags'] ?? [];
|
||||
$target = $_REQUEST['target'] ?? ["log", "maintform", "part"];
|
||||
|
||||
$doparts = PARTS_FUNCTIONS;
|
||||
$logname = LOG_NAME;
|
||||
@@ -56,7 +56,7 @@ framework("begin", "$logname Search", "Search", $print);
|
||||
|
||||
// echo "REQUEST variables: <br>";
|
||||
// var_dump($_REQUEST);
|
||||
|
||||
// echo "<br>";
|
||||
|
||||
// ******** begin database manipulation ********
|
||||
|
||||
@@ -92,7 +92,6 @@ if ($search) {
|
||||
$srchpname = trim($srchpname);
|
||||
$srchploc = trim($srchploc);
|
||||
$srchnha = trim($srchnha);
|
||||
if ($target[0] == "") $target = [];
|
||||
if (in_array("log", $target)) {
|
||||
// define the query constraints
|
||||
// log note id
|
||||
@@ -131,23 +130,6 @@ if ($search) {
|
||||
$logfromtables[] = "lognotes";
|
||||
$logconstraints[] = "lognotes.lognote like \"%$srchtext%\"";
|
||||
}
|
||||
// flags
|
||||
if (!empty($srchflags)) {
|
||||
unset($flagconstraints);
|
||||
$flagcount = count($srchflags);
|
||||
$logfromtables[] = "lognotes";
|
||||
$logfromtables[] = "flagmap";
|
||||
$flagconstraints[] = "flagmap.lognoteid=lognotes.lognoteid and flagmap.flagid in (";
|
||||
foreach ($srchflags as $flagid) {
|
||||
$flagconstraints[] = "\"$flagid\"";
|
||||
$flagconstraints[] = ",";
|
||||
}
|
||||
// remove final comma
|
||||
array_splice($flagconstraints, -1, 1);
|
||||
$flagconstraints[] = ") group by flagmap.lognoteid having count(distinct flagmap.flagid)=$flagcount";
|
||||
// make flagconstraints a single string so that the final implode doesn't split it
|
||||
$logconstraints[] = join('', $flagconstraints);
|
||||
}
|
||||
// uid
|
||||
if ($srchuid != "any" && $srchuid != "") {
|
||||
$logfromtables[] = "lognotes";
|
||||
@@ -200,12 +182,28 @@ if ($search) {
|
||||
$logfromtables[] = "maintforms";
|
||||
$logconstraints[] = "lognotes.lognoteid=logparts.lognoteid and logparts.partid=parts.partid and maintforms.mfpart=parts.partid and maintforms.repord=\"{$srchrepord}\"";
|
||||
}
|
||||
// flags
|
||||
if (!empty($srchflags)) {
|
||||
unset($flagconstraints);
|
||||
$flagcount = count($srchflags);
|
||||
$logfromtables[] = "lognotes";
|
||||
$logfromtables[] = "flagmap";
|
||||
$flagconstraints[] = "flagmap.lognoteid=lognotes.lognoteid and flagmap.flagid in (";
|
||||
foreach ($srchflags as $flagid) {
|
||||
$flagconstraints[] = "\"$flagid\"";
|
||||
$flagconstraints[] = ",";
|
||||
}
|
||||
// remove final comma
|
||||
array_splice($flagconstraints, -1, 1);
|
||||
$flagconstraints[] = ") group by flagmap.lognoteid having count(distinct flagmap.flagid)=$flagcount";
|
||||
// make flagconstraints a single string so that the final implode doesn't split it
|
||||
$logconstraints[] = join('', $flagconstraints);
|
||||
}
|
||||
// build the clauses and run the query
|
||||
$logfromclause = implode(",", array_unique($logfromtables));
|
||||
$logwhereclause = implode(" and ", $logconstraints);
|
||||
$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)) {
|
||||
// maintforms search
|
||||
// define the query constraints
|
||||
@@ -248,23 +246,6 @@ if ($search) {
|
||||
$mffromtables[] = "maintactions";
|
||||
$mfconstraints[] = "maintforms.mfmalfunction like \"%$srchtext%\" or (maintactions.action like \"%$srchtext%\" and maintforms.maintformid=maintactions.maintformnum)";
|
||||
}
|
||||
// flags
|
||||
if (!empty($srchflags)) {
|
||||
unset($flagconstraints);
|
||||
$flagcount = count($srchflags);
|
||||
$mffromtables[] = "maintforms";
|
||||
$mffromtables[] = "flagmap";
|
||||
$flagconstraints[] = "flagmap.maintformid=maintforms.maintformid and flagmap.flagid in (";
|
||||
foreach ($srchflags as $thisflagid) {
|
||||
$flagconstraints[] = "\"$thisflagid\"";
|
||||
$flagconstraints[] = ",";
|
||||
}
|
||||
// remove final comma
|
||||
array_splice($flagconstraints, -1, 1);
|
||||
$flagconstraints[] = ") group by flagmap.maintformid having count(distinct flagmap.flagid)=$flagcount";
|
||||
// make flagconstraints a single string so that the final implode doesn't split it
|
||||
$mfconstraints[] = join('', $flagconstraints);
|
||||
}
|
||||
// uid
|
||||
if ($srchuid != "any" && $srchuid != "") {
|
||||
$mffromtables[] = "maintforms";
|
||||
@@ -307,12 +288,28 @@ if ($search) {
|
||||
$mffromtables[] = "maintforms";
|
||||
$mfconstraints[] = "maintforms.mfpart=parts.partid and maintforms.repord=\"{$srchrepord}\"";
|
||||
}
|
||||
// flags
|
||||
if (!empty($srchflags)) {
|
||||
unset($flagconstraints);
|
||||
$flagcount = count($srchflags);
|
||||
$mffromtables[] = "maintforms";
|
||||
$mffromtables[] = "flagmap";
|
||||
$flagconstraints[] = "flagmap.maintformid=maintforms.maintformid and flagmap.flagid in (";
|
||||
foreach ($srchflags as $thisflagid) {
|
||||
$flagconstraints[] = "\"$thisflagid\"";
|
||||
$flagconstraints[] = ",";
|
||||
}
|
||||
// remove final comma
|
||||
array_splice($flagconstraints, -1, 1);
|
||||
$flagconstraints[] = ") group by flagmap.maintformid having count(distinct flagmap.flagid)=$flagcount";
|
||||
// make flagconstraints a single string so that the final implode doesn't split it
|
||||
$mfconstraints[] = join('', $flagconstraints);
|
||||
}
|
||||
// build the clauses and run the query
|
||||
$mffromclause = implode(",", array_unique($mffromtables));
|
||||
$mfwhereclause = implode(" and ", $mfconstraints);
|
||||
$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)) {
|
||||
// parts search
|
||||
// define the query constraints
|
||||
@@ -334,7 +331,6 @@ if ($search) {
|
||||
// tech doesn't apply to parts
|
||||
// subject doesn't apply to parts
|
||||
// search text doesn't apply to parts
|
||||
// flags doesn't apply to parts
|
||||
// uid
|
||||
if ($srchuid != "any" && $srchuid != "") {
|
||||
$pfromtables[] = "parts";
|
||||
@@ -373,6 +369,7 @@ if ($search) {
|
||||
$pfromtables[] = "maintforms";
|
||||
$pconstraints[] = "maintforms.mfpart=parts.partid and maintforms.repord=\"{$srchrepord}\"";
|
||||
}
|
||||
// flags doesn't apply to parts
|
||||
// build the clauses and run the query
|
||||
$pfromclause = implode(",", array_unique($pfromtables));
|
||||
$pwhereclause = implode(" and ", $pconstraints);
|
||||
|
||||
@@ -41,3 +41,15 @@ fi
|
||||
# ---------- version 5.2.4.4 -----------
|
||||
# No changes
|
||||
# --------------------------------------
|
||||
|
||||
# ---------- version 5.2.5 -------------
|
||||
# No changes
|
||||
# --------------------------------------
|
||||
|
||||
# ---------- version 5.3.0 -------------
|
||||
# No changes
|
||||
# --------------------------------------
|
||||
|
||||
# ---------- version 5.3.1 -------------
|
||||
# No changes
|
||||
# --------------------------------------
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
APP_NAME="OpenLog"
|
||||
DEFAULT_DB_NAME="openlog"
|
||||
APP_VERSION="5.3.0"
|
||||
APP_VERSION="5.3.1"
|
||||
DOC_ROOT="/var/www"
|
||||
INSTALL_LOC="openlog"
|
||||
APACHE_CONF_DIR="/etc/apache2/conf-available"
|
||||
@@ -202,7 +202,7 @@ then
|
||||
else
|
||||
# proceed with upgrade
|
||||
# put app in maintenance mode
|
||||
echo "Putting the applocation in maintenance mode..."
|
||||
echo "Putting the application in maintenance mode..."
|
||||
# make sure mod_rewrite is enabled
|
||||
if [[ ! -e "$APACHE_CONF_DIR/../mods-enabled/rewrite.load" ]]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user