From a57e6cfa1b6c1e7c75698b2e804b917edff671e9 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Jun 2018 23:28:07 +0200 Subject: [PATCH] Moved Lock.php back to Utils --- src/Core/Worker.php | 1 + src/Protocol/OStatus.php | 1 + src/{Core => Util}/Lock.php | 7 ++++++- src/{Core => Util}/Lock/DatabaseLockDriver.php | 2 +- src/{Core => Util}/Lock/ILockDriver.php | 5 ++++- src/{Core => Util}/Lock/MemcacheLockDriver.php | 2 +- src/{Core => Util}/Lock/SemaphoreLockDriver.php | 2 +- 7 files changed, 15 insertions(+), 5 deletions(-) rename src/{Core => Util}/Lock.php (96%) rename src/{Core => Util}/Lock/DatabaseLockDriver.php (98%) rename src/{Core => Util}/Lock/ILockDriver.php (91%) rename src/{Core => Util}/Lock/MemcacheLockDriver.php (98%) rename src/{Core => Util}/Lock/SemaphoreLockDriver.php (98%) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index b8a9021d0f..0e8835a156 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -11,6 +11,7 @@ use Friendica\Database\DBM; use Friendica\Model\Process; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; +use Friendica\Util\Lock; use dba; require_once 'include/dba.php'; diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 69975c5753..a1223b7b68 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -19,6 +19,7 @@ use Friendica\Model\User; use Friendica\Network\Probe; use Friendica\Object\Image; use Friendica\Util\DateTimeFormat; +use Friendica\Util\Lock; use Friendica\Util\Network; use Friendica\Util\XML; use dba; diff --git a/src/Core/Lock.php b/src/Util/Lock.php similarity index 96% rename from src/Core/Lock.php rename to src/Util/Lock.php index 9e02d14fcb..95341b4b66 100644 --- a/src/Core/Lock.php +++ b/src/Util/Lock.php @@ -10,7 +10,7 @@ namespace Friendica\Util; */ use Friendica\Core\Config; -use Friendica\Core\Lock; +use Friendica\Util\Lock; require_once 'include/dba.php'; @@ -94,4 +94,9 @@ class Lock { self::getDriver()->releaseAll(); } + + public static function isLocked($key) + { + + } } diff --git a/src/Core/Lock/DatabaseLockDriver.php b/src/Util/Lock/DatabaseLockDriver.php similarity index 98% rename from src/Core/Lock/DatabaseLockDriver.php rename to src/Util/Lock/DatabaseLockDriver.php index 8761a1479e..b2e8f50279 100644 --- a/src/Core/Lock/DatabaseLockDriver.php +++ b/src/Util/Lock/DatabaseLockDriver.php @@ -1,6 +1,6 @@