sub showPackage {
my ($pkg) = @_;
- my @fm = &::dbGet("freshmeat", "*", "projectname_short='$pkg'");
+ my @fm = &::dbGet("freshmeat", "*",
+ "projectname_short=".&dbQuote($pkg) );
if (scalar @fm) { #1: perfect match of name.
my $retval;
{ "latest_version" => time() }
);
- &::dbRaw("LOCK", "LOCK TABLES freshmeat WRITE");
+# &::dbRaw("LOCK", "LOCK TABLES freshmeat WRITE");
@cols = &::dbGetColInfo("freshmeat");
$locktime = time();
}
close IN;
- &::dbRaw("UNLOCK", "UNLOCK TABLES");
+# &::dbRaw("UNLOCK", "UNLOCK TABLES");
my $delta_time = &::timedelta($start_time);
&::status(sprintf("Freshmeat: %.02f sec to complete.", $delta_time)) if ($delta_time > 0);
}
$i++;
- &::dbSetRow("freshmeat", @data);
+ &::dbSetRow("freshmeat", [@data], "DELAY");
undef @data;
undef %pkg;
# I think the following leaks 120k of memory each time it's
# called... the wonders of libmysql-perl leaking!
- &::dbRaw("UNLOCK", "UNLOCK TABLES");
+# &::dbRaw("UNLOCK", "UNLOCK TABLES");
### another lame hack to "prevent" errors.
- select(undef, undef, undef, 0.2);
- &::dbRaw("LOCK", "LOCK TABLES freshmeat WRITE");
+# select(undef, undef, undef, 0.2);
+# &::dbRaw("LOCK", "LOCK TABLES freshmeat WRITE");
}
}
}