aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/lock/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/lock/db.php')
-rw-r--r--phpBB/includes/lock/db.php11
1 files changed, 11 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