summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-01-17 06:33:52 +0100
committerAndrew Dolgov <[email protected]>2008-01-17 06:33:52 +0100
commitcfa43e025cf4246d815a5f1539cd34b461130a9a (patch)
tree46878553faade2228647d512188fdc548bb0e051 /functions.php
parente3b9d084d46c34faad8808d3d3624a7c6826ed93 (diff)
new config option: LOCK_DIRECTORY (bump config version)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 0a55695aa..b445ab675 100644
--- a/functions.php
+++ b/functions.php
@@ -1857,7 +1857,7 @@
function file_is_locked($filename) {
if (function_exists('flock')) {
error_reporting(0);
- $fp = fopen($filename, "r");
+ $fp = fopen(LOCK_DIRECTORY . "/$filename", "r");
error_reporting(DEFAULT_ERROR_LEVEL);
if ($fp) {
if (flock($fp, LOCK_EX | LOCK_NB)) {
@@ -1873,7 +1873,7 @@
}
function make_lockfile($filename) {
- $fp = fopen($filename, "w");
+ $fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
if (flock($fp, LOCK_EX | LOCK_NB)) {
return $fp;
@@ -1883,7 +1883,7 @@
}
function make_stampfile($filename) {
- $fp = fopen($filename, "w");
+ $fp = fopen(LOCK_DIRECTORY . "/$filename", "w");
if (flock($fp, LOCK_EX | LOCK_NB)) {
fwrite($fp, time() . "\n");
@@ -1898,7 +1898,7 @@
function read_stampfile($filename) {
error_reporting(0);
- $fp = fopen($filename, "r");
+ $fp = fopen(LOCK_DIRECTORY . "/$filename", "r");
error_reporting (DEFAULT_ERROR_LEVEL);
if (flock($fp, LOCK_EX)) {