1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-27 01:51:28 +00:00

remove read_stampfile()

This commit is contained in:
Andrew Dolgov
2010-11-05 16:49:23 +03:00
parent 8acc449c6b
commit 1ea20897a2
2 changed files with 3 additions and 25 deletions

View File

@@ -2263,26 +2263,6 @@
}
}
function read_stampfile($filename) {
error_reporting(0);
$fp = fopen(LOCK_DIRECTORY . "/$filename", "r");
error_reporting (DEFAULT_ERROR_LEVEL);
if ($fp) {
if (flock($fp, LOCK_EX)) {
$stamp = fgets($fp);
flock($fp, LOCK_UN);
fclose($fp);
return $stamp;
} else {
return false;
}
} else {
return false;
}
}
function sql_random_function() {
if (DB_TYPE == "mysql") {
return "RAND()";
@@ -3223,9 +3203,7 @@
if (time() - $_SESSION["daemon_stamp_check"] > 30) {
$stamp = (int)read_stampfile("update_daemon.stamp");
// print "<param key=\"daemon_stamp_delta\" value=\"$stamp_delta\"/>";
$stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp");
if ($stamp) {
$stamp_delta = time() - $stamp;