Incorporate changes made for old version 5.2.4.2

This commit is contained in:
2026-02-10 15:01:54 -05:00
parent 3a0cf99432
commit 6b720a6163
9 changed files with 45 additions and 16 deletions

View File

@@ -249,6 +249,7 @@ if ($add) {
$flagids=mysqli_query($db,"select flagid from flags");
while ($thisflagid=mysqli_fetch_row($flagids)) {
$thisflag_tbl="flag_".$thisflagid[0];
if ($flags[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\""))) {
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"notetemplates\",\"$templateid\")");
@@ -368,6 +369,7 @@ if ($edit) {
$chainmembers=generate_chain($noteid);
while ($thisflagid=mysqli_fetch_row($flagids)) {
$thisflag_tbl="flag_".$thisflagid[0];
if ($flags[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\""))) {
// set flag for this noteid