diff options
Diffstat (limited to 'phpBB/includes/lock')
| -rw-r--r-- | phpBB/includes/lock/db.php | 11 | ||||
| -rw-r--r-- | phpBB/includes/lock/flock.php | 11 | 
2 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/lock/db.php b/phpBB/includes/lock/db.php index ccdaed0b28..5cc0821aa0 100644 --- a/phpBB/includes/lock/db.php +++ b/phpBB/includes/lock/db.php @@ -117,6 +117,17 @@ class phpbb_lock_db  	}  	/** +	* Does this process own the lock? +	* +	* @return	bool			true if lock is owned +	*							false otherwise +	*/ +	public function owns_lock() +	{ +		return (bool) $this->locked; +	} + +	/**  	* Releases the lock.  	*  	* The lock must have been previously obtained, that is, acquire() call diff --git a/phpBB/includes/lock/flock.php b/phpBB/includes/lock/flock.php index 97bc7dd2b9..17de0847c0 100644 --- a/phpBB/includes/lock/flock.php +++ b/phpBB/includes/lock/flock.php @@ -111,6 +111,17 @@ class phpbb_lock_flock  	}  	/** +	* Does this process own the lock? +	* +	* @return	bool			true if lock is owned +	*							false otherwise +	*/ +	public function owns_lock() +	{ +		return (bool) $this->lock_fp; +	} + +	/**  	* Releases the lock.  	*  	* The lock must have been previously obtained, that is, acquire() call  | 
