]> lifelog.hopto.org Git - LifeLog.git/commitdiff
toLog fixes!
authorWill Budic <redacted>
Wed, 19 Feb 2020 10:31:34 +0000 (21:31 +1100)
committerWill Budic <redacted>
Wed, 19 Feb 2020 10:31:34 +0000 (21:31 +1100)
Current Development Check List.md
htdocs/cgi-bin/system/modules/Settings.pm

index f5e4649389e905ff38322233204350870eb404da..16fabde9ffa1faf78ef73ae4b1fa8b35682ae609 100644 (file)
@@ -78,7 +78,7 @@ This version is not compatible in data structure to prior versions. Data migrati
 
 ### v. 1.8 Encountered/Fixed
 
-* Bug 18 - Same day datediff is displaying wrong report in time stack on the page.
+* Bug 19 - Same day datediff is displaying wrong report in time stack on the page.
 * &#10004; Issue 18 - Setting excludes for views, deliveres page but long delays with server finished exchange (page doesn't hang).
   * The page is server delivered, if sections contain external internet links, this timeouts page browser delivery if the internet is down.
 * &#10004; Bug 17 - Editing of entries on occasions, duplicates entries.
index b9b2128f0d27333ec66508a473d2de68cf8786ee..6f822677946cd7b6603d57a8bc4dcf19fc018831 100644 (file)
@@ -247,10 +247,15 @@ sub toLog {
     my $stamp = getCurrentSQLTimeStamp();
         if(!$cat){
             my @arr = selectRecords($db,"SELECT ID FROM CAT WHERE NAME LIKE 'System';")->fetchrow_array();
-            $cat = 0 if not @arr;
+            if(@arr){
+                $cat = $arr[0];
+            }
+            else{
+                $cat = 6;
+            }
         }
        $log =~ s/'/''/g;
-       $db->do("INSERT INTO LOG (ID_CAT, DATE, LOG) VALUES(6,'$stamp', \"$log\");");
+       $db->do("INSERT INTO LOG (ID_CAT, DATE, LOG) VALUES($cat,'$stamp', \"$log\");");
 }
 
 sub countRecordsIn {