sub PutFooter {
- print PerformSubsts(Param("footerhtml"));
+ print PerformSubsts(Param("footerhtml"));
+ SyncAnyPendingShadowChanges();
}
}
}
+my $shadowchanges = 0;
+sub SyncAnyPendingShadowChanges {
+ if ($shadowchanges) {
+ system("./syncshadowdb &");
+ $shadowchanges = 0;
+ }
+}
+
+
my $dosqllog = (-e "data/sqllog") && (-w "data/sqllog");
sub SqlLog {
if ($insertid) {
SendSQL("SET LAST_INSERT_ID = $insertid");
}
- system("./syncshadowdb &");
+ $shadowchanges++;
}
}