From 634c1c497c51f00ba5512dae69dfffaf6cf0e3e1 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Thu, 17 Sep 2015 17:01:55 +0100 Subject: [PATCH] Mark SMB_OC and SFTP_Key as deprecated backends --- apps/files_external/lib/backend/sftp_key.php | 6 ++++-- apps/files_external/lib/backend/smb_oc.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/files_external/lib/backend/sftp_key.php b/apps/files_external/lib/backend/sftp_key.php index 4a7f565eb1..13f45f1140 100644 --- a/apps/files_external/lib/backend/sftp_key.php +++ b/apps/files_external/lib/backend/sftp_key.php @@ -27,14 +27,15 @@ use \OCA\Files_External\Lib\DefinitionParameter; use \OCA\Files_External\Lib\Auth\AuthMechanism; use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Auth\PublicKey\RSA; +use \OCA\Files_External\Lib\Backend\SFTP; class SFTP_Key extends Backend { - public function __construct(IL10N $l, RSA $legacyAuth) { + public function __construct(IL10N $l, RSA $legacyAuth, SFTP $sftpBackend) { $this ->setIdentifier('\OC\Files\Storage\SFTP_Key') ->setStorageClass('\OC\Files\Storage\SFTP') - ->setText($l->t('SFTP with secret key login [DEPRECATED]')) + ->setText($l->t('SFTP with secret key login')) ->addParameters([ (new DefinitionParameter('host', $l->t('Host'))), (new DefinitionParameter('root', $l->t('Remote subfolder'))) @@ -42,6 +43,7 @@ class SFTP_Key extends Backend { ]) ->addAuthScheme(AuthMechanism::SCHEME_PUBLICKEY) ->setLegacyAuthMechanism($legacyAuth) + ->deprecateTo($sftpBackend) ; } diff --git a/apps/files_external/lib/backend/smb_oc.php b/apps/files_external/lib/backend/smb_oc.php index a3f3a82404..9fc1740088 100644 --- a/apps/files_external/lib/backend/smb_oc.php +++ b/apps/files_external/lib/backend/smb_oc.php @@ -29,6 +29,7 @@ use \OCA\Files_External\Service\BackendService; use \OCA\Files_External\Lib\Auth\Password\SessionCredentials; use \OCA\Files_External\Lib\StorageConfig; use \OCA\Files_External\Lib\LegacyDependencyCheckPolyfill; +use \OCA\Files_External\Lib\Backend\SMB; /** * Deprecated SMB_OC class - use SMB with the password::sessioncredentials auth mechanism @@ -37,11 +38,11 @@ class SMB_OC extends Backend { use LegacyDependencyCheckPolyfill; - public function __construct(IL10N $l, SessionCredentials $legacyAuth) { + public function __construct(IL10N $l, SessionCredentials $legacyAuth, SMB $smbBackend) { $this ->setIdentifier('\OC\Files\Storage\SMB_OC') ->setStorageClass('\OC\Files\Storage\SMB') - ->setText($l->t('SMB / CIFS using OC login [DEPRECATED]')) + ->setText($l->t('SMB / CIFS using OC login')) ->addParameters([ (new DefinitionParameter('host', $l->t('Host'))), (new DefinitionParameter('username_as_share', $l->t('Username as share'))) @@ -54,6 +55,7 @@ class SMB_OC extends Backend { ->setPriority(BackendService::PRIORITY_DEFAULT - 10) ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) ->setLegacyAuthMechanism($legacyAuth) + ->deprecateTo($smbBackend) ; }