@@ -28,42 +28,42 @@ |
||
| 28 | 28 | use OCP\Migration\SimpleMigrationStep; |
| 29 | 29 | |
| 30 | 30 | class Version14000Date20180626223656 extends SimpleMigrationStep { |
| 31 | - public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 32 | - /** @var ISchemaWrapper $schema */ |
|
| 33 | - $schema = $schemaClosure(); |
|
| 34 | - if (!$schema->hasTable('whats_new')) { |
|
| 35 | - $table = $schema->createTable('whats_new'); |
|
| 36 | - $table->addColumn('id', 'integer', [ |
|
| 37 | - 'autoincrement' => true, |
|
| 38 | - 'notnull' => true, |
|
| 39 | - 'length' => 4, |
|
| 40 | - 'unsigned' => true, |
|
| 41 | - ]); |
|
| 42 | - $table->addColumn('version', 'string', [ |
|
| 43 | - 'notnull' => true, |
|
| 44 | - 'length' => 64, |
|
| 45 | - 'default' => '11', |
|
| 46 | - ]); |
|
| 47 | - $table->addColumn('etag', 'string', [ |
|
| 48 | - 'notnull' => true, |
|
| 49 | - 'length' => 64, |
|
| 50 | - 'default' => '', |
|
| 51 | - ]); |
|
| 52 | - $table->addColumn('last_check', 'integer', [ |
|
| 53 | - 'notnull' => true, |
|
| 54 | - 'length' => 4, |
|
| 55 | - 'unsigned' => true, |
|
| 56 | - 'default' => 0, |
|
| 57 | - ]); |
|
| 58 | - $table->addColumn('data', 'text', [ |
|
| 59 | - 'notnull' => true, |
|
| 60 | - 'default' => '', |
|
| 61 | - ]); |
|
| 62 | - $table->setPrimaryKey(['id']); |
|
| 63 | - $table->addUniqueIndex(['version'], 'version'); |
|
| 64 | - $table->addIndex(['version', 'etag'], 'version_etag_idx'); |
|
| 65 | - } |
|
| 31 | + public function changeSchema(\OCP\Migration\IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 32 | + /** @var ISchemaWrapper $schema */ |
|
| 33 | + $schema = $schemaClosure(); |
|
| 34 | + if (!$schema->hasTable('whats_new')) { |
|
| 35 | + $table = $schema->createTable('whats_new'); |
|
| 36 | + $table->addColumn('id', 'integer', [ |
|
| 37 | + 'autoincrement' => true, |
|
| 38 | + 'notnull' => true, |
|
| 39 | + 'length' => 4, |
|
| 40 | + 'unsigned' => true, |
|
| 41 | + ]); |
|
| 42 | + $table->addColumn('version', 'string', [ |
|
| 43 | + 'notnull' => true, |
|
| 44 | + 'length' => 64, |
|
| 45 | + 'default' => '11', |
|
| 46 | + ]); |
|
| 47 | + $table->addColumn('etag', 'string', [ |
|
| 48 | + 'notnull' => true, |
|
| 49 | + 'length' => 64, |
|
| 50 | + 'default' => '', |
|
| 51 | + ]); |
|
| 52 | + $table->addColumn('last_check', 'integer', [ |
|
| 53 | + 'notnull' => true, |
|
| 54 | + 'length' => 4, |
|
| 55 | + 'unsigned' => true, |
|
| 56 | + 'default' => 0, |
|
| 57 | + ]); |
|
| 58 | + $table->addColumn('data', 'text', [ |
|
| 59 | + 'notnull' => true, |
|
| 60 | + 'default' => '', |
|
| 61 | + ]); |
|
| 62 | + $table->setPrimaryKey(['id']); |
|
| 63 | + $table->addUniqueIndex(['version'], 'version'); |
|
| 64 | + $table->addIndex(['version', 'etag'], 'version_etag_idx'); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - return $schema; |
|
| 68 | - } |
|
| 67 | + return $schema; |
|
| 68 | + } |
|
| 69 | 69 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | require_once '../../lib/base.php'; |
| 8 | 8 | |
| 9 | 9 | $urlGenerator = \OC::$server->getURLGenerator(); |
| 10 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
| 10 | + header('Location: '.$urlGenerator->getAbsoluteURL('/')); |
|
| 11 | 11 | exit; |
| 12 | 12 | } |
| 13 | 13 | // @codeCoverageIgnoreEnd |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | // @codeCoverageIgnoreStart |
| 8 | 8 | if (!isset($_)) {//standalone page is not supported anymore - redirect to / |
| 9 | - require_once '../../lib/base.php'; |
|
| 9 | + require_once '../../lib/base.php'; |
|
| 10 | 10 | |
| 11 | - $urlGenerator = \OC::$server->getURLGenerator(); |
|
| 12 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
| 13 | - exit; |
|
| 11 | + $urlGenerator = \OC::$server->getURLGenerator(); |
|
| 12 | + header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
| 13 | + exit; |
|
| 14 | 14 | } |
| 15 | 15 | // @codeCoverageIgnoreEnd |
| 16 | 16 | ?> |
| 17 | 17 | <div class="guest-box"> |
| 18 | 18 | <h2><?php p($l->t('Access forbidden')); ?></h2> |
| 19 | 19 | <p class='hint'><?php if (isset($_['message'])) { |
| 20 | - p($_['message']); |
|
| 21 | - }?></p> |
|
| 20 | + p($_['message']); |
|
| 21 | + }?></p> |
|
| 22 | 22 | </ul> |
@@ -52,10 +52,10 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function xmlSerialize(Writer $writer) { |
| 54 | 54 | foreach ($this->shares as $share) { |
| 55 | - $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); |
|
| 56 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); |
|
| 57 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); |
|
| 58 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}type', $share->getShareType()); |
|
| 55 | + $writer->startElement('{'.self::NS_NEXTCLOUD.'}sharee'); |
|
| 56 | + $writer->writeElement('{'.self::NS_NEXTCLOUD.'}id', $share->getSharedWith()); |
|
| 57 | + $writer->writeElement('{'.self::NS_NEXTCLOUD.'}display-name', $share->getSharedWithDisplayName()); |
|
| 58 | + $writer->writeElement('{'.self::NS_NEXTCLOUD.'}type', $share->getShareType()); |
|
| 59 | 59 | $writer->endElement(); |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -16,27 +16,27 @@ |
||
| 16 | 16 | * This property contains multiple "sharee" elements, each containing a share sharee |
| 17 | 17 | */ |
| 18 | 18 | class ShareeList implements XmlSerializable { |
| 19 | - public const NS_NEXTCLOUD = 'http://nextcloud.org/ns'; |
|
| 19 | + public const NS_NEXTCLOUD = 'http://nextcloud.org/ns'; |
|
| 20 | 20 | |
| 21 | - public function __construct( |
|
| 22 | - /** @var IShare[] */ |
|
| 23 | - private array $shares, |
|
| 24 | - ) { |
|
| 25 | - } |
|
| 21 | + public function __construct( |
|
| 22 | + /** @var IShare[] */ |
|
| 23 | + private array $shares, |
|
| 24 | + ) { |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * The xmlSerialize method is called during xml writing. |
|
| 29 | - * |
|
| 30 | - * @param Writer $writer |
|
| 31 | - * @return void |
|
| 32 | - */ |
|
| 33 | - public function xmlSerialize(Writer $writer) { |
|
| 34 | - foreach ($this->shares as $share) { |
|
| 35 | - $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); |
|
| 36 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); |
|
| 37 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); |
|
| 38 | - $writer->writeElement('{' . self::NS_NEXTCLOUD . '}type', $share->getShareType()); |
|
| 39 | - $writer->endElement(); |
|
| 40 | - } |
|
| 41 | - } |
|
| 27 | + /** |
|
| 28 | + * The xmlSerialize method is called during xml writing. |
|
| 29 | + * |
|
| 30 | + * @param Writer $writer |
|
| 31 | + * @return void |
|
| 32 | + */ |
|
| 33 | + public function xmlSerialize(Writer $writer) { |
|
| 34 | + foreach ($this->shares as $share) { |
|
| 35 | + $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); |
|
| 36 | + $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); |
|
| 37 | + $writer->writeElement('{' . self::NS_NEXTCLOUD . '}display-name', $share->getSharedWithDisplayName()); |
|
| 38 | + $writer->writeElement('{' . self::NS_NEXTCLOUD . '}type', $share->getShareType()); |
|
| 39 | + $writer->endElement(); |
|
| 40 | + } |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -29,26 +29,26 @@ |
||
| 29 | 29 | use Sabre\DAV\Server; |
| 30 | 30 | |
| 31 | 31 | class PasswordLoginForbidden extends NotAuthenticated { |
| 32 | - public const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
| 32 | + public const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
|
| 33 | 33 | |
| 34 | - public function getHTTPCode() { |
|
| 35 | - return 401; |
|
| 36 | - } |
|
| 34 | + public function getHTTPCode() { |
|
| 35 | + return 401; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * This method allows the exception to include additional information |
|
| 40 | - * into the WebDAV error response |
|
| 41 | - * |
|
| 42 | - * @param Server $server |
|
| 43 | - * @param DOMElement $errorNode |
|
| 44 | - * @return void |
|
| 45 | - */ |
|
| 46 | - public function serialize(Server $server, DOMElement $errorNode) { |
|
| 38 | + /** |
|
| 39 | + * This method allows the exception to include additional information |
|
| 40 | + * into the WebDAV error response |
|
| 41 | + * |
|
| 42 | + * @param Server $server |
|
| 43 | + * @param DOMElement $errorNode |
|
| 44 | + * @return void |
|
| 45 | + */ |
|
| 46 | + public function serialize(Server $server, DOMElement $errorNode) { |
|
| 47 | 47 | |
| 48 | - // set ownCloud namespace |
|
| 49 | - $errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD); |
|
| 48 | + // set ownCloud namespace |
|
| 49 | + $errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD); |
|
| 50 | 50 | |
| 51 | - $error = $errorNode->ownerDocument->createElementNS('o:', 'o:hint', 'password login forbidden'); |
|
| 52 | - $errorNode->appendChild($error); |
|
| 53 | - } |
|
| 51 | + $error = $errorNode->ownerDocument->createElementNS('o:', 'o:hint', 'password login forbidden'); |
|
| 52 | + $errorNode->appendChild($error); |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -30,13 +30,13 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | class Collection extends \Sabre\CalDAV\Principal\Collection { |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns a child object based on principal information |
|
| 35 | - * |
|
| 36 | - * @param array $principalInfo |
|
| 37 | - * @return User |
|
| 38 | - */ |
|
| 39 | - public function getChildForPrincipal(array $principalInfo) { |
|
| 40 | - return new User($this->principalBackend, $principalInfo); |
|
| 41 | - } |
|
| 33 | + /** |
|
| 34 | + * Returns a child object based on principal information |
|
| 35 | + * |
|
| 36 | + * @param array $principalInfo |
|
| 37 | + * @return User |
|
| 38 | + */ |
|
| 39 | + public function getChildForPrincipal(array $principalInfo) { |
|
| 40 | + return new User($this->principalBackend, $principalInfo); |
|
| 41 | + } |
|
| 42 | 42 | } |
@@ -30,25 +30,25 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | class User extends \Sabre\CalDAV\Principal\User { |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns a list of ACE's for this node. |
|
| 35 | - * |
|
| 36 | - * Each ACE has the following properties: |
|
| 37 | - * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are |
|
| 38 | - * currently the only supported privileges |
|
| 39 | - * * 'principal', a url to the principal who owns the node |
|
| 40 | - * * 'protected' (optional), indicating that this ACE is not allowed to |
|
| 41 | - * be updated. |
|
| 42 | - * |
|
| 43 | - * @return array |
|
| 44 | - */ |
|
| 45 | - public function getACL() { |
|
| 46 | - $acl = parent::getACL(); |
|
| 47 | - $acl[] = [ |
|
| 48 | - 'privilege' => '{DAV:}read', |
|
| 49 | - 'principal' => '{DAV:}authenticated', |
|
| 50 | - 'protected' => true, |
|
| 51 | - ]; |
|
| 52 | - return $acl; |
|
| 53 | - } |
|
| 33 | + /** |
|
| 34 | + * Returns a list of ACE's for this node. |
|
| 35 | + * |
|
| 36 | + * Each ACE has the following properties: |
|
| 37 | + * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are |
|
| 38 | + * currently the only supported privileges |
|
| 39 | + * * 'principal', a url to the principal who owns the node |
|
| 40 | + * * 'protected' (optional), indicating that this ACE is not allowed to |
|
| 41 | + * be updated. |
|
| 42 | + * |
|
| 43 | + * @return array |
|
| 44 | + */ |
|
| 45 | + public function getACL() { |
|
| 46 | + $acl = parent::getACL(); |
|
| 47 | + $acl[] = [ |
|
| 48 | + 'privilege' => '{DAV:}read', |
|
| 49 | + 'principal' => '{DAV:}authenticated', |
|
| 50 | + 'protected' => true, |
|
| 51 | + ]; |
|
| 52 | + return $acl; |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -32,17 +32,17 @@ |
||
| 32 | 32 | |
| 33 | 33 | class OffsetFilter implements XmlDeserializable { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @param Reader $reader |
|
| 37 | - * @throws BadRequest |
|
| 38 | - * @return int |
|
| 39 | - */ |
|
| 40 | - public static function xmlDeserialize(Reader $reader) { |
|
| 41 | - $value = $reader->parseInnerTree(); |
|
| 42 | - if (!is_int($value) && !is_string($value)) { |
|
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
| 44 | - } |
|
| 35 | + /** |
|
| 36 | + * @param Reader $reader |
|
| 37 | + * @throws BadRequest |
|
| 38 | + * @return int |
|
| 39 | + */ |
|
| 40 | + public static function xmlDeserialize(Reader $reader) { |
|
| 41 | + $value = $reader->parseInnerTree(); |
|
| 42 | + if (!is_int($value) && !is_string($value)) { |
|
| 43 | + throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 47 | - } |
|
| 46 | + return (int)$value; |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -40,9 +40,9 @@ |
||
| 40 | 40 | public static function xmlDeserialize(Reader $reader) { |
| 41 | 41 | $value = $reader->parseInnerTree(); |
| 42 | 42 | if (!is_int($value) && !is_string($value)) { |
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
| 43 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}offset has illegal value'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 46 | + return (int) $value; |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -32,17 +32,17 @@ |
||
| 32 | 32 | |
| 33 | 33 | class LimitFilter implements XmlDeserializable { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @param Reader $reader |
|
| 37 | - * @throws BadRequest |
|
| 38 | - * @return int |
|
| 39 | - */ |
|
| 40 | - public static function xmlDeserialize(Reader $reader) { |
|
| 41 | - $value = $reader->parseInnerTree(); |
|
| 42 | - if (!is_int($value) && !is_string($value)) { |
|
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
| 44 | - } |
|
| 35 | + /** |
|
| 36 | + * @param Reader $reader |
|
| 37 | + * @throws BadRequest |
|
| 38 | + * @return int |
|
| 39 | + */ |
|
| 40 | + public static function xmlDeserialize(Reader $reader) { |
|
| 41 | + $value = $reader->parseInnerTree(); |
|
| 42 | + if (!is_int($value) && !is_string($value)) { |
|
| 43 | + throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 47 | - } |
|
| 46 | + return (int)$value; |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -40,9 +40,9 @@ |
||
| 40 | 40 | public static function xmlDeserialize(Reader $reader) { |
| 41 | 41 | $value = $reader->parseInnerTree(); |
| 42 | 42 | if (!is_int($value) && !is_string($value)) { |
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
| 43 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}limit has illegal value'); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 46 | + return (int) $value; |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | use OCP\WorkflowEngine\IManager; |
| 29 | 29 | |
| 30 | 30 | class Admin extends ASettings { |
| 31 | - public function getScope(): int { |
|
| 32 | - return IManager::SCOPE_ADMIN; |
|
| 33 | - } |
|
| 31 | + public function getScope(): int { |
|
| 32 | + return IManager::SCOPE_ADMIN; |
|
| 33 | + } |
|
| 34 | 34 | } |