Passed
Push — master ( 410bd9...efee3b )
by Morris
12:57
created
apps/dav/lib/CardDAV/AddressBook.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	}
100 100
 
101 101
 	public function getACL() {
102
-		$acl =  [
102
+		$acl = [
103 103
 			[
104 104
 				'privilege' => '{DAV:}read',
105 105
 				'principal' => $this->getOwner(),
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 				'protected' => true,
112 112
 			];
113 113
 		if ($this->getOwner() !== parent::getOwner()) {
114
-			$acl[] =  [
114
+			$acl[] = [
115 115
 					'privilege' => '{DAV:}read',
116 116
 					'principal' => parent::getOwner(),
117 117
 					'protected' => true,
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
 	public function delete() {
172 172
 		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
173
-			$principal = 'principal:' . parent::getOwner();
173
+			$principal = 'principal:'.parent::getOwner();
174 174
 			$shares = $this->carddavBackend->getShares($this->getResourceId());
175 175
 			$shares = array_filter($shares, function($share) use ($principal){
176 176
 				return $share['href'] === $principal;
Please login to merge, or discard this patch.
Indentation   +175 added lines, -175 removed lines patch added patch discarded remove patch
@@ -38,179 +38,179 @@
 block discarded – undo
38 38
  */
39 39
 class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable {
40 40
 
41
-	/**
42
-	 * AddressBook constructor.
43
-	 *
44
-	 * @param BackendInterface $carddavBackend
45
-	 * @param array $addressBookInfo
46
-	 * @param IL10N $l10n
47
-	 */
48
-	public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) {
49
-		parent::__construct($carddavBackend, $addressBookInfo);
50
-
51
-		if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME &&
52
-			$this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) {
53
-			$this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
54
-		}
55
-	}
56
-
57
-	/**
58
-	 * Updates the list of shares.
59
-	 *
60
-	 * The first array is a list of people that are to be added to the
61
-	 * addressbook.
62
-	 *
63
-	 * Every element in the add array has the following properties:
64
-	 *   * href - A url. Usually a mailto: address
65
-	 *   * commonName - Usually a first and last name, or false
66
-	 *   * summary - A description of the share, can also be false
67
-	 *   * readOnly - A boolean value
68
-	 *
69
-	 * Every element in the remove array is just the address string.
70
-	 *
71
-	 * @param array $add
72
-	 * @param array $remove
73
-	 * @return void
74
-	 * @throws Forbidden
75
-	 */
76
-	public function updateShares(array $add, array $remove) {
77
-		if ($this->isShared()) {
78
-			throw new Forbidden();
79
-		}
80
-		$this->carddavBackend->updateShares($this, $add, $remove);
81
-	}
82
-
83
-	/**
84
-	 * Returns the list of people whom this addressbook is shared with.
85
-	 *
86
-	 * Every element in this array should have the following properties:
87
-	 *   * href - Often a mailto: address
88
-	 *   * commonName - Optional, for example a first + last name
89
-	 *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
90
-	 *   * readOnly - boolean
91
-	 *   * summary - Optional, a description for the share
92
-	 *
93
-	 * @return array
94
-	 */
95
-	public function getShares() {
96
-		if ($this->isShared()) {
97
-			return [];
98
-		}
99
-		return $this->carddavBackend->getShares($this->getResourceId());
100
-	}
101
-
102
-	public function getACL() {
103
-		$acl =  [
104
-			[
105
-				'privilege' => '{DAV:}read',
106
-				'principal' => $this->getOwner(),
107
-				'protected' => true,
108
-			]];
109
-		$acl[] = [
110
-				'privilege' => '{DAV:}write',
111
-				'principal' => $this->getOwner(),
112
-				'protected' => true,
113
-			];
114
-		if ($this->getOwner() !== parent::getOwner()) {
115
-			$acl[] =  [
116
-					'privilege' => '{DAV:}read',
117
-					'principal' => parent::getOwner(),
118
-					'protected' => true,
119
-				];
120
-			if ($this->canWrite()) {
121
-				$acl[] = [
122
-					'privilege' => '{DAV:}write',
123
-					'principal' => parent::getOwner(),
124
-					'protected' => true,
125
-				];
126
-			}
127
-		}
128
-		if ($this->getOwner() === 'principals/system/system') {
129
-			$acl[] = [
130
-					'privilege' => '{DAV:}read',
131
-					'principal' => '{DAV:}authenticated',
132
-					'protected' => true,
133
-			];
134
-		}
135
-
136
-		if ($this->isShared()) {
137
-			return $acl;
138
-		}
139
-
140
-		return $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl);
141
-	}
142
-
143
-	public function getChildACL() {
144
-		return $this->getACL();
145
-	}
146
-
147
-	public function getChild($name) {
148
-
149
-		$obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
150
-		if (!$obj) {
151
-			throw new NotFound('Card not found');
152
-		}
153
-		$obj['acl'] = $this->getChildACL();
154
-		return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
155
-
156
-	}
157
-
158
-	/**
159
-	 * @return int
160
-	 */
161
-	public function getResourceId() {
162
-		return $this->addressBookInfo['id'];
163
-	}
164
-
165
-	public function getOwner() {
166
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
167
-			return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
168
-		}
169
-		return parent::getOwner();
170
-	}
171
-
172
-	public function delete() {
173
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
174
-			$principal = 'principal:' . parent::getOwner();
175
-			$shares = $this->carddavBackend->getShares($this->getResourceId());
176
-			$shares = array_filter($shares, function($share) use ($principal){
177
-				return $share['href'] === $principal;
178
-			});
179
-			if (empty($shares)) {
180
-				throw new Forbidden();
181
-			}
182
-
183
-			$this->carddavBackend->updateShares($this, [], [
184
-				$principal
185
-			]);
186
-			return;
187
-		}
188
-		parent::delete();
189
-	}
190
-
191
-	public function propPatch(PropPatch $propPatch) {
192
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
193
-			throw new Forbidden();
194
-		}
195
-		parent::propPatch($propPatch);
196
-	}
197
-
198
-	public function getContactsGroups() {
199
-		return $this->carddavBackend->collectCardProperties($this->getResourceId(), 'CATEGORIES');
200
-	}
201
-
202
-	private function isShared() {
203
-		if (!isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
204
-			return false;
205
-		}
206
-
207
-		return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'] !== $this->addressBookInfo['principaluri'];
208
-	}
209
-
210
-	private function canWrite() {
211
-		if (isset($this->addressBookInfo['{http://owncloud.org/ns}read-only'])) {
212
-			return !$this->addressBookInfo['{http://owncloud.org/ns}read-only'];
213
-		}
214
-		return true;
215
-	}
41
+    /**
42
+     * AddressBook constructor.
43
+     *
44
+     * @param BackendInterface $carddavBackend
45
+     * @param array $addressBookInfo
46
+     * @param IL10N $l10n
47
+     */
48
+    public function __construct(BackendInterface $carddavBackend, array $addressBookInfo, IL10N $l10n) {
49
+        parent::__construct($carddavBackend, $addressBookInfo);
50
+
51
+        if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME &&
52
+            $this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) {
53
+            $this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
54
+        }
55
+    }
56
+
57
+    /**
58
+     * Updates the list of shares.
59
+     *
60
+     * The first array is a list of people that are to be added to the
61
+     * addressbook.
62
+     *
63
+     * Every element in the add array has the following properties:
64
+     *   * href - A url. Usually a mailto: address
65
+     *   * commonName - Usually a first and last name, or false
66
+     *   * summary - A description of the share, can also be false
67
+     *   * readOnly - A boolean value
68
+     *
69
+     * Every element in the remove array is just the address string.
70
+     *
71
+     * @param array $add
72
+     * @param array $remove
73
+     * @return void
74
+     * @throws Forbidden
75
+     */
76
+    public function updateShares(array $add, array $remove) {
77
+        if ($this->isShared()) {
78
+            throw new Forbidden();
79
+        }
80
+        $this->carddavBackend->updateShares($this, $add, $remove);
81
+    }
82
+
83
+    /**
84
+     * Returns the list of people whom this addressbook is shared with.
85
+     *
86
+     * Every element in this array should have the following properties:
87
+     *   * href - Often a mailto: address
88
+     *   * commonName - Optional, for example a first + last name
89
+     *   * status - See the Sabre\CalDAV\SharingPlugin::STATUS_ constants.
90
+     *   * readOnly - boolean
91
+     *   * summary - Optional, a description for the share
92
+     *
93
+     * @return array
94
+     */
95
+    public function getShares() {
96
+        if ($this->isShared()) {
97
+            return [];
98
+        }
99
+        return $this->carddavBackend->getShares($this->getResourceId());
100
+    }
101
+
102
+    public function getACL() {
103
+        $acl =  [
104
+            [
105
+                'privilege' => '{DAV:}read',
106
+                'principal' => $this->getOwner(),
107
+                'protected' => true,
108
+            ]];
109
+        $acl[] = [
110
+                'privilege' => '{DAV:}write',
111
+                'principal' => $this->getOwner(),
112
+                'protected' => true,
113
+            ];
114
+        if ($this->getOwner() !== parent::getOwner()) {
115
+            $acl[] =  [
116
+                    'privilege' => '{DAV:}read',
117
+                    'principal' => parent::getOwner(),
118
+                    'protected' => true,
119
+                ];
120
+            if ($this->canWrite()) {
121
+                $acl[] = [
122
+                    'privilege' => '{DAV:}write',
123
+                    'principal' => parent::getOwner(),
124
+                    'protected' => true,
125
+                ];
126
+            }
127
+        }
128
+        if ($this->getOwner() === 'principals/system/system') {
129
+            $acl[] = [
130
+                    'privilege' => '{DAV:}read',
131
+                    'principal' => '{DAV:}authenticated',
132
+                    'protected' => true,
133
+            ];
134
+        }
135
+
136
+        if ($this->isShared()) {
137
+            return $acl;
138
+        }
139
+
140
+        return $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl);
141
+    }
142
+
143
+    public function getChildACL() {
144
+        return $this->getACL();
145
+    }
146
+
147
+    public function getChild($name) {
148
+
149
+        $obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
150
+        if (!$obj) {
151
+            throw new NotFound('Card not found');
152
+        }
153
+        $obj['acl'] = $this->getChildACL();
154
+        return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
155
+
156
+    }
157
+
158
+    /**
159
+     * @return int
160
+     */
161
+    public function getResourceId() {
162
+        return $this->addressBookInfo['id'];
163
+    }
164
+
165
+    public function getOwner() {
166
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
167
+            return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'];
168
+        }
169
+        return parent::getOwner();
170
+    }
171
+
172
+    public function delete() {
173
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
174
+            $principal = 'principal:' . parent::getOwner();
175
+            $shares = $this->carddavBackend->getShares($this->getResourceId());
176
+            $shares = array_filter($shares, function($share) use ($principal){
177
+                return $share['href'] === $principal;
178
+            });
179
+            if (empty($shares)) {
180
+                throw new Forbidden();
181
+            }
182
+
183
+            $this->carddavBackend->updateShares($this, [], [
184
+                $principal
185
+            ]);
186
+            return;
187
+        }
188
+        parent::delete();
189
+    }
190
+
191
+    public function propPatch(PropPatch $propPatch) {
192
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
193
+            throw new Forbidden();
194
+        }
195
+        parent::propPatch($propPatch);
196
+    }
197
+
198
+    public function getContactsGroups() {
199
+        return $this->carddavBackend->collectCardProperties($this->getResourceId(), 'CATEGORIES');
200
+    }
201
+
202
+    private function isShared() {
203
+        if (!isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) {
204
+            return false;
205
+        }
206
+
207
+        return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal'] !== $this->addressBookInfo['principaluri'];
208
+    }
209
+
210
+    private function canWrite() {
211
+        if (isset($this->addressBookInfo['{http://owncloud.org/ns}read-only'])) {
212
+            return !$this->addressBookInfo['{http://owncloud.org/ns}read-only'];
213
+        }
214
+        return true;
215
+    }
216 216
 }
