@@ -28,63 +28,63 @@ |
||
| 28 | 28 | |
| 29 | 29 | class PublicCalendar extends Calendar { |
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * @param string $name |
|
| 33 | - * @throws NotFound |
|
| 34 | - * @return PublicCalendarObject |
|
| 35 | - */ |
|
| 36 | - public function getChild($name) { |
|
| 37 | - $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 31 | + /** |
|
| 32 | + * @param string $name |
|
| 33 | + * @throws NotFound |
|
| 34 | + * @return PublicCalendarObject |
|
| 35 | + */ |
|
| 36 | + public function getChild($name) { |
|
| 37 | + $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 38 | 38 | |
| 39 | - if (!$obj) { |
|
| 40 | - throw new NotFound('Calendar object not found'); |
|
| 41 | - } |
|
| 42 | - if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 43 | - throw new NotFound('Calendar object not found'); |
|
| 44 | - } |
|
| 45 | - $obj['acl'] = $this->getChildACL(); |
|
| 39 | + if (!$obj) { |
|
| 40 | + throw new NotFound('Calendar object not found'); |
|
| 41 | + } |
|
| 42 | + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 43 | + throw new NotFound('Calendar object not found'); |
|
| 44 | + } |
|
| 45 | + $obj['acl'] = $this->getChildACL(); |
|
| 46 | 46 | |
| 47 | - return new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 48 | - } |
|
| 47 | + return new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @return PublicCalendarObject[] |
|
| 52 | - */ |
|
| 53 | - public function getChildren() { |
|
| 54 | - $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']); |
|
| 55 | - $children = []; |
|
| 56 | - foreach ($objs as $obj) { |
|
| 57 | - if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 58 | - continue; |
|
| 59 | - } |
|
| 60 | - $obj['acl'] = $this->getChildACL(); |
|
| 61 | - $children[] = new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 62 | - } |
|
| 63 | - return $children; |
|
| 64 | - } |
|
| 50 | + /** |
|
| 51 | + * @return PublicCalendarObject[] |
|
| 52 | + */ |
|
| 53 | + public function getChildren() { |
|
| 54 | + $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']); |
|
| 55 | + $children = []; |
|
| 56 | + foreach ($objs as $obj) { |
|
| 57 | + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 58 | + continue; |
|
| 59 | + } |
|
| 60 | + $obj['acl'] = $this->getChildACL(); |
|
| 61 | + $children[] = new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 62 | + } |
|
| 63 | + return $children; |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @param string[] $paths |
|
| 68 | - * @return PublicCalendarObject[] |
|
| 69 | - */ |
|
| 70 | - public function getMultipleChildren(array $paths) { |
|
| 71 | - $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths); |
|
| 72 | - $children = []; |
|
| 73 | - foreach ($objs as $obj) { |
|
| 74 | - if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 75 | - continue; |
|
| 76 | - } |
|
| 77 | - $obj['acl'] = $this->getChildACL(); |
|
| 78 | - $children[] = new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 79 | - } |
|
| 80 | - return $children; |
|
| 81 | - } |
|
| 66 | + /** |
|
| 67 | + * @param string[] $paths |
|
| 68 | + * @return PublicCalendarObject[] |
|
| 69 | + */ |
|
| 70 | + public function getMultipleChildren(array $paths) { |
|
| 71 | + $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths); |
|
| 72 | + $children = []; |
|
| 73 | + foreach ($objs as $obj) { |
|
| 74 | + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 75 | + continue; |
|
| 76 | + } |
|
| 77 | + $obj['acl'] = $this->getChildACL(); |
|
| 78 | + $children[] = new PublicCalendarObject($this->caldavBackend, $this->l10n, $this->calendarInfo, $obj); |
|
| 79 | + } |
|
| 80 | + return $children; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * public calendars are always shared |
|
| 85 | - * @return bool |
|
| 86 | - */ |
|
| 87 | - public function isShared() { |
|
| 88 | - return true; |
|
| 89 | - } |
|
| 83 | + /** |
|
| 84 | + * public calendars are always shared |
|
| 85 | + * @return bool |
|
| 86 | + */ |
|
| 87 | + public function isShared() { |
|
| 88 | + return true; |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -35,56 +35,56 @@ |
||
| 35 | 35 | * or mangle Etag headers. |
| 36 | 36 | */ |
| 37 | 37 | class CopyEtagHeaderPlugin extends \Sabre\DAV\ServerPlugin { |
| 38 | - private ?Server $server = null; |
|
| 38 | + private ?Server $server = null; |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * This initializes the plugin. |
|
| 42 | - * |
|
| 43 | - * @param \Sabre\DAV\Server $server Sabre server |
|
| 44 | - * |
|
| 45 | - * @return void |
|
| 46 | - */ |
|
| 47 | - public function initialize(\Sabre\DAV\Server $server) { |
|
| 48 | - $this->server = $server; |
|
| 40 | + /** |
|
| 41 | + * This initializes the plugin. |
|
| 42 | + * |
|
| 43 | + * @param \Sabre\DAV\Server $server Sabre server |
|
| 44 | + * |
|
| 45 | + * @return void |
|
| 46 | + */ |
|
| 47 | + public function initialize(\Sabre\DAV\Server $server) { |
|
| 48 | + $this->server = $server; |
|
| 49 | 49 | |
| 50 | - $server->on('afterMethod:*', [$this, 'afterMethod']); |
|
| 51 | - $server->on('afterMove', [$this, 'afterMove']); |
|
| 52 | - } |
|
| 50 | + $server->on('afterMethod:*', [$this, 'afterMethod']); |
|
| 51 | + $server->on('afterMove', [$this, 'afterMove']); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * After method, copy the "Etag" header to "OC-Etag" header. |
|
| 56 | - * |
|
| 57 | - * @param RequestInterface $request request |
|
| 58 | - * @param ResponseInterface $response response |
|
| 59 | - */ |
|
| 60 | - public function afterMethod(RequestInterface $request, ResponseInterface $response) { |
|
| 61 | - $eTag = $response->getHeader('Etag'); |
|
| 62 | - if (!empty($eTag)) { |
|
| 63 | - $response->setHeader('OC-ETag', $eTag); |
|
| 64 | - } |
|
| 65 | - } |
|
| 54 | + /** |
|
| 55 | + * After method, copy the "Etag" header to "OC-Etag" header. |
|
| 56 | + * |
|
| 57 | + * @param RequestInterface $request request |
|
| 58 | + * @param ResponseInterface $response response |
|
| 59 | + */ |
|
| 60 | + public function afterMethod(RequestInterface $request, ResponseInterface $response) { |
|
| 61 | + $eTag = $response->getHeader('Etag'); |
|
| 62 | + if (!empty($eTag)) { |
|
| 63 | + $response->setHeader('OC-ETag', $eTag); |
|
| 64 | + } |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * Called after a node is moved. |
|
| 69 | - * |
|
| 70 | - * This allows the backend to move all the associated properties. |
|
| 71 | - * |
|
| 72 | - * @param string $source |
|
| 73 | - * @param string $destination |
|
| 74 | - * @return void |
|
| 75 | - */ |
|
| 76 | - public function afterMove($source, $destination) { |
|
| 77 | - try { |
|
| 78 | - $node = $this->server->tree->getNodeForPath($destination); |
|
| 79 | - } catch (NotFound $e) { |
|
| 80 | - // Don't care |
|
| 81 | - return; |
|
| 82 | - } |
|
| 67 | + /** |
|
| 68 | + * Called after a node is moved. |
|
| 69 | + * |
|
| 70 | + * This allows the backend to move all the associated properties. |
|
| 71 | + * |
|
| 72 | + * @param string $source |
|
| 73 | + * @param string $destination |
|
| 74 | + * @return void |
|
| 75 | + */ |
|
| 76 | + public function afterMove($source, $destination) { |
|
| 77 | + try { |
|
| 78 | + $node = $this->server->tree->getNodeForPath($destination); |
|
| 79 | + } catch (NotFound $e) { |
|
| 80 | + // Don't care |
|
| 81 | + return; |
|
| 82 | + } |
|
| 83 | 83 | |
| 84 | - if ($node instanceof File) { |
|
| 85 | - $eTag = $node->getETag(); |
|
| 86 | - $this->server->httpResponse->setHeader('OC-ETag', $eTag); |
|
| 87 | - $this->server->httpResponse->setHeader('ETag', $eTag); |
|
| 88 | - } |
|
| 89 | - } |
|
| 84 | + if ($node instanceof File) { |
|
| 85 | + $eTag = $node->getETag(); |
|
| 86 | + $this->server->httpResponse->setHeader('OC-ETag', $eTag); |
|
| 87 | + $this->server->httpResponse->setHeader('ETag', $eTag); |
|
| 88 | + } |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -31,41 +31,41 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | interface IShareable extends INode { |
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Updates the list of shares. |
|
| 36 | - * |
|
| 37 | - * The first array is a list of people that are to be added to the |
|
| 38 | - * resource. |
|
| 39 | - * |
|
| 40 | - * Every element in the add array has the following properties: |
|
| 41 | - * * href - A url. Usually a mailto: address |
|
| 42 | - * * commonName - Usually a first and last name, or false |
|
| 43 | - * * readOnly - A boolean value |
|
| 44 | - * |
|
| 45 | - * Every element in the remove array is just the address string. |
|
| 46 | - * |
|
| 47 | - * @param list<array{href: string, commonName: string, readOnly: bool}> $add |
|
| 48 | - * @param list<string> $remove |
|
| 49 | - */ |
|
| 50 | - public function updateShares(array $add, array $remove): void; |
|
| 34 | + /** |
|
| 35 | + * Updates the list of shares. |
|
| 36 | + * |
|
| 37 | + * The first array is a list of people that are to be added to the |
|
| 38 | + * resource. |
|
| 39 | + * |
|
| 40 | + * Every element in the add array has the following properties: |
|
| 41 | + * * href - A url. Usually a mailto: address |
|
| 42 | + * * commonName - Usually a first and last name, or false |
|
| 43 | + * * readOnly - A boolean value |
|
| 44 | + * |
|
| 45 | + * Every element in the remove array is just the address string. |
|
| 46 | + * |
|
| 47 | + * @param list<array{href: string, commonName: string, readOnly: bool}> $add |
|
| 48 | + * @param list<string> $remove |
|
| 49 | + */ |
|
| 50 | + public function updateShares(array $add, array $remove): void; |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Returns the list of people whom this resource is shared with. |
|
| 54 | - * |
|
| 55 | - * Every element in this array should have the following properties: |
|
| 56 | - * * href - Often a mailto: address |
|
| 57 | - * * commonName - Optional, for example a first + last name |
|
| 58 | - * * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants. |
|
| 59 | - * * readOnly - boolean |
|
| 60 | - * |
|
| 61 | - * @return list<array{href: string, commonName: string, status: int, readOnly: bool, '{http://owncloud.org/ns}principal': string, '{http://owncloud.org/ns}group-share': bool}> |
|
| 62 | - */ |
|
| 63 | - public function getShares(): array; |
|
| 52 | + /** |
|
| 53 | + * Returns the list of people whom this resource is shared with. |
|
| 54 | + * |
|
| 55 | + * Every element in this array should have the following properties: |
|
| 56 | + * * href - Often a mailto: address |
|
| 57 | + * * commonName - Optional, for example a first + last name |
|
| 58 | + * * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants. |
|
| 59 | + * * readOnly - boolean |
|
| 60 | + * |
|
| 61 | + * @return list<array{href: string, commonName: string, status: int, readOnly: bool, '{http://owncloud.org/ns}principal': string, '{http://owncloud.org/ns}group-share': bool}> |
|
| 62 | + */ |
|
| 63 | + public function getShares(): array; |
|
| 64 | 64 | |
| 65 | - public function getResourceId(): int; |
|
| 65 | + public function getResourceId(): int; |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * @return ?string |
|
| 69 | - */ |
|
| 70 | - public function getOwner(); |
|
| 67 | + /** |
|
| 68 | + * @return ?string |
|
| 69 | + */ |
|
| 70 | + public function getOwner(); |
|
| 71 | 71 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | /** @var array $_ */ |
| 26 | 26 | |
| 27 | 27 | script('settings', [ |
| 28 | - 'vue-settings-admin-basic-settings', |
|
| 28 | + 'vue-settings-admin-basic-settings', |
|
| 29 | 29 | ]); |
| 30 | 30 | ?> |
| 31 | 31 | |
@@ -28,25 +28,25 @@ |
||
| 28 | 28 | use OCP\Migration\SimpleMigrationStep; |
| 29 | 29 | |
| 30 | 30 | class Version25000Date20220515204012 extends SimpleMigrationStep { |
| 31 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 32 | - /** @var ISchemaWrapper $schema */ |
|
| 33 | - $schema = $schemaClosure(); |
|
| 31 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 32 | + /** @var ISchemaWrapper $schema */ |
|
| 33 | + $schema = $schemaClosure(); |
|
| 34 | 34 | |
| 35 | - if ($schema->hasTable('share')) { |
|
| 36 | - $shareTable = $schema->getTable('share'); |
|
| 35 | + if ($schema->hasTable('share')) { |
|
| 36 | + $shareTable = $schema->getTable('share'); |
|
| 37 | 37 | |
| 38 | - if (!$shareTable->hasColumn('attributes')) { |
|
| 39 | - $shareTable->addColumn( |
|
| 40 | - 'attributes', |
|
| 41 | - Types::JSON, |
|
| 42 | - [ |
|
| 43 | - 'default' => null, |
|
| 44 | - 'notnull' => false |
|
| 45 | - ] |
|
| 46 | - ); |
|
| 47 | - } |
|
| 48 | - } |
|
| 38 | + if (!$shareTable->hasColumn('attributes')) { |
|
| 39 | + $shareTable->addColumn( |
|
| 40 | + 'attributes', |
|
| 41 | + Types::JSON, |
|
| 42 | + [ |
|
| 43 | + 'default' => null, |
|
| 44 | + 'notnull' => false |
|
| 45 | + ] |
|
| 46 | + ); |
|
| 47 | + } |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - return $schema; |
|
| 51 | - } |
|
| 50 | + return $schema; |
|
| 51 | + } |
|
| 52 | 52 | } |
@@ -14,25 +14,25 @@ |
||
| 14 | 14 | * Auto-generated migration step: Please modify to your needs! |
| 15 | 15 | */ |
| 16 | 16 | class Version24000Date20220202150027 extends SimpleMigrationStep { |
| 17 | - /** |
|
| 18 | - * @param IOutput $output |
|
| 19 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 20 | - * @param array $options |
|
| 21 | - * @return null|ISchemaWrapper |
|
| 22 | - */ |
|
| 23 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 24 | - /** @var ISchemaWrapper $schema */ |
|
| 25 | - $schema = $schemaClosure(); |
|
| 17 | + /** |
|
| 18 | + * @param IOutput $output |
|
| 19 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 20 | + * @param array $options |
|
| 21 | + * @return null|ISchemaWrapper |
|
| 22 | + */ |
|
| 23 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
| 24 | + /** @var ISchemaWrapper $schema */ |
|
| 25 | + $schema = $schemaClosure(); |
|
| 26 | 26 | |
| 27 | - $table = $schema->getTable('mounts'); |
|
| 28 | - if (!$table->hasColumn('mount_provider_class')) { |
|
| 29 | - $table->addColumn('mount_provider_class', Types::STRING, [ |
|
| 30 | - 'notnull' => false, |
|
| 31 | - 'length' => 128, |
|
| 32 | - ]); |
|
| 33 | - $table->addIndex(['mount_provider_class'], 'mounts_class_index'); |
|
| 34 | - return $schema; |
|
| 35 | - } |
|
| 36 | - return null; |
|
| 37 | - } |
|
| 27 | + $table = $schema->getTable('mounts'); |
|
| 28 | + if (!$table->hasColumn('mount_provider_class')) { |
|
| 29 | + $table->addColumn('mount_provider_class', Types::STRING, [ |
|
| 30 | + 'notnull' => false, |
|
| 31 | + 'length' => 128, |
|
| 32 | + ]); |
|
| 33 | + $table->addIndex(['mount_provider_class'], 'mounts_class_index'); |
|
| 34 | + return $schema; |
|
| 35 | + } |
|
| 36 | + return null; |
|
| 37 | + } |
|
| 38 | 38 | } |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Connect to your account')) ?></h2> |
| 32 | 32 | <p class="info"> |
| 33 | 33 | <?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [ |
| 34 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 35 | - \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 36 | - ])) ?> |
|
| 34 | + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 35 | + \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 36 | + ])) ?> |
|
| 37 | 37 | </p> |
| 38 | 38 | |
| 39 | 39 | <div class="notecard warning"> |
@@ -31,15 +31,15 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Account access')) ?></h2> |
| 32 | 32 | <p class="info"> |
| 33 | 33 | <?php p($l->t('Currently logged in as %1$s (%2$s).', [ |
| 34 | - $_['userDisplayName'], |
|
| 35 | - $_['userId'], |
|
| 36 | - ])) ?> |
|
| 34 | + $_['userDisplayName'], |
|
| 35 | + $_['userId'], |
|
| 36 | + ])) ?> |
|
| 37 | 37 | </p> |
| 38 | 38 | <p class="info"> |
| 39 | 39 | <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ |
| 40 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 41 | - \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 42 | - ])) ?> |
|
| 40 | + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 41 | + \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 42 | + ])) ?> |
|
| 43 | 43 | </p> |
| 44 | 44 | |
| 45 | 45 | <br/> |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | <h2 class="title"><?php p($l->t('App update required')); ?></h2> |
| 5 | 5 | <?php } else { ?> |
| 6 | 6 | <h2 class="title"><?php p($l->t('%1$s will be updated to version %2$s', |
| 7 | - [$_['productName'], $_['version']])); ?></h2> |
|
| 7 | + [$_['productName'], $_['version']])); ?></h2> |
|
| 8 | 8 | <?php } ?> |
| 9 | 9 | <?php if (!empty($_['appsToUpgrade'])) { ?> |
| 10 | 10 | <div class="text-left"> |