@@ -25,47 +25,47 @@ |
||
25 | 25 | namespace OC\Core\Data; |
26 | 26 | |
27 | 27 | class LoginFlowV2Credentials implements \JsonSerializable { |
28 | - /** @var string */ |
|
29 | - private $server; |
|
30 | - /** @var string */ |
|
31 | - private $loginName; |
|
32 | - /** @var string */ |
|
33 | - private $appPassword; |
|
28 | + /** @var string */ |
|
29 | + private $server; |
|
30 | + /** @var string */ |
|
31 | + private $loginName; |
|
32 | + /** @var string */ |
|
33 | + private $appPassword; |
|
34 | 34 | |
35 | - public function __construct(string $server, string $loginName, string $appPassword) { |
|
36 | - $this->server = $server; |
|
37 | - $this->loginName = $loginName; |
|
38 | - $this->appPassword = $appPassword; |
|
39 | - } |
|
35 | + public function __construct(string $server, string $loginName, string $appPassword) { |
|
36 | + $this->server = $server; |
|
37 | + $this->loginName = $loginName; |
|
38 | + $this->appPassword = $appPassword; |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * @return string |
|
43 | - */ |
|
44 | - public function getServer(): string { |
|
45 | - return $this->server; |
|
46 | - } |
|
41 | + /** |
|
42 | + * @return string |
|
43 | + */ |
|
44 | + public function getServer(): string { |
|
45 | + return $this->server; |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * @return string |
|
50 | - */ |
|
51 | - public function getLoginName(): string { |
|
52 | - return $this->loginName; |
|
53 | - } |
|
48 | + /** |
|
49 | + * @return string |
|
50 | + */ |
|
51 | + public function getLoginName(): string { |
|
52 | + return $this->loginName; |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * @return string |
|
57 | - */ |
|
58 | - public function getAppPassword(): string { |
|
59 | - return $this->appPassword; |
|
60 | - } |
|
55 | + /** |
|
56 | + * @return string |
|
57 | + */ |
|
58 | + public function getAppPassword(): string { |
|
59 | + return $this->appPassword; |
|
60 | + } |
|
61 | 61 | |
62 | - public function jsonSerialize(): array { |
|
63 | - return [ |
|
64 | - 'server' => $this->server, |
|
65 | - 'loginName' => $this->loginName, |
|
66 | - 'appPassword' => $this->appPassword, |
|
67 | - ]; |
|
68 | - } |
|
62 | + public function jsonSerialize(): array { |
|
63 | + return [ |
|
64 | + 'server' => $this->server, |
|
65 | + 'loginName' => $this->loginName, |
|
66 | + 'appPassword' => $this->appPassword, |
|
67 | + ]; |
|
68 | + } |
|
69 | 69 | |
70 | 70 | |
71 | 71 | } |
@@ -49,37 +49,37 @@ |
||
49 | 49 | * @method void setAppPassword(string $appPassword) |
50 | 50 | */ |
51 | 51 | class LoginFlowV2 extends Entity { |
52 | - /** @var int */ |
|
53 | - protected $timestamp; |
|
54 | - /** @var int */ |
|
55 | - protected $started; |
|
56 | - /** @var string */ |
|
57 | - protected $pollToken; |
|
58 | - /** @var string */ |
|
59 | - protected $loginToken; |
|
60 | - /** @var string */ |
|
61 | - protected $publicKey; |
|
62 | - /** @var string */ |
|
63 | - protected $privateKey; |
|
64 | - /** @var string */ |
|
65 | - protected $clientName; |
|
66 | - /** @var string */ |
|
67 | - protected $loginName; |
|
68 | - /** @var string */ |
|
69 | - protected $server; |
|
70 | - /** @var string */ |
|
71 | - protected $appPassword; |
|
52 | + /** @var int */ |
|
53 | + protected $timestamp; |
|
54 | + /** @var int */ |
|
55 | + protected $started; |
|
56 | + /** @var string */ |
|
57 | + protected $pollToken; |
|
58 | + /** @var string */ |
|
59 | + protected $loginToken; |
|
60 | + /** @var string */ |
|
61 | + protected $publicKey; |
|
62 | + /** @var string */ |
|
63 | + protected $privateKey; |
|
64 | + /** @var string */ |
|
65 | + protected $clientName; |
|
66 | + /** @var string */ |
|
67 | + protected $loginName; |
|
68 | + /** @var string */ |
|
69 | + protected $server; |
|
70 | + /** @var string */ |
|
71 | + protected $appPassword; |
|
72 | 72 | |
73 | - public function __construct() { |
|
74 | - $this->addType('timestamp', 'int'); |
|
75 | - $this->addType('started', 'int'); |
|
76 | - $this->addType('pollToken', 'string'); |
|
77 | - $this->addType('loginToken', 'string'); |
|
78 | - $this->addType('publicKey', 'string'); |
|
79 | - $this->addType('privateKey', 'string'); |
|
80 | - $this->addType('clientName', 'string'); |
|
81 | - $this->addType('loginName', 'string'); |
|
82 | - $this->addType('server', 'string'); |
|
83 | - $this->addType('appPassword', 'string'); |
|
84 | - } |
|
73 | + public function __construct() { |
|
74 | + $this->addType('timestamp', 'int'); |
|
75 | + $this->addType('started', 'int'); |
|
76 | + $this->addType('pollToken', 'string'); |
|
77 | + $this->addType('loginToken', 'string'); |
|
78 | + $this->addType('publicKey', 'string'); |
|
79 | + $this->addType('privateKey', 'string'); |
|
80 | + $this->addType('clientName', 'string'); |
|
81 | + $this->addType('loginName', 'string'); |
|
82 | + $this->addType('server', 'string'); |
|
83 | + $this->addType('appPassword', 'string'); |
|
84 | + } |
|
85 | 85 | } |
@@ -30,71 +30,71 @@ |
||
30 | 30 | use OCP\IDBConnection; |
31 | 31 | |
32 | 32 | class LoginFlowV2Mapper extends QBMapper { |
33 | - private const lifetime = 1200; |
|
33 | + private const lifetime = 1200; |
|
34 | 34 | |
35 | - /** @var ITimeFactory */ |
|
36 | - private $timeFactory; |
|
35 | + /** @var ITimeFactory */ |
|
36 | + private $timeFactory; |
|
37 | 37 | |
38 | - public function __construct(IDBConnection $db, ITimeFactory $timeFactory) { |
|
39 | - parent::__construct($db, 'login_flow_v2', LoginFlowV2::class); |
|
40 | - $this->timeFactory = $timeFactory; |
|
41 | - } |
|
38 | + public function __construct(IDBConnection $db, ITimeFactory $timeFactory) { |
|
39 | + parent::__construct($db, 'login_flow_v2', LoginFlowV2::class); |
|
40 | + $this->timeFactory = $timeFactory; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param string $pollToken |
|
45 | - * @return LoginFlowV2 |
|
46 | - * @throws DoesNotExistException |
|
47 | - */ |
|
48 | - public function getByPollToken(string $pollToken): LoginFlowV2 { |
|
49 | - $qb = $this->db->getQueryBuilder(); |
|
50 | - $qb->select('*') |
|
51 | - ->from($this->getTableName()) |
|
52 | - ->where( |
|
53 | - $qb->expr()->eq('poll_token', $qb->createNamedParameter($pollToken)) |
|
54 | - ); |
|
43 | + /** |
|
44 | + * @param string $pollToken |
|
45 | + * @return LoginFlowV2 |
|
46 | + * @throws DoesNotExistException |
|
47 | + */ |
|
48 | + public function getByPollToken(string $pollToken): LoginFlowV2 { |
|
49 | + $qb = $this->db->getQueryBuilder(); |
|
50 | + $qb->select('*') |
|
51 | + ->from($this->getTableName()) |
|
52 | + ->where( |
|
53 | + $qb->expr()->eq('poll_token', $qb->createNamedParameter($pollToken)) |
|
54 | + ); |
|
55 | 55 | |
56 | - $entity = $this->findEntity($qb); |
|
57 | - return $this->validateTimestamp($entity); |
|
58 | - } |
|
56 | + $entity = $this->findEntity($qb); |
|
57 | + return $this->validateTimestamp($entity); |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @param string $loginToken |
|
62 | - * @return LoginFlowV2 |
|
63 | - * @throws DoesNotExistException |
|
64 | - */ |
|
65 | - public function getByLoginToken(string $loginToken): LoginFlowV2 { |
|
66 | - $qb = $this->db->getQueryBuilder(); |
|
67 | - $qb->select('*') |
|
68 | - ->from($this->getTableName()) |
|
69 | - ->where( |
|
70 | - $qb->expr()->eq('login_token', $qb->createNamedParameter($loginToken)) |
|
71 | - ); |
|
60 | + /** |
|
61 | + * @param string $loginToken |
|
62 | + * @return LoginFlowV2 |
|
63 | + * @throws DoesNotExistException |
|
64 | + */ |
|
65 | + public function getByLoginToken(string $loginToken): LoginFlowV2 { |
|
66 | + $qb = $this->db->getQueryBuilder(); |
|
67 | + $qb->select('*') |
|
68 | + ->from($this->getTableName()) |
|
69 | + ->where( |
|
70 | + $qb->expr()->eq('login_token', $qb->createNamedParameter($loginToken)) |
|
71 | + ); |
|
72 | 72 | |
73 | - $entity = $this->findEntity($qb); |
|
74 | - return $this->validateTimestamp($entity); |
|
75 | - } |
|
73 | + $entity = $this->findEntity($qb); |
|
74 | + return $this->validateTimestamp($entity); |
|
75 | + } |
|
76 | 76 | |
77 | - public function cleanup(): void { |
|
78 | - $qb = $this->db->getQueryBuilder(); |
|
79 | - $qb->delete($this->getTableName()) |
|
80 | - ->where( |
|
81 | - $qb->expr()->lt('timestamp', $qb->createNamedParameter($this->timeFactory->getTime() - self::lifetime)) |
|
82 | - ); |
|
77 | + public function cleanup(): void { |
|
78 | + $qb = $this->db->getQueryBuilder(); |
|
79 | + $qb->delete($this->getTableName()) |
|
80 | + ->where( |
|
81 | + $qb->expr()->lt('timestamp', $qb->createNamedParameter($this->timeFactory->getTime() - self::lifetime)) |
|
82 | + ); |
|
83 | 83 | |
84 | - $qb->execute(); |
|
85 | - } |
|
84 | + $qb->execute(); |
|
85 | + } |
|
86 | 86 | |
87 | - /** |
|
88 | - * @param LoginFlowV2 $flowV2 |
|
89 | - * @return LoginFlowV2 |
|
90 | - * @throws DoesNotExistException |
|
91 | - */ |
|
92 | - private function validateTimestamp(LoginFlowV2 $flowV2): LoginFlowV2 { |
|
93 | - if ($flowV2->getTimestamp() < ($this->timeFactory->getTime() - self::lifetime)) { |
|
94 | - $this->delete($flowV2); |
|
95 | - throw new DoesNotExistException('Token expired'); |
|
96 | - } |
|
87 | + /** |
|
88 | + * @param LoginFlowV2 $flowV2 |
|
89 | + * @return LoginFlowV2 |
|
90 | + * @throws DoesNotExistException |
|
91 | + */ |
|
92 | + private function validateTimestamp(LoginFlowV2 $flowV2): LoginFlowV2 { |
|
93 | + if ($flowV2->getTimestamp() < ($this->timeFactory->getTime() - self::lifetime)) { |
|
94 | + $this->delete($flowV2); |
|
95 | + throw new DoesNotExistException('Token expired'); |
|
96 | + } |
|
97 | 97 | |
98 | - return $flowV2; |
|
99 | - } |
|
98 | + return $flowV2; |
|
99 | + } |
|
100 | 100 | } |
@@ -27,12 +27,12 @@ |
||
27 | 27 | * Allow the backend to mark groups to be excluded from being shown in search dialogs |
28 | 28 | */ |
29 | 29 | interface IHideFromCollaborationBackend { |
30 | - /** |
|
31 | - * Check if a group should be hidden from search dialogs |
|
32 | - * |
|
33 | - * @param string $groupId |
|
34 | - * @return bool |
|
35 | - * @since 16.0.0 |
|
36 | - */ |
|
37 | - public function hideGroup(string $groupId): bool; |
|
30 | + /** |
|
31 | + * Check if a group should be hidden from search dialogs |
|
32 | + * |
|
33 | + * @param string $groupId |
|
34 | + * @return bool |
|
35 | + * @since 16.0.0 |
|
36 | + */ |
|
37 | + public function hideGroup(string $groupId): bool; |
|
38 | 38 | } |
@@ -26,119 +26,119 @@ |
||
26 | 26 | use OCP\Files\NotFoundException; |
27 | 27 | |
28 | 28 | class NonExistingFile extends File { |
29 | - /** |
|
30 | - * @param string $newPath |
|
31 | - * @throws \OCP\Files\NotFoundException |
|
32 | - */ |
|
33 | - public function rename($newPath) { |
|
34 | - throw new NotFoundException(); |
|
35 | - } |
|
36 | - |
|
37 | - public function delete() { |
|
38 | - throw new NotFoundException(); |
|
39 | - } |
|
40 | - |
|
41 | - public function copy($newPath) { |
|
42 | - throw new NotFoundException(); |
|
43 | - } |
|
44 | - |
|
45 | - public function touch($mtime = null) { |
|
46 | - throw new NotFoundException(); |
|
47 | - } |
|
48 | - |
|
49 | - public function getId() { |
|
50 | - if ($this->fileInfo) { |
|
51 | - return parent::getId(); |
|
52 | - } else { |
|
53 | - throw new NotFoundException(); |
|
54 | - } |
|
55 | - } |
|
56 | - |
|
57 | - public function stat() { |
|
58 | - throw new NotFoundException(); |
|
59 | - } |
|
60 | - |
|
61 | - public function getMTime() { |
|
62 | - if ($this->fileInfo) { |
|
63 | - return parent::getMTime(); |
|
64 | - } else { |
|
65 | - throw new NotFoundException(); |
|
66 | - } |
|
67 | - } |
|
68 | - |
|
69 | - public function getSize($includeMounts = true) { |
|
70 | - if ($this->fileInfo) { |
|
71 | - return parent::getSize($includeMounts); |
|
72 | - } else { |
|
73 | - throw new NotFoundException(); |
|
74 | - } |
|
75 | - } |
|
76 | - |
|
77 | - public function getEtag() { |
|
78 | - if ($this->fileInfo) { |
|
79 | - return parent::getEtag(); |
|
80 | - } else { |
|
81 | - throw new NotFoundException(); |
|
82 | - } |
|
83 | - } |
|
84 | - |
|
85 | - public function getPermissions() { |
|
86 | - if ($this->fileInfo) { |
|
87 | - return parent::getPermissions(); |
|
88 | - } else { |
|
89 | - throw new NotFoundException(); |
|
90 | - } |
|
91 | - } |
|
92 | - |
|
93 | - public function isReadable() { |
|
94 | - if ($this->fileInfo) { |
|
95 | - return parent::isReadable(); |
|
96 | - } else { |
|
97 | - throw new NotFoundException(); |
|
98 | - } |
|
99 | - } |
|
100 | - |
|
101 | - public function isUpdateable() { |
|
102 | - if ($this->fileInfo) { |
|
103 | - return parent::isUpdateable(); |
|
104 | - } else { |
|
105 | - throw new NotFoundException(); |
|
106 | - } |
|
107 | - } |
|
108 | - |
|
109 | - public function isDeletable() { |
|
110 | - if ($this->fileInfo) { |
|
111 | - return parent::isDeletable(); |
|
112 | - } else { |
|
113 | - throw new NotFoundException(); |
|
114 | - } |
|
115 | - } |
|
116 | - |
|
117 | - public function isShareable() { |
|
118 | - if ($this->fileInfo) { |
|
119 | - return parent::isShareable(); |
|
120 | - } else { |
|
121 | - throw new NotFoundException(); |
|
122 | - } |
|
123 | - } |
|
124 | - |
|
125 | - public function getContent() { |
|
126 | - throw new NotFoundException(); |
|
127 | - } |
|
128 | - |
|
129 | - public function putContent($data) { |
|
130 | - throw new NotFoundException(); |
|
131 | - } |
|
132 | - |
|
133 | - public function getMimeType() { |
|
134 | - if ($this->fileInfo) { |
|
135 | - return parent::getMimeType(); |
|
136 | - } else { |
|
137 | - throw new NotFoundException(); |
|
138 | - } |
|
139 | - } |
|
140 | - |
|
141 | - public function fopen($mode) { |
|
142 | - throw new NotFoundException(); |
|
143 | - } |
|
29 | + /** |
|
30 | + * @param string $newPath |
|
31 | + * @throws \OCP\Files\NotFoundException |
|
32 | + */ |
|
33 | + public function rename($newPath) { |
|
34 | + throw new NotFoundException(); |
|
35 | + } |
|
36 | + |
|
37 | + public function delete() { |
|
38 | + throw new NotFoundException(); |
|
39 | + } |
|
40 | + |
|
41 | + public function copy($newPath) { |
|
42 | + throw new NotFoundException(); |
|
43 | + } |
|
44 | + |
|
45 | + public function touch($mtime = null) { |
|
46 | + throw new NotFoundException(); |
|
47 | + } |
|
48 | + |
|
49 | + public function getId() { |
|
50 | + if ($this->fileInfo) { |
|
51 | + return parent::getId(); |
|
52 | + } else { |
|
53 | + throw new NotFoundException(); |
|
54 | + } |
|
55 | + } |
|
56 | + |
|
57 | + public function stat() { |
|
58 | + throw new NotFoundException(); |
|
59 | + } |
|
60 | + |
|
61 | + public function getMTime() { |
|
62 | + if ($this->fileInfo) { |
|
63 | + return parent::getMTime(); |
|
64 | + } else { |
|
65 | + throw new NotFoundException(); |
|
66 | + } |
|
67 | + } |
|
68 | + |
|
69 | + public function getSize($includeMounts = true) { |
|
70 | + if ($this->fileInfo) { |
|
71 | + return parent::getSize($includeMounts); |
|
72 | + } else { |
|
73 | + throw new NotFoundException(); |
|
74 | + } |
|
75 | + } |
|
76 | + |
|
77 | + public function getEtag() { |
|
78 | + if ($this->fileInfo) { |
|
79 | + return parent::getEtag(); |
|
80 | + } else { |
|
81 | + throw new NotFoundException(); |
|
82 | + } |
|
83 | + } |
|
84 | + |
|
85 | + public function getPermissions() { |
|
86 | + if ($this->fileInfo) { |
|
87 | + return parent::getPermissions(); |
|
88 | + } else { |
|
89 | + throw new NotFoundException(); |
|
90 | + } |
|
91 | + } |
|
92 | + |
|
93 | + public function isReadable() { |
|
94 | + if ($this->fileInfo) { |
|
95 | + return parent::isReadable(); |
|
96 | + } else { |
|
97 | + throw new NotFoundException(); |
|
98 | + } |
|
99 | + } |
|
100 | + |
|
101 | + public function isUpdateable() { |
|
102 | + if ($this->fileInfo) { |
|
103 | + return parent::isUpdateable(); |
|
104 | + } else { |
|
105 | + throw new NotFoundException(); |
|
106 | + } |
|
107 | + } |
|
108 | + |
|
109 | + public function isDeletable() { |
|
110 | + if ($this->fileInfo) { |
|
111 | + return parent::isDeletable(); |
|
112 | + } else { |
|
113 | + throw new NotFoundException(); |
|
114 | + } |
|
115 | + } |
|
116 | + |
|
117 | + public function isShareable() { |
|
118 | + if ($this->fileInfo) { |
|
119 | + return parent::isShareable(); |
|
120 | + } else { |
|
121 | + throw new NotFoundException(); |
|
122 | + } |
|
123 | + } |
|
124 | + |
|
125 | + public function getContent() { |
|
126 | + throw new NotFoundException(); |
|
127 | + } |
|
128 | + |
|
129 | + public function putContent($data) { |
|
130 | + throw new NotFoundException(); |
|
131 | + } |
|
132 | + |
|
133 | + public function getMimeType() { |
|
134 | + if ($this->fileInfo) { |
|
135 | + return parent::getMimeType(); |
|
136 | + } else { |
|
137 | + throw new NotFoundException(); |
|
138 | + } |
|
139 | + } |
|
140 | + |
|
141 | + public function fopen($mode) { |
|
142 | + throw new NotFoundException(); |
|
143 | + } |
|
144 | 144 | } |
@@ -34,20 +34,20 @@ |
||
34 | 34 | * @method void setHashedCode(string $token) |
35 | 35 | */ |
36 | 36 | class AccessToken extends Entity { |
37 | - /** @var int */ |
|
38 | - protected $tokenId; |
|
39 | - /** @var int */ |
|
40 | - protected $clientId; |
|
41 | - /** @var string */ |
|
42 | - protected $hashedCode; |
|
43 | - /** @var string */ |
|
44 | - protected $encryptedToken; |
|
37 | + /** @var int */ |
|
38 | + protected $tokenId; |
|
39 | + /** @var int */ |
|
40 | + protected $clientId; |
|
41 | + /** @var string */ |
|
42 | + protected $hashedCode; |
|
43 | + /** @var string */ |
|
44 | + protected $encryptedToken; |
|
45 | 45 | |
46 | - public function __construct() { |
|
47 | - $this->addType('id', 'int'); |
|
48 | - $this->addType('tokenId', 'int'); |
|
49 | - $this->addType('clientId', 'int'); |
|
50 | - $this->addType('hashedCode', 'string'); |
|
51 | - $this->addType('encryptedToken', 'string'); |
|
52 | - } |
|
46 | + public function __construct() { |
|
47 | + $this->addType('id', 'int'); |
|
48 | + $this->addType('tokenId', 'int'); |
|
49 | + $this->addType('clientId', 'int'); |
|
50 | + $this->addType('hashedCode', 'string'); |
|
51 | + $this->addType('encryptedToken', 'string'); |
|
52 | + } |
|
53 | 53 | } |
@@ -26,16 +26,16 @@ |
||
26 | 26 | use OC\Authentication\Token\IToken; |
27 | 27 | |
28 | 28 | class WipeTokenException extends InvalidTokenException { |
29 | - /** @var IToken */ |
|
30 | - private $token; |
|
29 | + /** @var IToken */ |
|
30 | + private $token; |
|
31 | 31 | |
32 | - public function __construct(IToken $token) { |
|
33 | - parent::__construct(); |
|
32 | + public function __construct(IToken $token) { |
|
33 | + parent::__construct(); |
|
34 | 34 | |
35 | - $this->token = $token; |
|
36 | - } |
|
35 | + $this->token = $token; |
|
36 | + } |
|
37 | 37 | |
38 | - public function getToken(): IToken { |
|
39 | - return $this->token; |
|
40 | - } |
|
38 | + public function getToken(): IToken { |
|
39 | + return $this->token; |
|
40 | + } |
|
41 | 41 | } |
@@ -30,43 +30,43 @@ |
||
30 | 30 | |
31 | 31 | class RegenerateBirthdayCalendars implements IRepairStep { |
32 | 32 | |
33 | - /** @var IJobList */ |
|
34 | - private $jobList; |
|
33 | + /** @var IJobList */ |
|
34 | + private $jobList; |
|
35 | 35 | |
36 | - /** @var IConfig */ |
|
37 | - private $config; |
|
36 | + /** @var IConfig */ |
|
37 | + private $config; |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param IJobList $jobList |
|
41 | - * @param IConfig $config |
|
42 | - */ |
|
43 | - public function __construct(IJobList $jobList, |
|
44 | - IConfig $config) { |
|
45 | - $this->jobList = $jobList; |
|
46 | - $this->config = $config; |
|
47 | - } |
|
39 | + /** |
|
40 | + * @param IJobList $jobList |
|
41 | + * @param IConfig $config |
|
42 | + */ |
|
43 | + public function __construct(IJobList $jobList, |
|
44 | + IConfig $config) { |
|
45 | + $this->jobList = $jobList; |
|
46 | + $this->config = $config; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @return string |
|
51 | - */ |
|
52 | - public function getName() { |
|
53 | - return 'Regenerating birthday calendars to use new icons and fix old birthday events without year'; |
|
54 | - } |
|
49 | + /** |
|
50 | + * @return string |
|
51 | + */ |
|
52 | + public function getName() { |
|
53 | + return 'Regenerating birthday calendars to use new icons and fix old birthday events without year'; |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * @param IOutput $output |
|
58 | - */ |
|
59 | - public function run(IOutput $output) { |
|
60 | - // only run once |
|
61 | - if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes') { |
|
62 | - $output->info('Repair step already executed'); |
|
63 | - return; |
|
64 | - } |
|
56 | + /** |
|
57 | + * @param IOutput $output |
|
58 | + */ |
|
59 | + public function run(IOutput $output) { |
|
60 | + // only run once |
|
61 | + if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes') { |
|
62 | + $output->info('Repair step already executed'); |
|
63 | + return; |
|
64 | + } |
|
65 | 65 | |
66 | - $output->info('Adding background jobs to regenerate birthday calendar'); |
|
67 | - $this->jobList->add(RegisterRegenerateBirthdayCalendars::class); |
|
66 | + $output->info('Adding background jobs to regenerate birthday calendar'); |
|
67 | + $this->jobList->add(RegisterRegenerateBirthdayCalendars::class); |
|
68 | 68 | |
69 | - // if all were done, no need to redo the repair during next upgrade |
|
70 | - $this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix', 'yes'); |
|
71 | - } |
|
69 | + // if all were done, no need to redo the repair during next upgrade |
|
70 | + $this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix', 'yes'); |
|
71 | + } |
|
72 | 72 | } |
@@ -29,71 +29,71 @@ |
||
29 | 29 | * @since 15.0.0 |
30 | 30 | */ |
31 | 31 | interface IVersion { |
32 | - /** |
|
33 | - * @return IVersionBackend |
|
34 | - * @since 15.0.0 |
|
35 | - */ |
|
36 | - public function getBackend(): IVersionBackend; |
|
32 | + /** |
|
33 | + * @return IVersionBackend |
|
34 | + * @since 15.0.0 |
|
35 | + */ |
|
36 | + public function getBackend(): IVersionBackend; |
|
37 | 37 | |
38 | - /** |
|
39 | - * Get the file info of the source file |
|
40 | - * |
|
41 | - * @return FileInfo |
|
42 | - * @since 15.0.0 |
|
43 | - */ |
|
44 | - public function getSourceFile(): FileInfo; |
|
38 | + /** |
|
39 | + * Get the file info of the source file |
|
40 | + * |
|
41 | + * @return FileInfo |
|
42 | + * @since 15.0.0 |
|
43 | + */ |
|
44 | + public function getSourceFile(): FileInfo; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Get the id of the revision for the file |
|
48 | - * |
|
49 | - * @return int|string |
|
50 | - * @since 15.0.0 |
|
51 | - */ |
|
52 | - public function getRevisionId(); |
|
46 | + /** |
|
47 | + * Get the id of the revision for the file |
|
48 | + * |
|
49 | + * @return int|string |
|
50 | + * @since 15.0.0 |
|
51 | + */ |
|
52 | + public function getRevisionId(); |
|
53 | 53 | |
54 | - /** |
|
55 | - * Get the timestamp this version was created |
|
56 | - * |
|
57 | - * @return int |
|
58 | - * @since 15.0.0 |
|
59 | - */ |
|
60 | - public function getTimestamp(): int; |
|
54 | + /** |
|
55 | + * Get the timestamp this version was created |
|
56 | + * |
|
57 | + * @return int |
|
58 | + * @since 15.0.0 |
|
59 | + */ |
|
60 | + public function getTimestamp(): int; |
|
61 | 61 | |
62 | - /** |
|
63 | - * Get the size of this version |
|
64 | - * |
|
65 | - * @return int |
|
66 | - * @since 15.0.0 |
|
67 | - */ |
|
68 | - public function getSize(): int; |
|
62 | + /** |
|
63 | + * Get the size of this version |
|
64 | + * |
|
65 | + * @return int |
|
66 | + * @since 15.0.0 |
|
67 | + */ |
|
68 | + public function getSize(): int; |
|
69 | 69 | |
70 | - /** |
|
71 | - * Get the name of the source file at the time of making this version |
|
72 | - * |
|
73 | - * @return string |
|
74 | - * @since 15.0.0 |
|
75 | - */ |
|
76 | - public function getSourceFileName(): string; |
|
70 | + /** |
|
71 | + * Get the name of the source file at the time of making this version |
|
72 | + * |
|
73 | + * @return string |
|
74 | + * @since 15.0.0 |
|
75 | + */ |
|
76 | + public function getSourceFileName(): string; |
|
77 | 77 | |
78 | - /** |
|
79 | - * Get the mimetype of this version |
|
80 | - * |
|
81 | - * @return string |
|
82 | - * @since 15.0.0 |
|
83 | - */ |
|
84 | - public function getMimeType(): string; |
|
78 | + /** |
|
79 | + * Get the mimetype of this version |
|
80 | + * |
|
81 | + * @return string |
|
82 | + * @since 15.0.0 |
|
83 | + */ |
|
84 | + public function getMimeType(): string; |
|
85 | 85 | |
86 | - /** |
|
87 | - * Get the path of this version |
|
88 | - * |
|
89 | - * @return string |
|
90 | - * @since 15.0.0 |
|
91 | - */ |
|
92 | - public function getVersionPath(): string; |
|
86 | + /** |
|
87 | + * Get the path of this version |
|
88 | + * |
|
89 | + * @return string |
|
90 | + * @since 15.0.0 |
|
91 | + */ |
|
92 | + public function getVersionPath(): string; |
|
93 | 93 | |
94 | - /** |
|
95 | - * @return IUser |
|
96 | - * @since 15.0.0 |
|
97 | - */ |
|
98 | - public function getUser(): IUser; |
|
94 | + /** |
|
95 | + * @return IUser |
|
96 | + * @since 15.0.0 |
|
97 | + */ |
|
98 | + public function getUser(): IUser; |
|
99 | 99 | } |