From 89ed2c37bf656ceb772bb6759c8977a7dc78b3fb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jun 2020 16:49:16 +0200 Subject: Update share type constant usage Signed-off-by: Joas Schilling --- apps/admin_audit/lib/Actions/Sharing.php | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'apps/admin_audit/lib') diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 1384d6f2350..8652ff7d195 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -30,7 +30,7 @@ declare(strict_types=1); namespace OCA\AdminAudit\Actions; -use OCP\Share; +use OCP\Share\IShare; /** * Class Sharing logs the sharing actions @@ -44,7 +44,7 @@ class Sharing extends Action { * @param array $params */ public function shared(array $params) { - if ($params['shareType'] === Share::SHARE_TYPE_LINK) { + if ($params['shareType'] === IShare::TYPE_LINK) { $this->log( 'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)', $params, @@ -56,7 +56,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_USER) { + } elseif ($params['shareType'] === IShare::TYPE_USER) { $this->log( 'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s" (Share ID: %s)', $params, @@ -69,7 +69,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) { + } elseif ($params['shareType'] === IShare::TYPE_GROUP) { $this->log( 'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s" (Share ID: %s)', $params, @@ -82,7 +82,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_ROOM) { + } elseif ($params['shareType'] === IShare::TYPE_ROOM) { $this->log( 'The %s "%s" with ID "%s" has been shared to the room "%s" with permissions "%s" (Share ID: %s)', $params, @@ -95,7 +95,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_EMAIL) { + } elseif ($params['shareType'] === IShare::TYPE_EMAIL) { $this->log( 'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)', $params, @@ -108,7 +108,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_CIRCLE) { + } elseif ($params['shareType'] === IShare::TYPE_CIRCLE) { $this->log( 'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)', $params, @@ -121,7 +121,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_REMOTE) { + } elseif ($params['shareType'] === IShare::TYPE_REMOTE) { $this->log( 'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)', $params, @@ -134,7 +134,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_REMOTE_GROUP) { + } elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) { $this->log( 'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)', $params, @@ -156,7 +156,7 @@ class Sharing extends Action { * @param array $params */ public function unshare(array $params) { - if ($params['shareType'] === Share::SHARE_TYPE_LINK) { + if ($params['shareType'] === IShare::TYPE_LINK) { $this->log( 'The %s "%s" with ID "%s" has been unshared (Share ID: %s)', $params, @@ -167,7 +167,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_USER) { + } elseif ($params['shareType'] === IShare::TYPE_USER) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)', $params, @@ -179,7 +179,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_GROUP) { + } elseif ($params['shareType'] === IShare::TYPE_GROUP) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)', $params, @@ -191,7 +191,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_ROOM) { + } elseif ($params['shareType'] === IShare::TYPE_ROOM) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the room "%s" (Share ID: %s)', $params, @@ -203,7 +203,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_EMAIL) { + } elseif ($params['shareType'] === IShare::TYPE_EMAIL) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)', $params, @@ -215,7 +215,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_CIRCLE) { + } elseif ($params['shareType'] === IShare::TYPE_CIRCLE) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)', $params, @@ -227,7 +227,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_REMOTE) { + } elseif ($params['shareType'] === IShare::TYPE_REMOTE) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)', $params, @@ -239,7 +239,7 @@ class Sharing extends Action { 'id', ] ); - } elseif ($params['shareType'] === Share::SHARE_TYPE_REMOTE_GROUP) { + } elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) { $this->log( 'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)', $params, -- cgit v1.2.3