diff --git a/apps/files_external/lib/backend/sftp_key.php b/apps/files_external/lib/backend/sftp_key.php index 4a7f565eb19..13f45f1140c 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 a3f3a824040..9fc17400884 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) ; }