@@ -37,55 +37,55 @@ |
||
37 | 37 | */ |
38 | 38 | class Version1011Date20190725113607 extends SimpleMigrationStep { |
39 | 39 | |
40 | - /** |
|
41 | - * @param IOutput $output |
|
42 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
43 | - * @param array $options |
|
44 | - * @return null|ISchemaWrapper |
|
45 | - * @since 13.0.0 |
|
46 | - */ |
|
47 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
48 | - /** @var ISchemaWrapper $schema */ |
|
49 | - $schema = $schemaClosure(); |
|
40 | + /** |
|
41 | + * @param IOutput $output |
|
42 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
43 | + * @param array $options |
|
44 | + * @return null|ISchemaWrapper |
|
45 | + * @since 13.0.0 |
|
46 | + */ |
|
47 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
48 | + /** @var ISchemaWrapper $schema */ |
|
49 | + $schema = $schemaClosure(); |
|
50 | 50 | |
51 | - $types = ['resource', 'room']; |
|
52 | - foreach ($types as $type) { |
|
53 | - if (!$schema->hasTable($this->getMetadataTableName($type))) { |
|
54 | - $table = $schema->createTable($this->getMetadataTableName($type)); |
|
51 | + $types = ['resource', 'room']; |
|
52 | + foreach ($types as $type) { |
|
53 | + if (!$schema->hasTable($this->getMetadataTableName($type))) { |
|
54 | + $table = $schema->createTable($this->getMetadataTableName($type)); |
|
55 | 55 | |
56 | - $table->addColumn('id', Types::BIGINT, [ |
|
57 | - 'autoincrement' => true, |
|
58 | - 'notnull' => true, |
|
59 | - 'length' => 11, |
|
60 | - 'unsigned' => true, |
|
61 | - ]); |
|
62 | - $table->addColumn($type . '_id', Types::BIGINT, [ |
|
63 | - 'notnull' => true, |
|
64 | - 'length' => 11, |
|
65 | - 'unsigned' => true, |
|
66 | - ]); |
|
67 | - $table->addColumn('key', Types::STRING, [ |
|
68 | - 'notnull' => true, |
|
69 | - 'length' => 255, |
|
70 | - ]); |
|
71 | - $table->addColumn('value', Types::STRING, [ |
|
72 | - 'notnull' => false, |
|
73 | - 'length' => 4000, |
|
74 | - ]); |
|
56 | + $table->addColumn('id', Types::BIGINT, [ |
|
57 | + 'autoincrement' => true, |
|
58 | + 'notnull' => true, |
|
59 | + 'length' => 11, |
|
60 | + 'unsigned' => true, |
|
61 | + ]); |
|
62 | + $table->addColumn($type . '_id', Types::BIGINT, [ |
|
63 | + 'notnull' => true, |
|
64 | + 'length' => 11, |
|
65 | + 'unsigned' => true, |
|
66 | + ]); |
|
67 | + $table->addColumn('key', Types::STRING, [ |
|
68 | + 'notnull' => true, |
|
69 | + 'length' => 255, |
|
70 | + ]); |
|
71 | + $table->addColumn('value', Types::STRING, [ |
|
72 | + 'notnull' => false, |
|
73 | + 'length' => 4000, |
|
74 | + ]); |
|
75 | 75 | |
76 | - $table->setPrimaryKey(['id']); |
|
77 | - $table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk'); |
|
78 | - } |
|
79 | - } |
|
76 | + $table->setPrimaryKey(['id']); |
|
77 | + $table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk'); |
|
78 | + } |
|
79 | + } |
|
80 | 80 | |
81 | - return $schema; |
|
82 | - } |
|
81 | + return $schema; |
|
82 | + } |
|
83 | 83 | |
84 | - /** |
|
85 | - * @param string $type |
|
86 | - * @return string |
|
87 | - */ |
|
88 | - private function getMetadataTableName(string $type):string { |
|
89 | - return 'calendar_' . $type . 's_md'; |
|
90 | - } |
|
84 | + /** |
|
85 | + * @param string $type |
|
86 | + * @return string |
|
87 | + */ |
|
88 | + private function getMetadataTableName(string $type):string { |
|
89 | + return 'calendar_' . $type . 's_md'; |
|
90 | + } |
|
91 | 91 | } |
@@ -35,16 +35,16 @@ |
||
35 | 35 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
36 | 36 | |
37 | 37 | class Application extends App implements IBootstrap { |
38 | - public const APP_ID = 'sharebymail'; |
|
38 | + public const APP_ID = 'sharebymail'; |
|
39 | 39 | |
40 | - public function __construct() { |
|
41 | - parent::__construct(self::APP_ID); |
|
42 | - } |
|
40 | + public function __construct() { |
|
41 | + parent::__construct(self::APP_ID); |
|
42 | + } |
|
43 | 43 | |
44 | - public function register(IRegistrationContext $context): void { |
|
45 | - $context->registerCapability(Capabilities::class); |
|
46 | - } |
|
44 | + public function register(IRegistrationContext $context): void { |
|
45 | + $context->registerCapability(Capabilities::class); |
|
46 | + } |
|
47 | 47 | |
48 | - public function boot(IBootContext $context): void { |
|
49 | - } |
|
48 | + public function boot(IBootContext $context): void { |
|
49 | + } |
|
50 | 50 | } |
@@ -32,17 +32,17 @@ |
||
32 | 32 | * @since 20.0.0 |
33 | 33 | */ |
34 | 34 | interface IDeferrableApp extends IApp { |
35 | - /** |
|
36 | - * Start deferring notifications until `flush()` is called |
|
37 | - * |
|
38 | - * @since 20.0.0 |
|
39 | - */ |
|
40 | - public function defer(): void; |
|
35 | + /** |
|
36 | + * Start deferring notifications until `flush()` is called |
|
37 | + * |
|
38 | + * @since 20.0.0 |
|
39 | + */ |
|
40 | + public function defer(): void; |
|
41 | 41 | |
42 | - /** |
|
43 | - * Send all deferred notifications that have been stored since `defer()` was called |
|
44 | - * |
|
45 | - * @since 20.0.0 |
|
46 | - */ |
|
47 | - public function flush(): void; |
|
42 | + /** |
|
43 | + * Send all deferred notifications that have been stored since `defer()` was called |
|
44 | + * |
|
45 | + * @since 20.0.0 |
|
46 | + */ |
|
47 | + public function flush(): void; |
|
48 | 48 | } |
@@ -33,51 +33,51 @@ |
||
33 | 33 | |
34 | 34 | class Version1010Date20200630191302 extends SimpleMigrationStep { |
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(); |
|
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 | 45 | |
46 | - if (!$schema->hasTable('trusted_servers')) { |
|
47 | - $table = $schema->createTable('trusted_servers'); |
|
48 | - $table->addColumn('id', Types::INTEGER, [ |
|
49 | - 'autoincrement' => true, |
|
50 | - 'notnull' => true, |
|
51 | - 'length' => 4, |
|
52 | - ]); |
|
53 | - $table->addColumn('url', Types::STRING, [ |
|
54 | - 'notnull' => true, |
|
55 | - 'length' => 512, |
|
56 | - ]); |
|
57 | - $table->addColumn('url_hash', Types::STRING, [ |
|
58 | - 'notnull' => true, |
|
59 | - 'default' => '', |
|
60 | - ]); |
|
61 | - $table->addColumn('token', Types::STRING, [ |
|
62 | - 'notnull' => false, |
|
63 | - 'length' => 128, |
|
64 | - ]); |
|
65 | - $table->addColumn('shared_secret', Types::STRING, [ |
|
66 | - 'notnull' => false, |
|
67 | - 'length' => 256, |
|
68 | - ]); |
|
69 | - $table->addColumn('status', Types::INTEGER, [ |
|
70 | - 'notnull' => true, |
|
71 | - 'length' => 4, |
|
72 | - 'default' => 2, |
|
73 | - ]); |
|
74 | - $table->addColumn('sync_token', Types::STRING, [ |
|
75 | - 'notnull' => false, |
|
76 | - 'length' => 512, |
|
77 | - ]); |
|
78 | - $table->setPrimaryKey(['id']); |
|
79 | - $table->addUniqueIndex(['url_hash'], 'url_hash'); |
|
80 | - } |
|
81 | - return $schema; |
|
82 | - } |
|
46 | + if (!$schema->hasTable('trusted_servers')) { |
|
47 | + $table = $schema->createTable('trusted_servers'); |
|
48 | + $table->addColumn('id', Types::INTEGER, [ |
|
49 | + 'autoincrement' => true, |
|
50 | + 'notnull' => true, |
|
51 | + 'length' => 4, |
|
52 | + ]); |
|
53 | + $table->addColumn('url', Types::STRING, [ |
|
54 | + 'notnull' => true, |
|
55 | + 'length' => 512, |
|
56 | + ]); |
|
57 | + $table->addColumn('url_hash', Types::STRING, [ |
|
58 | + 'notnull' => true, |
|
59 | + 'default' => '', |
|
60 | + ]); |
|
61 | + $table->addColumn('token', Types::STRING, [ |
|
62 | + 'notnull' => false, |
|
63 | + 'length' => 128, |
|
64 | + ]); |
|
65 | + $table->addColumn('shared_secret', Types::STRING, [ |
|
66 | + 'notnull' => false, |
|
67 | + 'length' => 256, |
|
68 | + ]); |
|
69 | + $table->addColumn('status', Types::INTEGER, [ |
|
70 | + 'notnull' => true, |
|
71 | + 'length' => 4, |
|
72 | + 'default' => 2, |
|
73 | + ]); |
|
74 | + $table->addColumn('sync_token', Types::STRING, [ |
|
75 | + 'notnull' => false, |
|
76 | + 'length' => 512, |
|
77 | + ]); |
|
78 | + $table->setPrimaryKey(['id']); |
|
79 | + $table->addUniqueIndex(['url_hash'], 'url_hash'); |
|
80 | + } |
|
81 | + return $schema; |
|
82 | + } |
|
83 | 83 | } |
@@ -33,16 +33,16 @@ |
||
33 | 33 | use OCP\Contacts\Events\ContactInteractedWithEvent; |
34 | 34 | |
35 | 35 | class Application extends App implements IBootstrap { |
36 | - public const APP_ID = 'contactsinteraction'; |
|
36 | + public const APP_ID = 'contactsinteraction'; |
|
37 | 37 | |
38 | - public function __construct() { |
|
39 | - parent::__construct(self::APP_ID); |
|
40 | - } |
|
38 | + public function __construct() { |
|
39 | + parent::__construct(self::APP_ID); |
|
40 | + } |
|
41 | 41 | |
42 | - public function register(IRegistrationContext $context): void { |
|
43 | - $context->registerEventListener(ContactInteractedWithEvent::class, ContactInteractionListener::class); |
|
44 | - } |
|
42 | + public function register(IRegistrationContext $context): void { |
|
43 | + $context->registerEventListener(ContactInteractedWithEvent::class, ContactInteractionListener::class); |
|
44 | + } |
|
45 | 45 | |
46 | - public function boot(IBootContext $context): void { |
|
47 | - } |
|
46 | + public function boot(IBootContext $context): void { |
|
47 | + } |
|
48 | 48 | } |
@@ -33,16 +33,16 @@ |
||
33 | 33 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
34 | 34 | |
35 | 35 | class Application extends App implements IBootstrap { |
36 | - public const APP_ID = 'cloud_federation_api'; |
|
36 | + public const APP_ID = 'cloud_federation_api'; |
|
37 | 37 | |
38 | - public function __construct() { |
|
39 | - parent::__construct(self::APP_ID); |
|
40 | - } |
|
38 | + public function __construct() { |
|
39 | + parent::__construct(self::APP_ID); |
|
40 | + } |
|
41 | 41 | |
42 | - public function register(IRegistrationContext $context): void { |
|
43 | - $context->registerCapability(Capabilities::class); |
|
44 | - } |
|
42 | + public function register(IRegistrationContext $context): void { |
|
43 | + $context->registerCapability(Capabilities::class); |
|
44 | + } |
|
45 | 45 | |
46 | - public function boot(IBootContext $context): void { |
|
47 | - } |
|
46 | + public function boot(IBootContext $context): void { |
|
47 | + } |
|
48 | 48 | } |
@@ -32,12 +32,12 @@ |
||
32 | 32 | * SSO providers that also have a SSO logout url |
33 | 33 | */ |
34 | 34 | interface ICustomLogout { |
35 | - /** |
|
36 | - * @since 20.0.0 |
|
37 | - * |
|
38 | - * The url to redirect to for logout |
|
39 | - * |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function getLogoutUrl(): string; |
|
35 | + /** |
|
36 | + * @since 20.0.0 |
|
37 | + * |
|
38 | + * The url to redirect to for logout |
|
39 | + * |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function getLogoutUrl(): string; |
|
43 | 43 | } |
@@ -31,45 +31,45 @@ |
||
31 | 31 | */ |
32 | 32 | trait UserTrait { |
33 | 33 | |
34 | - /** @var IUserSession */ |
|
35 | - protected $userSession; |
|
34 | + /** @var IUserSession */ |
|
35 | + protected $userSession; |
|
36 | 36 | |
37 | - /** |
|
38 | - * User override |
|
39 | - * |
|
40 | - * @var IUser|null |
|
41 | - */ |
|
42 | - private $user = null; |
|
37 | + /** |
|
38 | + * User override |
|
39 | + * |
|
40 | + * @var IUser|null |
|
41 | + */ |
|
42 | + private $user = null; |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return IUser|null |
|
46 | - */ |
|
47 | - protected function getUser() { |
|
48 | - if ($this->user) { |
|
49 | - return $this->user; |
|
50 | - } |
|
51 | - return $this->userSession->getUser(); |
|
52 | - } |
|
44 | + /** |
|
45 | + * @return IUser|null |
|
46 | + */ |
|
47 | + protected function getUser() { |
|
48 | + if ($this->user) { |
|
49 | + return $this->user; |
|
50 | + } |
|
51 | + return $this->userSession->getUser(); |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Override the user from the session |
|
56 | - * Unset with ->resetUser() when finished! |
|
57 | - * |
|
58 | - * @param IUser $user |
|
59 | - * @return self |
|
60 | - */ |
|
61 | - public function setUser(IUser $user) { |
|
62 | - $this->user = $user; |
|
63 | - return $this; |
|
64 | - } |
|
54 | + /** |
|
55 | + * Override the user from the session |
|
56 | + * Unset with ->resetUser() when finished! |
|
57 | + * |
|
58 | + * @param IUser $user |
|
59 | + * @return self |
|
60 | + */ |
|
61 | + public function setUser(IUser $user) { |
|
62 | + $this->user = $user; |
|
63 | + return $this; |
|
64 | + } |
|
65 | 65 | |
66 | - /** |
|
67 | - * Reset the user override |
|
68 | - * |
|
69 | - * @return self |
|
70 | - */ |
|
71 | - public function resetUser() { |
|
72 | - $this->user = null; |
|
73 | - return $this; |
|
74 | - } |
|
66 | + /** |
|
67 | + * Reset the user override |
|
68 | + * |
|
69 | + * @return self |
|
70 | + */ |
|
71 | + public function resetUser() { |
|
72 | + $this->user = null; |
|
73 | + return $this; |
|
74 | + } |
|
75 | 75 | } |
@@ -4,11 +4,11 @@ |
||
4 | 4 | /** @var \OCP\Defaults $theme */ |
5 | 5 | // @codeCoverageIgnoreStart |
6 | 6 | if (!isset($_)) {//standalone page is not supported anymore - redirect to / |
7 | - require_once '../../lib/base.php'; |
|
7 | + require_once '../../lib/base.php'; |
|
8 | 8 | |
9 | - $urlGenerator = \OC::$server->getURLGenerator(); |
|
10 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
11 | - exit; |
|
9 | + $urlGenerator = \OC::$server->getURLGenerator(); |
|
10 | + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
11 | + exit; |
|
12 | 12 | } |
13 | 13 | // @codeCoverageIgnoreEnd |
14 | 14 | ?> |