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