summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-05 16:49:23 +0300
committerAndrew Dolgov <[email protected]>2010-11-05 16:49:23 +0300
commit1ea20897a2f2fdfaf8ec2725771d2ff7c8bf27a7 (patch)
treeaf3515b825033428d6952c239523200af8efe919 /functions.php
parent8acc449c6bb2c0e185a6a82a6e29c06c0b8185e0 (diff)
remove read_stampfile()
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/functions.php b/functions.php
index be3937642..256a6402e 100644
--- a/functions.php
+++ b/functions.php
@@ -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;