@@ -29,30 +29,30 @@ |
||
| 29 | 29 | |
| 30 | 30 | class Version1004Date20170919104507 extends SimpleMigrationStep { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @param IOutput $output |
|
| 34 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 35 | - * @param array $options |
|
| 36 | - * @return null|ISchemaWrapper |
|
| 37 | - * @since 13.0.0 |
|
| 38 | - */ |
|
| 39 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 40 | - /** @var ISchemaWrapper $schema */ |
|
| 41 | - $schema = $schemaClosure(); |
|
| 42 | - |
|
| 43 | - $table = $schema->getTable('addressbooks'); |
|
| 44 | - $column = $table->getColumn('id'); |
|
| 45 | - $column->setUnsigned(true); |
|
| 46 | - |
|
| 47 | - $table = $schema->getTable('calendarobjects'); |
|
| 48 | - $column = $table->getColumn('id'); |
|
| 49 | - $column->setUnsigned(true); |
|
| 50 | - |
|
| 51 | - $table = $schema->getTable('calendarchanges'); |
|
| 52 | - $column = $table->getColumn('id'); |
|
| 53 | - $column->setUnsigned(true); |
|
| 54 | - |
|
| 55 | - return $schema; |
|
| 56 | - } |
|
| 32 | + /** |
|
| 33 | + * @param IOutput $output |
|
| 34 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 35 | + * @param array $options |
|
| 36 | + * @return null|ISchemaWrapper |
|
| 37 | + * @since 13.0.0 |
|
| 38 | + */ |
|
| 39 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 40 | + /** @var ISchemaWrapper $schema */ |
|
| 41 | + $schema = $schemaClosure(); |
|
| 42 | + |
|
| 43 | + $table = $schema->getTable('addressbooks'); |
|
| 44 | + $column = $table->getColumn('id'); |
|
| 45 | + $column->setUnsigned(true); |
|
| 46 | + |
|
| 47 | + $table = $schema->getTable('calendarobjects'); |
|
| 48 | + $column = $table->getColumn('id'); |
|
| 49 | + $column->setUnsigned(true); |
|
| 50 | + |
|
| 51 | + $table = $schema->getTable('calendarchanges'); |
|
| 52 | + $column = $table->getColumn('id'); |
|
| 53 | + $column->setUnsigned(true); |
|
| 54 | + |
|
| 55 | + return $schema; |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | 58 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * @package OC\AppFramework\Middleware\Security\Exceptions |
| 37 | 37 | */ |
| 38 | 38 | class NotAdminException extends SecurityException { |
| 39 | - public function __construct(string $message) { |
|
| 40 | - parent::__construct($message, Http::STATUS_FORBIDDEN); |
|
| 41 | - } |
|
| 39 | + public function __construct(string $message) { |
|
| 40 | + parent::__construct($message, Http::STATUS_FORBIDDEN); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -30,30 +30,30 @@ |
||
| 30 | 30 | * Delete the admin|personal sections and settings tables |
| 31 | 31 | */ |
| 32 | 32 | class Version14000Date20180129121024 extends SimpleMigrationStep { |
| 33 | - public function name(): string { |
|
| 34 | - return 'Drop obsolete settings tables'; |
|
| 35 | - } |
|
| 33 | + public function name(): string { |
|
| 34 | + return 'Drop obsolete settings tables'; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - public function description(): string { |
|
| 38 | - return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"'; |
|
| 39 | - } |
|
| 37 | + public function description(): string { |
|
| 38 | + return 'Drops the following obsolete tables: "admin_sections", "admin_settings", "personal_sections" and "personal_settings"'; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - /** |
|
| 42 | - * @param IOutput $output |
|
| 43 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 44 | - * @param array $options |
|
| 45 | - * @return null|ISchemaWrapper |
|
| 46 | - * @since 13.0.0 |
|
| 47 | - */ |
|
| 48 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 49 | - /** @var ISchemaWrapper $schema */ |
|
| 50 | - $schema = $schemaClosure(); |
|
| 41 | + /** |
|
| 42 | + * @param IOutput $output |
|
| 43 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 44 | + * @param array $options |
|
| 45 | + * @return null|ISchemaWrapper |
|
| 46 | + * @since 13.0.0 |
|
| 47 | + */ |
|
| 48 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 49 | + /** @var ISchemaWrapper $schema */ |
|
| 50 | + $schema = $schemaClosure(); |
|
| 51 | 51 | |
| 52 | - $schema->dropTable('admin_sections'); |
|
| 53 | - $schema->dropTable('admin_settings'); |
|
| 54 | - $schema->dropTable('personal_sections'); |
|
| 55 | - $schema->dropTable('personal_settings'); |
|
| 52 | + $schema->dropTable('admin_sections'); |
|
| 53 | + $schema->dropTable('admin_settings'); |
|
| 54 | + $schema->dropTable('personal_sections'); |
|
| 55 | + $schema->dropTable('personal_settings'); |
|
| 56 | 56 | |
| 57 | - return $schema; |
|
| 58 | - } |
|
| 57 | + return $schema; |
|
| 58 | + } |
|
| 59 | 59 | } |
@@ -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,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 | } |