@@ -25,10 +25,10 @@ |
||
25 | 25 | use OCP\IL10N; |
26 | 26 | |
27 | 27 | class KerberosAuth extends AuthMechanism { |
28 | - public function __construct(IL10N $l) { |
|
29 | - $this |
|
30 | - ->setIdentifier('smb::kerberos') |
|
31 | - ->setScheme(self::SCHEME_SMB) |
|
32 | - ->setText($l->t('Kerberos ticket')); |
|
33 | - } |
|
28 | + public function __construct(IL10N $l) { |
|
29 | + $this |
|
30 | + ->setIdentifier('smb::kerberos') |
|
31 | + ->setScheme(self::SCHEME_SMB) |
|
32 | + ->setText($l->t('Kerberos ticket')); |
|
33 | + } |
|
34 | 34 | } |
@@ -24,11 +24,11 @@ |
||
24 | 24 | <?php if (!is_null($_['backupProvider'])): ?> |
25 | 25 | <p> |
26 | 26 | <a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
27 | - [ |
|
28 | - 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | - 'redirect_url' => $_['redirect_url'], |
|
30 | - ] |
|
31 | - )) ?>"> |
|
27 | + [ |
|
28 | + 'challengeProviderId' => $_['backupProvider']->getId(), |
|
29 | + 'redirect_url' => $_['redirect_url'], |
|
30 | + ] |
|
31 | + )) ?>"> |
|
32 | 32 | <?php p($l->t('Use backup code')) ?> |
33 | 33 | </a> |
34 | 34 | </p> |
@@ -24,33 +24,33 @@ |
||
24 | 24 | use OCP\IUser; |
25 | 25 | |
26 | 26 | interface ITrashManager extends ITrashBackend { |
27 | - /** |
|
28 | - * Add a backend for the trashbin |
|
29 | - * |
|
30 | - * @param string $storageType |
|
31 | - * @param ITrashBackend $backend |
|
32 | - * @since 15.0.0 |
|
33 | - */ |
|
34 | - public function registerBackend(string $storageType, ITrashBackend $backend); |
|
27 | + /** |
|
28 | + * Add a backend for the trashbin |
|
29 | + * |
|
30 | + * @param string $storageType |
|
31 | + * @param ITrashBackend $backend |
|
32 | + * @since 15.0.0 |
|
33 | + */ |
|
34 | + public function registerBackend(string $storageType, ITrashBackend $backend); |
|
35 | 35 | |
36 | - /** |
|
37 | - * List all trash items in the root of the trashbin |
|
38 | - * |
|
39 | - * @param IUser $user |
|
40 | - * @return ITrashItem[] |
|
41 | - * @since 15.0.0 |
|
42 | - */ |
|
43 | - public function listTrashRoot(IUser $user): array; |
|
36 | + /** |
|
37 | + * List all trash items in the root of the trashbin |
|
38 | + * |
|
39 | + * @param IUser $user |
|
40 | + * @return ITrashItem[] |
|
41 | + * @since 15.0.0 |
|
42 | + */ |
|
43 | + public function listTrashRoot(IUser $user): array; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Temporally prevent files from being moved to the trash |
|
47 | - * |
|
48 | - * @since 15.0.0 |
|
49 | - */ |
|
50 | - public function pauseTrash(); |
|
45 | + /** |
|
46 | + * Temporally prevent files from being moved to the trash |
|
47 | + * |
|
48 | + * @since 15.0.0 |
|
49 | + */ |
|
50 | + public function pauseTrash(); |
|
51 | 51 | |
52 | - /** |
|
53 | - * @since 15.0.0 |
|
54 | - */ |
|
55 | - public function resumeTrash(); |
|
52 | + /** |
|
53 | + * @since 15.0.0 |
|
54 | + */ |
|
55 | + public function resumeTrash(); |
|
56 | 56 | } |
@@ -31,54 +31,54 @@ |
||
31 | 31 | * @since 15.0.0 |
32 | 32 | */ |
33 | 33 | interface ITrashBackend { |
34 | - /** |
|
35 | - * List all trash items in the root of the trashbin |
|
36 | - * |
|
37 | - * @param IUser $user |
|
38 | - * @return ITrashItem[] |
|
39 | - * @since 15.0.0 |
|
40 | - */ |
|
41 | - public function listTrashRoot(IUser $user): array; |
|
34 | + /** |
|
35 | + * List all trash items in the root of the trashbin |
|
36 | + * |
|
37 | + * @param IUser $user |
|
38 | + * @return ITrashItem[] |
|
39 | + * @since 15.0.0 |
|
40 | + */ |
|
41 | + public function listTrashRoot(IUser $user): array; |
|
42 | 42 | |
43 | - /** |
|
44 | - * List all trash items in a subfolder in the trashbin |
|
45 | - * |
|
46 | - * @param ITrashItem $folder |
|
47 | - * @return ITrashItem[] |
|
48 | - * @since 15.0.0 |
|
49 | - */ |
|
50 | - public function listTrashFolder(ITrashItem $folder): array; |
|
43 | + /** |
|
44 | + * List all trash items in a subfolder in the trashbin |
|
45 | + * |
|
46 | + * @param ITrashItem $folder |
|
47 | + * @return ITrashItem[] |
|
48 | + * @since 15.0.0 |
|
49 | + */ |
|
50 | + public function listTrashFolder(ITrashItem $folder): array; |
|
51 | 51 | |
52 | - /** |
|
53 | - * Restore a trashbin item |
|
54 | - * |
|
55 | - * @param ITrashItem $item |
|
56 | - * @since 15.0.0 |
|
57 | - */ |
|
58 | - public function restoreItem(ITrashItem $item); |
|
52 | + /** |
|
53 | + * Restore a trashbin item |
|
54 | + * |
|
55 | + * @param ITrashItem $item |
|
56 | + * @since 15.0.0 |
|
57 | + */ |
|
58 | + public function restoreItem(ITrashItem $item); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Permanently remove an item from trash |
|
62 | - * |
|
63 | - * @param ITrashItem $item |
|
64 | - * @since 15.0.0 |
|
65 | - */ |
|
66 | - public function removeItem(ITrashItem $item); |
|
60 | + /** |
|
61 | + * Permanently remove an item from trash |
|
62 | + * |
|
63 | + * @param ITrashItem $item |
|
64 | + * @since 15.0.0 |
|
65 | + */ |
|
66 | + public function removeItem(ITrashItem $item); |
|
67 | 67 | |
68 | - /** |
|
69 | - * Move a file or folder to trash |
|
70 | - * |
|
71 | - * @param IStorage $storage |
|
72 | - * @param string $internalPath |
|
73 | - * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally |
|
74 | - * @since 15.0.0 |
|
75 | - */ |
|
76 | - public function moveToTrash(IStorage $storage, string $internalPath): bool; |
|
68 | + /** |
|
69 | + * Move a file or folder to trash |
|
70 | + * |
|
71 | + * @param IStorage $storage |
|
72 | + * @param string $internalPath |
|
73 | + * @return boolean whether or not the file was moved to trash, if false then the file should be deleted normally |
|
74 | + * @since 15.0.0 |
|
75 | + */ |
|
76 | + public function moveToTrash(IStorage $storage, string $internalPath): bool; |
|
77 | 77 | |
78 | - /** |
|
79 | - * @param IUser $user |
|
80 | - * @param int $fileId |
|
81 | - * @return Node|null |
|
82 | - */ |
|
83 | - public function getTrashNodeById(IUser $user, int $fileId); |
|
78 | + /** |
|
79 | + * @param IUser $user |
|
80 | + * @param int $fileId |
|
81 | + * @return Node|null |
|
82 | + */ |
|
83 | + public function getTrashNodeById(IUser $user, int $fileId); |
|
84 | 84 | } |
@@ -32,18 +32,18 @@ |
||
32 | 32 | |
33 | 33 | class Version1008Date20181105112049 extends SimpleMigrationStep { |
34 | 34 | |
35 | - /** |
|
36 | - * @param IOutput $output |
|
37 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | - * @param array $options |
|
39 | - * @return null|ISchemaWrapper |
|
40 | - */ |
|
41 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | - /** @var ISchemaWrapper $schema */ |
|
43 | - $schema = $schemaClosure(); |
|
44 | - $table = $schema->getTable('calendarsubscriptions'); |
|
45 | - $table->dropColumn('source_copy'); |
|
35 | + /** |
|
36 | + * @param IOutput $output |
|
37 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | + * @param array $options |
|
39 | + * @return null|ISchemaWrapper |
|
40 | + */ |
|
41 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | + /** @var ISchemaWrapper $schema */ |
|
43 | + $schema = $schemaClosure(); |
|
44 | + $table = $schema->getTable('calendarsubscriptions'); |
|
45 | + $table->dropColumn('source_copy'); |
|
46 | 46 | |
47 | - return $schema; |
|
48 | - } |
|
47 | + return $schema; |
|
48 | + } |
|
49 | 49 | } |
@@ -32,18 +32,18 @@ |
||
32 | 32 | |
33 | 33 | class Version1008Date20181105104833 extends SimpleMigrationStep { |
34 | 34 | |
35 | - /** |
|
36 | - * @param IOutput $output |
|
37 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | - * @param array $options |
|
39 | - * @return null|ISchemaWrapper |
|
40 | - */ |
|
41 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | - /** @var ISchemaWrapper $schema */ |
|
43 | - $schema = $schemaClosure(); |
|
44 | - $table = $schema->getTable('calendarsubscriptions'); |
|
45 | - $table->dropColumn('source'); |
|
35 | + /** |
|
36 | + * @param IOutput $output |
|
37 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
38 | + * @param array $options |
|
39 | + * @return null|ISchemaWrapper |
|
40 | + */ |
|
41 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
42 | + /** @var ISchemaWrapper $schema */ |
|
43 | + $schema = $schemaClosure(); |
|
44 | + $table = $schema->getTable('calendarsubscriptions'); |
|
45 | + $table->dropColumn('source'); |
|
46 | 46 | |
47 | - return $schema; |
|
48 | - } |
|
47 | + return $schema; |
|
48 | + } |
|
49 | 49 | } |
@@ -33,27 +33,27 @@ |
||
33 | 33 | class Version1008Date20181114084440 extends SimpleMigrationStep { |
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * @param IOutput $output |
|
38 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | - * @param array $options |
|
40 | - * @return null|ISchemaWrapper |
|
41 | - */ |
|
42 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
43 | - /** @var ISchemaWrapper $schema */ |
|
44 | - $schema = $schemaClosure(); |
|
45 | - |
|
46 | - if ($schema->hasTable('calendarchanges')) { |
|
47 | - $calendarChangesTable = $schema->getTable('calendarchanges'); |
|
48 | - if ($calendarChangesTable->hasIndex('calendarid_calendartype_synctoken')) { |
|
49 | - $calendarChangesTable->dropIndex('calendarid_calendartype_synctoken'); |
|
50 | - } |
|
51 | - |
|
52 | - if (!$calendarChangesTable->hasIndex('calid_type_synctoken')) { |
|
53 | - $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calid_type_synctoken'); |
|
54 | - } |
|
55 | - } |
|
56 | - |
|
57 | - return $schema; |
|
58 | - } |
|
36 | + /** |
|
37 | + * @param IOutput $output |
|
38 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
39 | + * @param array $options |
|
40 | + * @return null|ISchemaWrapper |
|
41 | + */ |
|
42 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
43 | + /** @var ISchemaWrapper $schema */ |
|
44 | + $schema = $schemaClosure(); |
|
45 | + |
|
46 | + if ($schema->hasTable('calendarchanges')) { |
|
47 | + $calendarChangesTable = $schema->getTable('calendarchanges'); |
|
48 | + if ($calendarChangesTable->hasIndex('calendarid_calendartype_synctoken')) { |
|
49 | + $calendarChangesTable->dropIndex('calendarid_calendartype_synctoken'); |
|
50 | + } |
|
51 | + |
|
52 | + if (!$calendarChangesTable->hasIndex('calid_type_synctoken')) { |
|
53 | + $calendarChangesTable->addIndex(['calendarid', 'calendartype', 'synctoken'], 'calid_type_synctoken'); |
|
54 | + } |
|
55 | + } |
|
56 | + |
|
57 | + return $schema; |
|
58 | + } |
|
59 | 59 | } |
@@ -31,68 +31,68 @@ |
||
31 | 31 | |
32 | 32 | class Version010401Date20181207190718 extends SimpleMigrationStep { |
33 | 33 | |
34 | - /** |
|
35 | - * @param IOutput $output |
|
36 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
37 | - * @param array $options |
|
38 | - * @return null|ISchemaWrapper |
|
39 | - */ |
|
40 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
41 | - /** @var ISchemaWrapper $schema */ |
|
42 | - $schema = $schemaClosure(); |
|
34 | + /** |
|
35 | + * @param IOutput $output |
|
36 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
37 | + * @param array $options |
|
38 | + * @return null|ISchemaWrapper |
|
39 | + */ |
|
40 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { |
|
41 | + /** @var ISchemaWrapper $schema */ |
|
42 | + $schema = $schemaClosure(); |
|
43 | 43 | |
44 | - if (!$schema->hasTable('oauth2_clients')) { |
|
45 | - $table = $schema->createTable('oauth2_clients'); |
|
46 | - $table->addColumn('id', 'integer', [ |
|
47 | - 'autoincrement' => true, |
|
48 | - 'notnull' => true, |
|
49 | - 'unsigned' => true, |
|
50 | - ]); |
|
51 | - $table->addColumn('name', 'string', [ |
|
52 | - 'notnull' => true, |
|
53 | - 'length' => 64, |
|
54 | - ]); |
|
55 | - $table->addColumn('redirect_uri', 'string', [ |
|
56 | - 'notnull' => true, |
|
57 | - 'length' => 2000, |
|
58 | - ]); |
|
59 | - $table->addColumn('client_identifier', 'string', [ |
|
60 | - 'notnull' => true, |
|
61 | - 'length' => 64, |
|
62 | - ]); |
|
63 | - $table->addColumn('secret', 'string', [ |
|
64 | - 'notnull' => true, |
|
65 | - 'length' => 64, |
|
66 | - ]); |
|
67 | - $table->setPrimaryKey(['id']); |
|
68 | - $table->addIndex(['client_identifier'], 'oauth2_client_id_idx'); |
|
69 | - } |
|
44 | + if (!$schema->hasTable('oauth2_clients')) { |
|
45 | + $table = $schema->createTable('oauth2_clients'); |
|
46 | + $table->addColumn('id', 'integer', [ |
|
47 | + 'autoincrement' => true, |
|
48 | + 'notnull' => true, |
|
49 | + 'unsigned' => true, |
|
50 | + ]); |
|
51 | + $table->addColumn('name', 'string', [ |
|
52 | + 'notnull' => true, |
|
53 | + 'length' => 64, |
|
54 | + ]); |
|
55 | + $table->addColumn('redirect_uri', 'string', [ |
|
56 | + 'notnull' => true, |
|
57 | + 'length' => 2000, |
|
58 | + ]); |
|
59 | + $table->addColumn('client_identifier', 'string', [ |
|
60 | + 'notnull' => true, |
|
61 | + 'length' => 64, |
|
62 | + ]); |
|
63 | + $table->addColumn('secret', 'string', [ |
|
64 | + 'notnull' => true, |
|
65 | + 'length' => 64, |
|
66 | + ]); |
|
67 | + $table->setPrimaryKey(['id']); |
|
68 | + $table->addIndex(['client_identifier'], 'oauth2_client_id_idx'); |
|
69 | + } |
|
70 | 70 | |
71 | - if (!$schema->hasTable('oauth2_access_tokens')) { |
|
72 | - $table = $schema->createTable('oauth2_access_tokens'); |
|
73 | - $table->addColumn('id', 'integer', [ |
|
74 | - 'autoincrement' => true, |
|
75 | - 'notnull' => true, |
|
76 | - 'unsigned' => true, |
|
77 | - ]); |
|
78 | - $table->addColumn('token_id', 'integer', [ |
|
79 | - 'notnull' => true, |
|
80 | - ]); |
|
81 | - $table->addColumn('client_id', 'integer', [ |
|
82 | - 'notnull' => true, |
|
83 | - ]); |
|
84 | - $table->addColumn('hashed_code', 'string', [ |
|
85 | - 'notnull' => true, |
|
86 | - 'length' => 128, |
|
87 | - ]); |
|
88 | - $table->addColumn('encrypted_token', 'string', [ |
|
89 | - 'notnull' => true, |
|
90 | - 'length' => 786, |
|
91 | - ]); |
|
92 | - $table->setPrimaryKey(['id']); |
|
93 | - $table->addUniqueIndex(['hashed_code'], 'oauth2_access_hash_idx'); |
|
94 | - $table->addIndex(['client_id'], 'oauth2_access_client_id_idx'); |
|
95 | - } |
|
96 | - return $schema; |
|
97 | - } |
|
71 | + if (!$schema->hasTable('oauth2_access_tokens')) { |
|
72 | + $table = $schema->createTable('oauth2_access_tokens'); |
|
73 | + $table->addColumn('id', 'integer', [ |
|
74 | + 'autoincrement' => true, |
|
75 | + 'notnull' => true, |
|
76 | + 'unsigned' => true, |
|
77 | + ]); |
|
78 | + $table->addColumn('token_id', 'integer', [ |
|
79 | + 'notnull' => true, |
|
80 | + ]); |
|
81 | + $table->addColumn('client_id', 'integer', [ |
|
82 | + 'notnull' => true, |
|
83 | + ]); |
|
84 | + $table->addColumn('hashed_code', 'string', [ |
|
85 | + 'notnull' => true, |
|
86 | + 'length' => 128, |
|
87 | + ]); |
|
88 | + $table->addColumn('encrypted_token', 'string', [ |
|
89 | + 'notnull' => true, |
|
90 | + 'length' => 786, |
|
91 | + ]); |
|
92 | + $table->setPrimaryKey(['id']); |
|
93 | + $table->addUniqueIndex(['hashed_code'], 'oauth2_access_hash_idx'); |
|
94 | + $table->addIndex(['client_id'], 'oauth2_access_client_id_idx'); |
|
95 | + } |
|
96 | + return $schema; |
|
97 | + } |
|
98 | 98 | } |
@@ -33,57 +33,57 @@ |
||
33 | 33 | * @package OC\Http |
34 | 34 | */ |
35 | 35 | class Response implements IResponse { |
36 | - /** @var ResponseInterface */ |
|
37 | - private $response; |
|
36 | + /** @var ResponseInterface */ |
|
37 | + private $response; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @var bool |
|
41 | - */ |
|
42 | - private $stream; |
|
39 | + /** |
|
40 | + * @var bool |
|
41 | + */ |
|
42 | + private $stream; |
|
43 | 43 | |
44 | - /** |
|
45 | - * @param ResponseInterface $response |
|
46 | - * @param bool $stream |
|
47 | - */ |
|
48 | - public function __construct(ResponseInterface $response, $stream = false) { |
|
49 | - $this->response = $response; |
|
50 | - $this->stream = $stream; |
|
51 | - } |
|
44 | + /** |
|
45 | + * @param ResponseInterface $response |
|
46 | + * @param bool $stream |
|
47 | + */ |
|
48 | + public function __construct(ResponseInterface $response, $stream = false) { |
|
49 | + $this->response = $response; |
|
50 | + $this->stream = $stream; |
|
51 | + } |
|
52 | 52 | |
53 | - /** |
|
54 | - * @return string|resource |
|
55 | - */ |
|
56 | - public function getBody() { |
|
57 | - return $this->stream ? |
|
58 | - $this->response->getBody()->detach(): |
|
59 | - $this->response->getBody()->getContents(); |
|
60 | - } |
|
53 | + /** |
|
54 | + * @return string|resource |
|
55 | + */ |
|
56 | + public function getBody() { |
|
57 | + return $this->stream ? |
|
58 | + $this->response->getBody()->detach(): |
|
59 | + $this->response->getBody()->getContents(); |
|
60 | + } |
|
61 | 61 | |
62 | - /** |
|
63 | - * @return int |
|
64 | - */ |
|
65 | - public function getStatusCode(): int { |
|
66 | - return $this->response->getStatusCode(); |
|
67 | - } |
|
62 | + /** |
|
63 | + * @return int |
|
64 | + */ |
|
65 | + public function getStatusCode(): int { |
|
66 | + return $this->response->getStatusCode(); |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * @param string $key |
|
71 | - * @return string |
|
72 | - */ |
|
73 | - public function getHeader(string $key): string { |
|
74 | - $headers = $this->response->getHeader($key); |
|
69 | + /** |
|
70 | + * @param string $key |
|
71 | + * @return string |
|
72 | + */ |
|
73 | + public function getHeader(string $key): string { |
|
74 | + $headers = $this->response->getHeader($key); |
|
75 | 75 | |
76 | - if (count($headers) === 0) { |
|
77 | - return ''; |
|
78 | - } |
|
76 | + if (count($headers) === 0) { |
|
77 | + return ''; |
|
78 | + } |
|
79 | 79 | |
80 | - return $headers[0]; |
|
81 | - } |
|
80 | + return $headers[0]; |
|
81 | + } |
|
82 | 82 | |
83 | - /** |
|
84 | - * @return array |
|
85 | - */ |
|
86 | - public function getHeaders(): array { |
|
87 | - return $this->response->getHeaders(); |
|
88 | - } |
|
83 | + /** |
|
84 | + * @return array |
|
85 | + */ |
|
86 | + public function getHeaders(): array { |
|
87 | + return $this->response->getHeaders(); |
|
88 | + } |
|
89 | 89 | } |