ratelimitfile : allow the lockfile to be in the same directory than the ratelimit files

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2229 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2015-08-13 09:48:10 +00:00
parent b52ad9e970
commit a98697b5f6

View File

@@ -26,6 +26,7 @@ class ratelimitfile extends ratelimit
if ($this->debug) echo "Add entry : $currentTimeStamp";
file_put_contents ($file, $currentTimeStamp, FILE_APPEND);
$lock = new lockfile ();
$lock->storagelock = $this->storageDir."/lockfile.lock";
$lock->lockRW ();
$contents = file ($file);
// Look if there is deprecated entries in the file