Please login to merge, or discard this patch.
lib/private/OCS/Provider.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 			],
55 55
 		];
56 56
 
57
-		if($this->appManager->isEnabledForUser('files_sharing')) {
57
+		if ($this->appManager->isEnabledForUser('files_sharing')) {
58 58
 			$services['SHARING'] = [
59 59
 				'version' => 1,
60 60
 				'endpoints' => [
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			}
86 86
 		}
87 87
 
88
-		if($this->appManager->isEnabledForUser('activity')) {
88
+		if ($this->appManager->isEnabledForUser('activity')) {
89 89
 			$services['ACTIVITY'] = [
90 90
 				'version' => 1,
91 91
 				'endpoints' => [
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 			];
95 95
 		}
96 96
 
97
-		if($this->appManager->isEnabledForUser('provisioning_api')) {
97
+		if ($this->appManager->isEnabledForUser('provisioning_api')) {
98 98
 			$services['PROVISIONING'] = [
99 99
 				'version' => 1,
100 100
 				'endpoints' => [
Please login to merge, or discard this patch.
Indentation   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -24,92 +24,92 @@
 block discarded – undo
24 24
 namespace OC\OCS;
25 25
 
26 26
 class Provider extends \OCP\AppFramework\Controller {
27
-	/** @var \OCP\App\IAppManager */
28
-	private $appManager;
27
+    /** @var \OCP\App\IAppManager */
28
+    private $appManager;
29 29
 
30
-	/**
31
-	 * @param string $appName
32
-	 * @param \OCP\IRequest $request
33
-	 * @param \OCP\App\IAppManager $appManager
34
-	 */
35
-	public function __construct($appName,
36
-								\OCP\IRequest $request,
37
-								\OCP\App\IAppManager $appManager) {
38
-		parent::__construct($appName, $request);
39
-		$this->appManager = $appManager;
40
-	}
30
+    /**
31
+     * @param string $appName
32
+     * @param \OCP\IRequest $request
33
+     * @param \OCP\App\IAppManager $appManager
34
+     */
35
+    public function __construct($appName,
36
+                                \OCP\IRequest $request,
37
+                                \OCP\App\IAppManager $appManager) {
38
+        parent::__construct($appName, $request);
39
+        $this->appManager = $appManager;
40
+    }
41 41
 
42
-	/**
43
-	 * @return \OCP\AppFramework\Http\JSONResponse
44
-	 */
45
-	public function buildProviderList() {
46
-		$services = [
47
-			'PRIVATE_DATA' => [
48
-				'version' => 1,
49
-				'endpoints' => [
50
-					'store' => '/ocs/v2.php/privatedata/setattribute',
51
-					'read' => '/ocs/v2.php/privatedata/getattribute',
52
-					'delete' => '/ocs/v2.php/privatedata/deleteattribute',
53
-				],
54
-			],
55
-		];
42
+    /**
43
+     * @return \OCP\AppFramework\Http\JSONResponse
44
+     */
45
+    public function buildProviderList() {
46
+        $services = [
47
+            'PRIVATE_DATA' => [
48
+                'version' => 1,
49
+                'endpoints' => [
50
+                    'store' => '/ocs/v2.php/privatedata/setattribute',
51
+                    'read' => '/ocs/v2.php/privatedata/getattribute',
52
+                    'delete' => '/ocs/v2.php/privatedata/deleteattribute',
53
+                ],
54
+            ],
55
+        ];
56 56
 
57
-		if($this->appManager->isEnabledForUser('files_sharing')) {
58
-			$services['SHARING'] = [
59
-				'version' => 1,
60
-				'endpoints' => [
61
-					'share' => '/ocs/v2.php/apps/files_sharing/api/v1/shares',
62
-				],
63
-			];
64
-			$services['FEDERATED_SHARING'] = [
65
-				'version' => 1,
66
-				'endpoints' => [
67
-					'share' => '/ocs/v2.php/cloud/shares',
68
-					'webdav' => '/public.php/webdav/',
69
-				],
70
-			];
71
-		}
57
+        if($this->appManager->isEnabledForUser('files_sharing')) {
58
+            $services['SHARING'] = [
59
+                'version' => 1,
60
+                'endpoints' => [
61
+                    'share' => '/ocs/v2.php/apps/files_sharing/api/v1/shares',
62
+                ],
63
+            ];
64
+            $services['FEDERATED_SHARING'] = [
65
+                'version' => 1,
66
+                'endpoints' => [
67
+                    'share' => '/ocs/v2.php/cloud/shares',
68
+                    'webdav' => '/public.php/webdav/',
69
+                ],
70
+            ];
71
+        }
72 72
 
73
-		if ($this->appManager->isEnabledForUser('federation')) {
74
-			if (isset($services['FEDERATED_SHARING'])) {
75
-				$services['FEDERATED_SHARING']['endpoints']['shared-secret'] = '/ocs/v2.php/cloud/shared-secret';
76
-				$services['FEDERATED_SHARING']['endpoints']['system-address-book'] = '/remote.php/dav/addressbooks/system/system/system';
77
-				$services['FEDERATED_SHARING']['endpoints']['carddav-user'] = 'system';
78
-			} else {
79
-				$services['FEDERATED_SHARING'] = [
80
-					'version' => 1,
81
-					'endpoints' => [
82
-						'shared-secret' => '/ocs/v2.php/cloud/shared-secret',
83
-						'system-address-book' => '/remote.php/dav/addressbooks/system/system/system',
84
-						'carddav-user' => 'system'
85
-					],
86
-				];
87
-			}
88
-		}
73
+        if ($this->appManager->isEnabledForUser('federation')) {
74
+            if (isset($services['FEDERATED_SHARING'])) {
75
+                $services['FEDERATED_SHARING']['endpoints']['shared-secret'] = '/ocs/v2.php/cloud/shared-secret';
76
+                $services['FEDERATED_SHARING']['endpoints']['system-address-book'] = '/remote.php/dav/addressbooks/system/system/system';
77
+                $services['FEDERATED_SHARING']['endpoints']['carddav-user'] = 'system';
78
+            } else {
79
+                $services['FEDERATED_SHARING'] = [
80
+                    'version' => 1,
81
+                    'endpoints' => [
82
+                        'shared-secret' => '/ocs/v2.php/cloud/shared-secret',
83
+                        'system-address-book' => '/remote.php/dav/addressbooks/system/system/system',
84
+                        'carddav-user' => 'system'
85
+                    ],
86
+                ];
87
+            }
88
+        }
89 89
 
90
-		if($this->appManager->isEnabledForUser('activity')) {
91
-			$services['ACTIVITY'] = [
92
-				'version' => 1,
93
-				'endpoints' => [
94
-					'list' => '/ocs/v2.php/cloud/activity',
95
-				],
96
-			];
97
-		}
90
+        if($this->appManager->isEnabledForUser('activity')) {
91
+            $services['ACTIVITY'] = [
92
+                'version' => 1,
93
+                'endpoints' => [
94
+                    'list' => '/ocs/v2.php/cloud/activity',
95
+                ],
96
+            ];
97
+        }
98 98
 
99
-		if($this->appManager->isEnabledForUser('provisioning_api')) {
100
-			$services['PROVISIONING'] = [
101
-				'version' => 1,
102
-				'endpoints' => [
103
-					'user' => '/ocs/v2.php/cloud/users',
104
-					'groups' => '/ocs/v2.php/cloud/groups',
105
-					'apps' => '/ocs/v2.php/cloud/apps',
106
-				],
107
-			];
108
-		}
99
+        if($this->appManager->isEnabledForUser('provisioning_api')) {
100
+            $services['PROVISIONING'] = [
101
+                'version' => 1,
102
+                'endpoints' => [
103
+                    'user' => '/ocs/v2.php/cloud/users',
104
+                    'groups' => '/ocs/v2.php/cloud/groups',
105
+                    'apps' => '/ocs/v2.php/cloud/apps',
106
+                ],
107
+            ];
108
+        }
109 109
 
110
-		return new \OCP\AppFramework\Http\JSONResponse([
111
-			'version' => 2,
112
-			'services' => $services,
113
-		]);
114
-	}
110
+        return new \OCP\AppFramework\Http\JSONResponse([
111
+            'version' => 2,
112
+            'services' => $services,
113
+        ]);
114
+    }
115 115
 }
Please login to merge, or discard this patch.
core/templates/twofactorshowchallenge.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,11 @@
 block discarded – undo
16 16
 	<?php if ($error): ?>
17 17
 			<?php if($error_message): ?>
18 18
 				<p><strong><?php p($error_message); ?></strong></p>
19
-			<?php else: ?>
20
-				<p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p>
19
+			<?php else {
20
+    : ?>
21
+				<p><strong><?php p($l->t('Error while validating your second factor'));
22
+}
23
+?></strong></p>
21 24
 			<?php endif; ?>
22 25
 	<?php endif; ?>
23 26
 	<?php print_unescaped($template); ?>
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
 	<?php if (!is_null($_['backupProvider'])): ?>
25 25
 	<p>
26 26
 		<a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge',
27
-			[
28
-				'challengeProviderId' => $_['backupProvider']->getId(),
29
-				'redirect_url' => $_['redirect_url'],
30
-			]
31
-		)) ?>">
27
+            [
28
+                'challengeProviderId' => $_['backupProvider']->getId(),
29
+                'redirect_url' => $_['redirect_url'],
30
+            ]
31
+        )) ?>">
32 32
 			<?php p($l->t('Use backup code')) ?>
33 33
 		</a>
34 34
 	</p>
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 <div class="body-login-container update">
15 15
 	<h2 class="two-factor-header"><?php p($provider->getDisplayName()); ?></h2>
16 16
 	<?php if ($error): ?>
17
-			<?php if($error_message): ?>
17
+			<?php if ($error_message): ?>
18 18
 				<p><strong><?php p($error_message); ?></strong></p>
19 19
 			<?php else: ?>
20 20
 				<p><strong><?php p($l->t('Error while validating your second factor')); ?></strong></p>
Please login to merge, or discard this patch.
apps/workflowengine/lib/Check/FileMimeType.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 				if (strpos($path, '/webdav/') === 0) {
89 89
 					$path = substr($path, strlen('/webdav'));
90 90
 				}
91
-				$path = $this->path . $path;
91
+				$path = $this->path.$path;
92 92
 				$this->mimeType[$this->storage->getId()][$path] = $this->mimeTypeDetector->detectPath($path);
93 93
 				return $this->mimeType[$this->storage->getId()][$path];
94 94
 			}
Please login to merge, or discard this patch.
Indentation   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -29,165 +29,165 @@
 block discarded – undo
29 29
 
30 30
 class FileMimeType extends AbstractStringCheck {
31 31
 
32
-	/** @var array */
33
-	protected $mimeType;
34
-
35
-	/** @var IRequest */
36
-	protected $request;
37
-
38
-	/** @var IMimeTypeDetector */
39
-	protected $mimeTypeDetector;
40
-
41
-	/** @var IStorage */
42
-	protected $storage;
43
-
44
-	/** @var string */
45
-	protected $path;
46
-
47
-	/**
48
-	 * @param IL10N $l
49
-	 * @param IRequest $request
50
-	 * @param IMimeTypeDetector $mimeTypeDetector
51
-	 */
52
-	public function __construct(IL10N $l, IRequest $request, IMimeTypeDetector $mimeTypeDetector) {
53
-		parent::__construct($l);
54
-		$this->request = $request;
55
-		$this->mimeTypeDetector = $mimeTypeDetector;
56
-	}
57
-
58
-	/**
59
-	 * @param IStorage $storage
60
-	 * @param string $path
61
-	 */
62
-	public function setFileInfo(IStorage $storage, $path) {
63
-		$this->storage = $storage;
64
-		$this->path = $path;
65
-		if (!isset($this->mimeType[$this->storage->getId()][$this->path])
66
-			|| $this->mimeType[$this->storage->getId()][$this->path] === '') {
67
-			$this->mimeType[$this->storage->getId()][$this->path] = null;
68
-		}
69
-	}
70
-
71
-	/**
72
-	 * @return string
73
-	 */
74
-	protected function getActualValue() {
75
-		if ($this->mimeType[$this->storage->getId()][$this->path] !== null) {
76
-			return $this->mimeType[$this->storage->getId()][$this->path];
77
-		}
78
-
79
-		if ($this->isWebDAVRequest()) {
80
-			// Creating a folder
81
-			if ($this->request->getMethod() === 'MKCOL') {
82
-				$this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
83
-				return $this->mimeType[$this->storage->getId()][$this->path];
84
-			}
85
-
86
-			if ($this->request->getMethod() === 'PUT' || $this->request->getMethod() === 'MOVE') {
87
-				if ($this->request->getMethod() === 'MOVE') {
88
-					$this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($this->path);
89
-				} else {
90
-					$path = $this->request->getPathInfo();
91
-					$this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path);
92
-				}
93
-				return $this->mimeType[$this->storage->getId()][$this->path];
94
-			}
95
-		} else if ($this->isPublicWebDAVRequest()) {
96
-			if ($this->request->getMethod() === 'PUT') {
97
-				$path = $this->request->getPathInfo();
98
-				if (strpos($path, '/webdav/') === 0) {
99
-					$path = substr($path, strlen('/webdav'));
100
-				}
101
-				$path = $this->path . $path;
102
-				$this->mimeType[$this->storage->getId()][$path] = $this->mimeTypeDetector->detectPath($path);
103
-				return $this->mimeType[$this->storage->getId()][$path];
104
-			}
105
-		}
106
-
107
-		if (in_array($this->request->getMethod(), ['POST', 'PUT'])) {
108
-			$files = $this->request->getUploadedFile('files');
109
-			if (isset($files['type'][0])) {
110
-				$mimeType = $files['type'][0];
111
-				if ($this->mimeType === 'application/octet-stream') {
112
-					// Maybe not...
113
-					$mimeTypeTest = $this->mimeTypeDetector->detectPath($files['name'][0]);
114
-					if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {
115
-						$mimeType = $mimeTypeTest;
116
-					} else {
117
-						$mimeTypeTest = $this->mimeTypeDetector->detect($files['tmp_name'][0]);
118
-						if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {
119
-							$mimeType = $mimeTypeTest;
120
-						}
121
-					}
122
-				}
123
-				$this->mimeType[$this->storage->getId()][$this->path] = $mimeType;
124
-				return $mimeType;
125
-			}
126
-		}
127
-
128
-		$this->mimeType[$this->storage->getId()][$this->path] = $this->storage->getMimeType($this->path);
129
-		if ($this->mimeType[$this->storage->getId()][$this->path] === 'application/octet-stream') {
130
-			$this->mimeType[$this->storage->getId()][$this->path] = $this->detectMimetypeFromPath();
131
-		}
132
-
133
-		return $this->mimeType[$this->storage->getId()][$this->path];
134
-	}
135
-
136
-	/**
137
-	 * @return string
138
-	 */
139
-	protected function detectMimetypeFromPath() {
140
-		$mimeType = $this->mimeTypeDetector->detectPath($this->path);
141
-		if ($mimeType !== 'application/octet-stream' && $mimeType !== false) {
142
-			return $mimeType;
143
-		}
144
-
145
-		if ($this->storage->instanceOfStorage('\OC\Files\Storage\Local')
146
-			|| $this->storage->instanceOfStorage('\OC\Files\Storage\Home')
147
-			|| $this->storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')) {
148
-			$localFile = $this->storage->getLocalFile($this->path);
149
-			if ($localFile !== false) {
150
-				$mimeType = $this->mimeTypeDetector->detect($localFile);
151
-				if ($mimeType !== false) {
152
-					return $mimeType;
153
-				}
154
-			}
155
-
156
-			return 'application/octet-stream';
157
-		} else {
158
-			$handle = $this->storage->fopen($this->path, 'r');
159
-			$data = fread($handle, 8024);
160
-			fclose($handle);
161
-			$mimeType = $this->mimeTypeDetector->detectString($data);
162
-			if ($mimeType !== false) {
163
-				return $mimeType;
164
-			}
165
-
166
-			return 'application/octet-stream';
167
-		}
168
-	}
169
-
170
-	/**
171
-	 * @return bool
172
-	 */
173
-	protected function isWebDAVRequest() {
174
-		return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && (
175
-			$this->request->getPathInfo() === '/webdav' ||
176
-			strpos($this->request->getPathInfo(), '/webdav/') === 0 ||
177
-			$this->request->getPathInfo() === '/dav/files' ||
178
-			strpos($this->request->getPathInfo(), '/dav/files/') === 0 ||
179
-			$this->request->getPathInfo() === '/dav/uploads' ||
180
-			strpos($this->request->getPathInfo(), '/dav/uploads/') === 0
181
-		);
182
-	}
183
-
184
-	/**
185
-	 * @return bool
186
-	 */
187
-	protected function isPublicWebDAVRequest() {
188
-		return substr($this->request->getScriptName(), 0 - strlen('/public.php')) === '/public.php' && (
189
-			$this->request->getPathInfo() === '/webdav' ||
190
-			strpos($this->request->getPathInfo(), '/webdav/') === 0
191
-		);
192
-	}
32
+    /** @var array */
33
+    protected $mimeType;
34
+
35
+    /** @var IRequest */
36
+    protected $request;
37
+
38
+    /** @var IMimeTypeDetector */
39
+    protected $mimeTypeDetector;
40
+
41
+    /** @var IStorage */
42
+    protected $storage;
43
+
44
+    /** @var string */
45
+    protected $path;
46
+
47
+    /**
48
+     * @param IL10N $l
49
+     * @param IRequest $request
50
+     * @param IMimeTypeDetector $mimeTypeDetector
51
+     */
52
+    public function __construct(IL10N $l, IRequest $request, IMimeTypeDetector $mimeTypeDetector) {
53
+        parent::__construct($l);
54
+        $this->request = $request;
55
+        $this->mimeTypeDetector = $mimeTypeDetector;
56
+    }
57
+
58
+    /**
59
+     * @param IStorage $storage
60
+     * @param string $path
61
+     */
62
+    public function setFileInfo(IStorage $storage, $path) {
63
+        $this->storage = $storage;
64
+        $this->path = $path;
65
+        if (!isset($this->mimeType[$this->storage->getId()][$this->path])
66
+            || $this->mimeType[$this->storage->getId()][$this->path] === '') {
67
+            $this->mimeType[$this->storage->getId()][$this->path] = null;
68
+        }
69
+    }
70
+
71
+    /**
72
+     * @return string
73
+     */
74
+    protected function getActualValue() {
75
+        if ($this->mimeType[$this->storage->getId()][$this->path] !== null) {
76
+            return $this->mimeType[$this->storage->getId()][$this->path];
77
+        }
78
+
79
+        if ($this->isWebDAVRequest()) {
80
+            // Creating a folder
81
+            if ($this->request->getMethod() === 'MKCOL') {
82
+                $this->mimeType[$this->storage->getId()][$this->path] = 'httpd/unix-directory';
83
+                return $this->mimeType[$this->storage->getId()][$this->path];
84
+            }
85
+
86
+            if ($this->request->getMethod() === 'PUT' || $this->request->getMethod() === 'MOVE') {
87
+                if ($this->request->getMethod() === 'MOVE') {
88
+                    $this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($this->path);
89
+                } else {
90
+                    $path = $this->request->getPathInfo();
91
+                    $this->mimeType[$this->storage->getId()][$this->path] = $this->mimeTypeDetector->detectPath($path);
92
+                }
93
+                return $this->mimeType[$this->storage->getId()][$this->path];
94
+            }
95
+        } else if ($this->isPublicWebDAVRequest()) {
96
+            if ($this->request->getMethod() === 'PUT') {
97
+                $path = $this->request->getPathInfo();
98
+                if (strpos($path, '/webdav/') === 0) {
99
+                    $path = substr($path, strlen('/webdav'));
100
+                }
101
+                $path = $this->path . $path;
102
+                $this->mimeType[$this->storage->getId()][$path] = $this->mimeTypeDetector->detectPath($path);
103
+                return $this->mimeType[$this->storage->getId()][$path];
104
+            }
105
+        }
106
+
107
+        if (in_array($this->request->getMethod(), ['POST', 'PUT'])) {
108
+            $files = $this->request->getUploadedFile('files');
109
+            if (isset($files['type'][0])) {
110
+                $mimeType = $files['type'][0];
111
+                if ($this->mimeType === 'application/octet-stream') {
112
+                    // Maybe not...
113
+                    $mimeTypeTest = $this->mimeTypeDetector->detectPath($files['name'][0]);
114
+                    if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {
115
+                        $mimeType = $mimeTypeTest;
116
+                    } else {
117
+                        $mimeTypeTest = $this->mimeTypeDetector->detect($files['tmp_name'][0]);
118
+                        if ($mimeTypeTest !== 'application/octet-stream' && $mimeTypeTest !== false) {
119
+                            $mimeType = $mimeTypeTest;
120
+                        }
121
+                    }
122
+                }
123
+                $this->mimeType[$this->storage->getId()][$this->path] = $mimeType;
124
+                return $mimeType;
125
+            }
126
+        }
127
+
128
+        $this->mimeType[$this->storage->getId()][$this->path] = $this->storage->getMimeType($this->path);
129
+        if ($this->mimeType[$this->storage->getId()][$this->path] === 'application/octet-stream') {
130
+            $this->mimeType[$this->storage->getId()][$this->path] = $this->detectMimetypeFromPath();
131
+        }
132
+
133
+        return $this->mimeType[$this->storage->getId()][$this->path];
134
+    }
135
+
136
+    /**
137
+     * @return string
138
+     */
139
+    protected function detectMimetypeFromPath() {
140
+        $mimeType = $this->mimeTypeDetector->detectPath($this->path);
141
+        if ($mimeType !== 'application/octet-stream' && $mimeType !== false) {
142
+            return $mimeType;
143
+        }
144
+
145
+        if ($this->storage->instanceOfStorage('\OC\Files\Storage\Local')
146
+            || $this->storage->instanceOfStorage('\OC\Files\Storage\Home')
147
+            || $this->storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')) {
148
+            $localFile = $this->storage->getLocalFile($this->path);
149
+            if ($localFile !== false) {
150
+                $mimeType = $this->mimeTypeDetector->detect($localFile);
151
+                if ($mimeType !== false) {
152
+                    return $mimeType;
153
+                }
154
+            }
155
+
156
+            return 'application/octet-stream';
157
+        } else {
158
+            $handle = $this->storage->fopen($this->path, 'r');
159
+            $data = fread($handle, 8024);
160
+            fclose($handle);
161
+            $mimeType = $this->mimeTypeDetector->detectString($data);
162
+            if ($mimeType !== false) {
163
+                return $mimeType;
164
+            }
165
+
166
+            return 'application/octet-stream';
167
+        }
168
+    }
169
+
170
+    /**
171
+     * @return bool
172
+     */
173
+    protected function isWebDAVRequest() {
174
+        return substr($this->request->getScriptName(), 0 - strlen('/remote.php')) === '/remote.php' && (
175
+            $this->request->getPathInfo() === '/webdav' ||
176
+            strpos($this->request->getPathInfo(), '/webdav/') === 0 ||
177
+            $this->request->getPathInfo() === '/dav/files' ||
178
+            strpos($this->request->getPathInfo(), '/dav/files/') === 0 ||
179
+            $this->request->getPathInfo() === '/dav/uploads' ||
180
+            strpos($this->request->getPathInfo(), '/dav/uploads/') === 0
181
+        );
182
+    }
183
+
184
+    /**
185
+     * @return bool
186
+     */
187
+    protected function isPublicWebDAVRequest() {
188
+        return substr($this->request->getScriptName(), 0 - strlen('/public.php')) === '/public.php' && (
189
+            $this->request->getPathInfo() === '/webdav' ||
190
+            strpos($this->request->getPathInfo(), '/webdav/') === 0
191
+        );
192
+    }
193 193
 }
Please login to merge, or discard this patch.
lib/public/Files/Search/ISearchQuery.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -27,41 +27,41 @@
 block discarded – undo
27 27
  * @since 12.0.0
28 28
  */
29 29
 interface ISearchQuery {
30
-	/**
31
-	 * @return ISearchOperator
32
-	 * @since 12.0.0
33
-	 */
34
-	public function getSearchOperation();
30
+    /**
31
+     * @return ISearchOperator
32
+     * @since 12.0.0
33
+     */
34
+    public function getSearchOperation();
35 35
 
36
-	/**
37
-	 * Get the maximum number of results to return
38
-	 *
39
-	 * @return integer
40
-	 * @since 12.0.0
41
-	 */
42
-	public function getLimit();
36
+    /**
37
+     * Get the maximum number of results to return
38
+     *
39
+     * @return integer
40
+     * @since 12.0.0
41
+     */
42
+    public function getLimit();
43 43
 
44
-	/**
45
-	 * Get the offset for returned results
46
-	 *
47
-	 * @return integer
48
-	 * @since 12.0.0
49
-	 */
50
-	public function getOffset();
44
+    /**
45
+     * Get the offset for returned results
46
+     *
47
+     * @return integer
48
+     * @since 12.0.0
49
+     */
50
+    public function getOffset();
51 51
 
52
-	/**
53
-	 * The fields and directions to order by
54
-	 *
55
-	 * @return ISearchOrder[]
56
-	 * @since 12.0.0
57
-	 */
58
-	public function getOrder();
52
+    /**
53
+     * The fields and directions to order by
54
+     *
55
+     * @return ISearchOrder[]
56
+     * @since 12.0.0
57
+     */
58
+    public function getOrder();
59 59
 
60
-	/**
61
-	 * The user that issued the search
62
-	 *
63
-	 * @return IUser
64
-	 * @since 12.0.0
65
-	 */
66
-	public function getUser();
60
+    /**
61
+     * The user that issued the search
62
+     *
63
+     * @return IUser
64
+     * @since 12.0.0
65
+     */
66
+    public function getUser();
67 67
 }
Please login to merge, or discard this patch.
lib/private/Files/Search/SearchQuery.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -27,66 +27,66 @@
 block discarded – undo
27 27
 use OCP\IUser;
28 28
 
29 29
 class SearchQuery implements ISearchQuery {
30
-	/** @var  ISearchOperator */
31
-	private $searchOperation;
32
-	/** @var  integer */
33
-	private $limit;
34
-	/** @var  integer */
35
-	private $offset;
36
-	/** @var  ISearchOrder[] */
37
-	private $order;
38
-	/** @var IUser */
39
-	private $user;
30
+    /** @var  ISearchOperator */
31
+    private $searchOperation;
32
+    /** @var  integer */
33
+    private $limit;
34
+    /** @var  integer */
35
+    private $offset;
36
+    /** @var  ISearchOrder[] */
37
+    private $order;
38
+    /** @var IUser */
39
+    private $user;
40 40
 
41
-	/**
42
-	 * SearchQuery constructor.
43
-	 *
44
-	 * @param ISearchOperator $searchOperation
45
-	 * @param int $limit
46
-	 * @param int $offset
47
-	 * @param array $order
48
-	 * @param IUser $user
49
-	 */
50
-	public function __construct(ISearchOperator $searchOperation, $limit, $offset, array $order, IUser $user) {
51
-		$this->searchOperation = $searchOperation;
52
-		$this->limit = $limit;
53
-		$this->offset = $offset;
54
-		$this->order = $order;
55
-		$this->user = $user;
56
-	}
41
+    /**
42
+     * SearchQuery constructor.
43
+     *
44
+     * @param ISearchOperator $searchOperation
45
+     * @param int $limit
46
+     * @param int $offset
47
+     * @param array $order
48
+     * @param IUser $user
49
+     */
50
+    public function __construct(ISearchOperator $searchOperation, $limit, $offset, array $order, IUser $user) {
51
+        $this->searchOperation = $searchOperation;
52
+        $this->limit = $limit;
53
+        $this->offset = $offset;
54
+        $this->order = $order;
55
+        $this->user = $user;
56
+    }
57 57
 
58
-	/**
59
-	 * @return ISearchOperator
60
-	 */
61
-	public function getSearchOperation() {
62
-		return $this->searchOperation;
63
-	}
58
+    /**
59
+     * @return ISearchOperator
60
+     */
61
+    public function getSearchOperation() {
62
+        return $this->searchOperation;
63
+    }
64 64
 
65
-	/**
66
-	 * @return int
67
-	 */
68
-	public function getLimit() {
69
-		return $this->limit;
70
-	}
65
+    /**
66
+     * @return int
67
+     */
68
+    public function getLimit() {
69
+        return $this->limit;
70
+    }
71 71
 
72
-	/**
73
-	 * @return int
74
-	 */
75
-	public function getOffset() {
76
-		return $this->offset;
77
-	}
72
+    /**
73
+     * @return int
74
+     */
75
+    public function getOffset() {
76
+        return $this->offset;
77
+    }
78 78
 
79
-	/**
80
-	 * @return ISearchOrder[]
81
-	 */
82
-	public function getOrder() {
83
-		return $this->order;
84
-	}
79
+    /**
80
+     * @return ISearchOrder[]
81
+     */
82
+    public function getOrder() {
83
+        return $this->order;
84
+    }
85 85
 
86
-	/**
87
-	 * @return IUser
88
-	 */
89
-	public function getUser() {
90
-		return $this->user;
91
-	}
86
+    /**
87
+     * @return IUser
88
+     */
89
+    public function getUser() {
90
+        return $this->user;
91
+    }
92 92
 }
Please login to merge, or discard this patch.
lib/private/Preview/MP3.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -29,38 +29,38 @@
 block discarded – undo
29 29
 use ID3Parser\ID3Parser;
30 30
 
31 31
 class MP3 extends Provider {
32
-	/**
33
-	 * {@inheritDoc}
34
-	 */
35
-	public function getMimeType() {
36
-		return '/audio\/mpeg/';
37
-	}
32
+    /**
33
+     * {@inheritDoc}
34
+     */
35
+    public function getMimeType() {
36
+        return '/audio\/mpeg/';
37
+    }
38 38
 
39
-	/**
40
-	 * {@inheritDoc}
41
-	 */
42
-	public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
43
-		$getID3 = new ID3Parser();
39
+    /**
40
+     * {@inheritDoc}
41
+     */
42
+    public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {
43
+        $getID3 = new ID3Parser();
44 44
 
45
-		$tmpPath = $fileview->toTmpFile($path);
46
-		$tags = $getID3->analyze($tmpPath);
47
-		unlink($tmpPath);
48
-		$picture = isset($tags['id3v2']['APIC'][0]['data']) ? $tags['id3v2']['APIC'][0]['data'] : null;
49
-		if(is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
50
-			$picture = $tags['id3v2']['PIC'][0]['data'];
51
-		}
45
+        $tmpPath = $fileview->toTmpFile($path);
46
+        $tags = $getID3->analyze($tmpPath);
47
+        unlink($tmpPath);
48
+        $picture = isset($tags['id3v2']['APIC'][0]['data']) ? $tags['id3v2']['APIC'][0]['data'] : null;
49
+        if(is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
50
+            $picture = $tags['id3v2']['PIC'][0]['data'];
51
+        }
52 52
 
53
-		if(!is_null($picture)) {
54
-			$image = new \OC_Image();
55
-			$image->loadFromData($picture);
53
+        if(!is_null($picture)) {
54
+            $image = new \OC_Image();
55
+            $image->loadFromData($picture);
56 56
 
57
-			if ($image->valid()) {
58
-				$image->scaleDownToFit($maxX, $maxY);
57
+            if ($image->valid()) {
58
+                $image->scaleDownToFit($maxX, $maxY);
59 59
 
60
-				return $image;
61
-			}
62
-		}
60
+                return $image;
61
+            }
62
+        }
63 63
 
64
-		return false;
65
-	}
64
+        return false;
65
+    }
66 66
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
 		$tags = $getID3->analyze($tmpPath);
47 47
 		unlink($tmpPath);
48 48
 		$picture = isset($tags['id3v2']['APIC'][0]['data']) ? $tags['id3v2']['APIC'][0]['data'] : null;
49
-		if(is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
49
+		if (is_null($picture) && isset($tags['id3v2']['PIC'][0]['data'])) {
50 50
 			$picture = $tags['id3v2']['PIC'][0]['data'];
51 51
 		}
52 52
 
53
-		if(!is_null($picture)) {
53
+		if (!is_null($picture)) {
54 54
 			$image = new \OC_Image();
55 55
 			$image->loadFromData($picture);
56 56
 
Please login to merge, or discard this patch.
apps/federatedfilesharing/appinfo/routes.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,18 +23,18 @@
 block discarded – undo
23 23
  */
24 24
 
25 25
 return [
26
-	'routes' => [
27
-		['name' => 'MountPublicLink#createFederatedShare', 'url' => '/createFederatedShare', 'verb' => 'POST'],
28
-		['name' => 'MountPublicLink#askForFederatedShare', 'url' => '/askForFederatedShare', 'verb' => 'POST'],
29
-	],
30
-	'ocs' => [
31
-		['root' => '/cloud', 'name' => 'RequestHandler#createShare', 'url' => '/shares', 'verb' => 'POST'],
32
-		['root' => '/cloud', 'name' => 'RequestHandler#reShare', 'url' => '/shares/{id}/reshare', 'verb' => 'POST'],
33
-		['root' => '/cloud', 'name' => 'RequestHandler#updatePermissions', 'url' => '/shares/{id}/permissions', 'verb' => 'POST'],
34
-		['root' => '/cloud', 'name' => 'RequestHandler#acceptShare', 'url' => '/shares/{id}/accept', 'verb' => 'POST'],
35
-		['root' => '/cloud', 'name' => 'RequestHandler#declineShare', 'url' => '/shares/{id}/decline', 'verb' => 'POST'],
36
-		['root' => '/cloud', 'name' => 'RequestHandler#unshare', 'url' => '/shares/{id}/unshare', 'verb' => 'POST'],
37
-		['root' => '/cloud', 'name' => 'RequestHandler#revoke', 'url' => '/shares/{id}/revoke', 'verb' => 'POST'],
38
-		['root' => '/cloud', 'name' => 'RequestHandler#move', 'url' => '/shares/{id}/move', 'verb' => 'POST'],
39
-	],
26
+    'routes' => [
27
+        ['name' => 'MountPublicLink#createFederatedShare', 'url' => '/createFederatedShare', 'verb' => 'POST'],
28
+        ['name' => 'MountPublicLink#askForFederatedShare', 'url' => '/askForFederatedShare', 'verb' => 'POST'],
29
+    ],
30
+    'ocs' => [
31
+        ['root' => '/cloud', 'name' => 'RequestHandler#createShare', 'url' => '/shares', 'verb' => 'POST'],
32
+        ['root' => '/cloud', 'name' => 'RequestHandler#reShare', 'url' => '/shares/{id}/reshare', 'verb' => 'POST'],
33
+        ['root' => '/cloud', 'name' => 'RequestHandler#updatePermissions', 'url' => '/shares/{id}/permissions', 'verb' => 'POST'],
34
+        ['root' => '/cloud', 'name' => 'RequestHandler#acceptShare', 'url' => '/shares/{id}/accept', 'verb' => 'POST'],
35
+        ['root' => '/cloud', 'name' => 'RequestHandler#declineShare', 'url' => '/shares/{id}/decline', 'verb' => 'POST'],
36
+        ['root' => '/cloud', 'name' => 'RequestHandler#unshare', 'url' => '/shares/{id}/unshare', 'verb' => 'POST'],
37
+        ['root' => '/cloud', 'name' => 'RequestHandler#revoke', 'url' => '/shares/{id}/revoke', 'verb' => 'POST'],
38
+        ['root' => '/cloud', 'name' => 'RequestHandler#move', 'url' => '/shares/{id}/move', 'verb' => 'POST'],
39
+    ],
40 40
 ];
Please login to merge, or discard this patch.
apps/dav/appinfo/v2/remote.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 // no php execution timeout for webdav
23 23
 if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
24
-	@set_time_limit(0);
24
+    @set_time_limit(0);
25 25
 }
26 26
 ignore_user_abort(true);
27 27
 
Please login to merge, or discard this patch.