]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Lock.php
Merge pull request #7250 from MrPetovan/bug/6410-normalize-message-button
[friendica.git] / src / Core / Lock.php
index 91c444253aa838a5fd3c8b4f5457bcf053bb0493..a45490bf3966065990476741e64340910bb78582 100644 (file)
@@ -1,14 +1,13 @@
 <?php
 
-namespace Friendica\Core;
-
 /**
  * @file src/Core/Lock.php
  * @brief Functions for preventing parallel execution of functions
  */
 
-use Friendica\Core\Logger;
-use Friendica\Core\Cache\CacheDriverFactory;
+namespace Friendica\Core;
+
+use Friendica\Factory\CacheDriverFactory;
 use Friendica\Core\Cache\IMemoryCacheDriver;
 
 /**
@@ -123,12 +122,13 @@ class Lock
        /**
         * @brief Releases a lock if it was set by us
         *
-        * @param string $key Name of the lock
+        * @param string $key      Name of the lock
+        * @param bool   $override Overrides the lock to get releases
         * @return void
         */
-       public static function release($key)
+       public static function release($key, $override = false)
        {
-               self::getDriver()->releaseLock($key);
+               self::getDriver()->releaseLock($key, $override);
        }
 
        /**