Passed
Push — master ( c00d6f...a085a8 )
by Morris
09:54 queued 11s
created
lib/public/Files/Cache/ICache.php 1 patch
Indentation   +208 added lines, -208 removed lines patch added patch discarded remove patch
@@ -37,233 +37,233 @@
 block discarded – undo
37 37
  * @since 9.0.0
38 38
  */
39 39
 interface ICache {
40
-	const NOT_FOUND = 0;
41
-	const PARTIAL = 1; //only partial data available, file not cached in the database
42
-	const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
43
-	const COMPLETE = 3;
40
+    const NOT_FOUND = 0;
41
+    const PARTIAL = 1; //only partial data available, file not cached in the database
42
+    const SHALLOW = 2; //folder in cache, but not all child files are completely scanned
43
+    const COMPLETE = 3;
44 44
 
45
-	/**
46
-	 * Get the numeric storage id for this cache's storage
47
-	 *
48
-	 * @return int
49
-	 * @since 9.0.0
50
-	 */
51
-	public function getNumericStorageId();
45
+    /**
46
+     * Get the numeric storage id for this cache's storage
47
+     *
48
+     * @return int
49
+     * @since 9.0.0
50
+     */
51
+    public function getNumericStorageId();
52 52
 
53
-	/**
54
-	 * get the stored metadata of a file or folder
55
-	 *
56
-	 * @param string | int $file either the path of a file or folder or the file id for a file or folder
57
-	 * @return ICacheEntry|false the cache entry or false if the file is not found in the cache
58
-	 * @since 9.0.0
59
-	 */
60
-	public function get($file);
53
+    /**
54
+     * get the stored metadata of a file or folder
55
+     *
56
+     * @param string | int $file either the path of a file or folder or the file id for a file or folder
57
+     * @return ICacheEntry|false the cache entry or false if the file is not found in the cache
58
+     * @since 9.0.0
59
+     */
60
+    public function get($file);
61 61
 
62
-	/**
63
-	 * get the metadata of all files stored in $folder
64
-	 *
65
-	 * Only returns files one level deep, no recursion
66
-	 *
67
-	 * @param string $folder
68
-	 * @return ICacheEntry[]
69
-	 * @since 9.0.0
70
-	 */
71
-	public function getFolderContents($folder);
62
+    /**
63
+     * get the metadata of all files stored in $folder
64
+     *
65
+     * Only returns files one level deep, no recursion
66
+     *
67
+     * @param string $folder
68
+     * @return ICacheEntry[]
69
+     * @since 9.0.0
70
+     */
71
+    public function getFolderContents($folder);
72 72
 
73
-	/**
74
-	 * get the metadata of all files stored in $folder
75
-	 *
76
-	 * Only returns files one level deep, no recursion
77
-	 *
78
-	 * @param int $fileId the file id of the folder
79
-	 * @return ICacheEntry[]
80
-	 * @since 9.0.0
81
-	 */
82
-	public function getFolderContentsById($fileId);
73
+    /**
74
+     * get the metadata of all files stored in $folder
75
+     *
76
+     * Only returns files one level deep, no recursion
77
+     *
78
+     * @param int $fileId the file id of the folder
79
+     * @return ICacheEntry[]
80
+     * @since 9.0.0
81
+     */
82
+    public function getFolderContentsById($fileId);
83 83
 
84
-	/**
85
-	 * store meta data for a file or folder
86
-	 * This will automatically call either insert or update depending on if the file exists
87
-	 *
88
-	 * @param string $file
89
-	 * @param array $data
90
-	 *
91
-	 * @return int file id
92
-	 * @throws \RuntimeException
93
-	 * @since 9.0.0
94
-	 */
95
-	public function put($file, array $data);
84
+    /**
85
+     * store meta data for a file or folder
86
+     * This will automatically call either insert or update depending on if the file exists
87
+     *
88
+     * @param string $file
89
+     * @param array $data
90
+     *
91
+     * @return int file id
92
+     * @throws \RuntimeException
93
+     * @since 9.0.0
94
+     */
95
+    public function put($file, array $data);
96 96
 
97
-	/**
98
-	 * insert meta data for a new file or folder
99
-	 *
100
-	 * @param string $file
101
-	 * @param array $data
102
-	 *
103
-	 * @return int file id
104
-	 * @throws \RuntimeException
105
-	 * @since 9.0.0
106
-	 */
107
-	public function insert($file, array $data);
97
+    /**
98
+     * insert meta data for a new file or folder
99
+     *
100
+     * @param string $file
101
+     * @param array $data
102
+     *
103
+     * @return int file id
104
+     * @throws \RuntimeException
105
+     * @since 9.0.0
106
+     */
107
+    public function insert($file, array $data);
108 108
 
109
-	/**
110
-	 * update the metadata of an existing file or folder in the cache
111
-	 *
112
-	 * @param int $id the fileid of the existing file or folder
113
-	 * @param array $data [$key => $value] the metadata to update, only the fields provided in the array will be updated, non-provided values will remain unchanged
114
-	 * @since 9.0.0
115
-	 */
116
-	public function update($id, array $data);
109
+    /**
110
+     * update the metadata of an existing file or folder in the cache
111
+     *
112
+     * @param int $id the fileid of the existing file or folder
113
+     * @param array $data [$key => $value] the metadata to update, only the fields provided in the array will be updated, non-provided values will remain unchanged
114
+     * @since 9.0.0
115
+     */
116
+    public function update($id, array $data);
117 117
 
118
-	/**
119
-	 * get the file id for a file
120
-	 *
121
-	 * A file id is a numeric id for a file or folder that's unique within an owncloud instance which stays the same for the lifetime of a file
122
-	 *
123
-	 * File ids are easiest way for apps to store references to a file since unlike paths they are not affected by renames or sharing
124
-	 *
125
-	 * @param string $file
126
-	 * @return int
127
-	 * @since 9.0.0
128
-	 */
129
-	public function getId($file);
118
+    /**
119
+     * get the file id for a file
120
+     *
121
+     * A file id is a numeric id for a file or folder that's unique within an owncloud instance which stays the same for the lifetime of a file
122
+     *
123
+     * File ids are easiest way for apps to store references to a file since unlike paths they are not affected by renames or sharing
124
+     *
125
+     * @param string $file
126
+     * @return int
127
+     * @since 9.0.0
128
+     */
129
+    public function getId($file);
130 130
 
131
-	/**
132
-	 * get the id of the parent folder of a file
133
-	 *
134
-	 * @param string $file
135
-	 * @return int
136
-	 * @since 9.0.0
137
-	 */
138
-	public function getParentId($file);
131
+    /**
132
+     * get the id of the parent folder of a file
133
+     *
134
+     * @param string $file
135
+     * @return int
136
+     * @since 9.0.0
137
+     */
138
+    public function getParentId($file);
139 139
 
140
-	/**
141
-	 * check if a file is available in the cache
142
-	 *
143
-	 * @param string $file
144
-	 * @return bool
145
-	 * @since 9.0.0
146
-	 */
147
-	public function inCache($file);
140
+    /**
141
+     * check if a file is available in the cache
142
+     *
143
+     * @param string $file
144
+     * @return bool
145
+     * @since 9.0.0
146
+     */
147
+    public function inCache($file);
148 148
 
149
-	/**
150
-	 * remove a file or folder from the cache
151
-	 *
152
-	 * when removing a folder from the cache all files and folders inside the folder will be removed as well
153
-	 *
154
-	 * @param string $file
155
-	 * @since 9.0.0
156
-	 */
157
-	public function remove($file);
149
+    /**
150
+     * remove a file or folder from the cache
151
+     *
152
+     * when removing a folder from the cache all files and folders inside the folder will be removed as well
153
+     *
154
+     * @param string $file
155
+     * @since 9.0.0
156
+     */
157
+    public function remove($file);
158 158
 
159
-	/**
160
-	 * Move a file or folder in the cache
161
-	 *
162
-	 * @param string $source
163
-	 * @param string $target
164
-	 * @since 9.0.0
165
-	 */
166
-	public function move($source, $target);
159
+    /**
160
+     * Move a file or folder in the cache
161
+     *
162
+     * @param string $source
163
+     * @param string $target
164
+     * @since 9.0.0
165
+     */
166
+    public function move($source, $target);
167 167
 
168
-	/**
169
-	 * Move a file or folder in the cache
170
-	 *
171
-	 * Note that this should make sure the entries are removed from the source cache
172
-	 *
173
-	 * @param \OCP\Files\Cache\ICache $sourceCache
174
-	 * @param string $sourcePath
175
-	 * @param string $targetPath
176
-	 * @throws \OC\DatabaseException
177
-	 * @since 9.0.0
178
-	 */
179
-	public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath);
168
+    /**
169
+     * Move a file or folder in the cache
170
+     *
171
+     * Note that this should make sure the entries are removed from the source cache
172
+     *
173
+     * @param \OCP\Files\Cache\ICache $sourceCache
174
+     * @param string $sourcePath
175
+     * @param string $targetPath
176
+     * @throws \OC\DatabaseException
177
+     * @since 9.0.0
178
+     */
179
+    public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath);
180 180
 
181
-	/**
182
-	 * Get the scan status of a file
183
-	 *
184
-	 * - ICache::NOT_FOUND: File is not in the cache
185
-	 * - ICache::PARTIAL: File is not stored in the cache but some incomplete data is known
186
-	 * - ICache::SHALLOW: The folder and it's direct children are in the cache but not all sub folders are fully scanned
187
-	 * - ICache::COMPLETE: The file or folder, with all it's children) are fully scanned
188
-	 *
189
-	 * @param string $file
190
-	 *
191
-	 * @return int ICache::NOT_FOUND, ICache::PARTIAL, ICache::SHALLOW or ICache::COMPLETE
192
-	 * @since 9.0.0
193
-	 */
194
-	public function getStatus($file);
181
+    /**
182
+     * Get the scan status of a file
183
+     *
184
+     * - ICache::NOT_FOUND: File is not in the cache
185
+     * - ICache::PARTIAL: File is not stored in the cache but some incomplete data is known
186
+     * - ICache::SHALLOW: The folder and it's direct children are in the cache but not all sub folders are fully scanned
187
+     * - ICache::COMPLETE: The file or folder, with all it's children) are fully scanned
188
+     *
189
+     * @param string $file
190
+     *
191
+     * @return int ICache::NOT_FOUND, ICache::PARTIAL, ICache::SHALLOW or ICache::COMPLETE
192
+     * @since 9.0.0
193
+     */
194
+    public function getStatus($file);
195 195
 
196
-	/**
197
-	 * search for files matching $pattern, files are matched if their filename matches the search pattern
198
-	 *
199
-	 * @param string $pattern the search pattern using SQL search syntax (e.g. '%searchstring%')
200
-	 * @return ICacheEntry[] an array of cache entries where the name matches the search pattern
201
-	 * @since 9.0.0
202
-	 * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
203
-	 */
204
-	public function search($pattern);
196
+    /**
197
+     * search for files matching $pattern, files are matched if their filename matches the search pattern
198
+     *
199
+     * @param string $pattern the search pattern using SQL search syntax (e.g. '%searchstring%')
200
+     * @return ICacheEntry[] an array of cache entries where the name matches the search pattern
201
+     * @since 9.0.0
202
+     * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
203
+     */
204
+    public function search($pattern);
205 205
 
206
-	/**
207
-	 * search for files by mimetype
208
-	 *
209
-	 * @param string $mimetype either a full mimetype to search ('text/plain') or only the first part of a mimetype ('image')
210
-	 *        where it will search for all mimetypes in the group ('image/*')
211
-	 * @return ICacheEntry[] an array of cache entries where the mimetype matches the search
212
-	 * @since 9.0.0
213
-	 * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
214
-	 */
215
-	public function searchByMime($mimetype);
206
+    /**
207
+     * search for files by mimetype
208
+     *
209
+     * @param string $mimetype either a full mimetype to search ('text/plain') or only the first part of a mimetype ('image')
210
+     *        where it will search for all mimetypes in the group ('image/*')
211
+     * @return ICacheEntry[] an array of cache entries where the mimetype matches the search
212
+     * @since 9.0.0
213
+     * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
214
+     */
215
+    public function searchByMime($mimetype);
216 216
 
217
-	/**
218
-	 * Search for files with a flexible query
219
-	 *
220
-	 * @param ISearchQuery $query
221
-	 * @return ICacheEntry[]
222
-	 * @throw \InvalidArgumentException if the cache is unable to perform the query
223
-	 * @since 12.0.0
224
-	 */
225
-	public function searchQuery(ISearchQuery $query);
217
+    /**
218
+     * Search for files with a flexible query
219
+     *
220
+     * @param ISearchQuery $query
221
+     * @return ICacheEntry[]
222
+     * @throw \InvalidArgumentException if the cache is unable to perform the query
223
+     * @since 12.0.0
224
+     */
225
+    public function searchQuery(ISearchQuery $query);
226 226
 
227
-	/**
228
-	 * Search for files by tag of a given users.
229
-	 *
230
-	 * Note that every user can tag files differently.
231
-	 *
232
-	 * @param string|int $tag name or tag id
233
-	 * @param string $userId owner of the tags
234
-	 * @return ICacheEntry[] file data
235
-	 * @since 9.0.0
236
-	 * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
237
-	 */
238
-	public function searchByTag($tag, $userId);
227
+    /**
228
+     * Search for files by tag of a given users.
229
+     *
230
+     * Note that every user can tag files differently.
231
+     *
232
+     * @param string|int $tag name or tag id
233
+     * @param string $userId owner of the tags
234
+     * @return ICacheEntry[] file data
235
+     * @since 9.0.0
236
+     * @deprecated 9.0.0 due to lack of pagination, not all backends might implement this
237
+     */
238
+    public function searchByTag($tag, $userId);
239 239
 
240
-	/**
241
-	 * find a folder in the cache which has not been fully scanned
242
-	 *
243
-	 * If multiple incomplete folders are in the cache, the one with the highest id will be returned,
244
-	 * use the one with the highest id gives the best result with the background scanner, since that is most
245
-	 * likely the folder where we stopped scanning previously
246
-	 *
247
-	 * @return string|bool the path of the folder or false when no folder matched
248
-	 * @since 9.0.0
249
-	 */
250
-	public function getIncomplete();
240
+    /**
241
+     * find a folder in the cache which has not been fully scanned
242
+     *
243
+     * If multiple incomplete folders are in the cache, the one with the highest id will be returned,
244
+     * use the one with the highest id gives the best result with the background scanner, since that is most
245
+     * likely the folder where we stopped scanning previously
246
+     *
247
+     * @return string|bool the path of the folder or false when no folder matched
248
+     * @since 9.0.0
249
+     */
250
+    public function getIncomplete();
251 251
 
252
-	/**
253
-	 * get the path of a file on this storage by it's file id
254
-	 *
255
-	 * @param int $id the file id of the file or folder to search
256
-	 * @return string|null the path of the file (relative to the storage) or null if a file with the given id does not exists within this cache
257
-	 * @since 9.0.0
258
-	 */
259
-	public function getPathById($id);
252
+    /**
253
+     * get the path of a file on this storage by it's file id
254
+     *
255
+     * @param int $id the file id of the file or folder to search
256
+     * @return string|null the path of the file (relative to the storage) or null if a file with the given id does not exists within this cache
257
+     * @since 9.0.0
258
+     */
259
+    public function getPathById($id);
260 260
 
261
-	/**
262
-	 * normalize the given path for usage in the cache
263
-	 *
264
-	 * @param string $path
265
-	 * @return string
266
-	 * @since 9.0.0
267
-	 */
268
-	public function normalize($path);
261
+    /**
262
+     * normalize the given path for usage in the cache
263
+     *
264
+     * @param string $path
265
+     * @return string
266
+     * @since 9.0.0
267
+     */
268
+    public function normalize($path);
269 269
 }
Please login to merge, or discard this patch.
lib/private/Files/Search/SearchComparison.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -24,44 +24,44 @@
 block discarded – undo
24 24
 use OCP\Files\Search\ISearchComparison;
25 25
 
26 26
 class SearchComparison implements ISearchComparison {
27
-	/** @var string */
28
-	private $type;
29
-	/** @var string */
30
-	private $field;
31
-	/** @var string|integer|\DateTime */
32
-	private $value;
27
+    /** @var string */
28
+    private $type;
29
+    /** @var string */
30
+    private $field;
31
+    /** @var string|integer|\DateTime */
32
+    private $value;
33 33
 
34
-	/**
35
-	 * SearchComparison constructor.
36
-	 *
37
-	 * @param string $type
38
-	 * @param string $field
39
-	 * @param \DateTime|int|string $value
40
-	 */
41
-	public function __construct($type, $field, $value) {
42
-		$this->type = $type;
43
-		$this->field = $field;
44
-		$this->value = $value;
45
-	}
34
+    /**
35
+     * SearchComparison constructor.
36
+     *
37
+     * @param string $type
38
+     * @param string $field
39
+     * @param \DateTime|int|string $value
40
+     */
41
+    public function __construct($type, $field, $value) {
42
+        $this->type = $type;
43
+        $this->field = $field;
44
+        $this->value = $value;
45
+    }
46 46
 
47
-	/**
48
-	 * @return string
49
-	 */
50
-	public function getType() {
51
-		return $this->type;
52
-	}
47
+    /**
48
+     * @return string
49
+     */
50
+    public function getType() {
51
+        return $this->type;
52
+    }
53 53
 
54
-	/**
55
-	 * @return string
56
-	 */
57
-	public function getField() {
58
-		return $this->field;
59
-	}
54
+    /**
55
+     * @return string
56
+     */
57
+    public function getField() {
58
+        return $this->field;
59
+    }
60 60
 
61
-	/**
62
-	 * @return \DateTime|int|string
63
-	 */
64
-	public function getValue() {
65
-		return $this->value;
66
-	}
61
+    /**
62
+     * @return \DateTime|int|string
63
+     */
64
+    public function getValue() {
65
+        return $this->value;
66
+    }
67 67
 }
Please login to merge, or discard this patch.
lib/private/Files/Search/SearchOrder.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -25,33 +25,33 @@
 block discarded – undo
25 25
 use OCP\Files\Search\ISearchOrder;
26 26
 
27 27
 class SearchOrder implements ISearchOrder {
28
-	/** @var  string */
29
-	private $direction;
30
-	/** @var  string */
31
-	private $field;
28
+    /** @var  string */
29
+    private $direction;
30
+    /** @var  string */
31
+    private $field;
32 32
 
33
-	/**
34
-	 * SearchOrder constructor.
35
-	 *
36
-	 * @param string $direction
37
-	 * @param string $field
38
-	 */
39
-	public function __construct($direction, $field) {
40
-		$this->direction = $direction;
41
-		$this->field = $field;
42
-	}
33
+    /**
34
+     * SearchOrder constructor.
35
+     *
36
+     * @param string $direction
37
+     * @param string $field
38
+     */
39
+    public function __construct($direction, $field) {
40
+        $this->direction = $direction;
41
+        $this->field = $field;
42
+    }
43 43
 
44
-	/**
45
-	 * @return string
46
-	 */
47
-	public function getDirection() {
48
-		return $this->direction;
49
-	}
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getDirection() {
48
+        return $this->direction;
49
+    }
50 50
 
51
-	/**
52
-	 * @return string
53
-	 */
54
-	public function getField() {
55
-		return $this->field;
56
-	}
51
+    /**
52
+     * @return string
53
+     */
54
+    public function getField() {
55
+        return $this->field;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
lib/private/Files/Search/SearchBinaryOperator.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -25,33 +25,33 @@
 block discarded – undo
25 25
 use OCP\Files\Search\ISearchOperator;
26 26
 
27 27
 class SearchBinaryOperator implements ISearchBinaryOperator {
28
-	/** @var string */
29
-	private $type;
30
-	/** @var ISearchOperator[] */
31
-	private $arguments;
28
+    /** @var string */
29
+    private $type;
30
+    /** @var ISearchOperator[] */
31
+    private $arguments;
32 32
 
33
-	/**
34
-	 * SearchBinaryOperator constructor.
35
-	 *
36
-	 * @param string $type
37
-	 * @param ISearchOperator[] $arguments
38
-	 */
39
-	public function __construct($type, array $arguments) {
40
-		$this->type = $type;
41
-		$this->arguments = $arguments;
42
-	}
33
+    /**
34
+     * SearchBinaryOperator constructor.
35
+     *
36
+     * @param string $type
37
+     * @param ISearchOperator[] $arguments
38
+     */
39
+    public function __construct($type, array $arguments) {
40
+        $this->type = $type;
41
+        $this->arguments = $arguments;
42
+    }
43 43
 
44
-	/**
45
-	 * @return string
46
-	 */
47
-	public function getType() {
48
-		return $this->type;
49
-	}
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getType() {
48
+        return $this->type;
49
+    }
50 50
 
51
-	/**
52
-	 * @return ISearchOperator[]
53
-	 */
54
-	public function getArguments() {
55
-		return $this->arguments;
56
-	}
51
+    /**
52
+     * @return ISearchOperator[]
53
+     */
54
+    public function getArguments() {
55
+        return $this->arguments;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
lib/private/Lockdown/Filesystem/NullCache.php 1 patch
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -27,101 +27,101 @@
 block discarded – undo
27 27
 use OCP\Files\Search\ISearchQuery;
28 28
 
29 29
 class NullCache implements ICache {
30
-	public function getNumericStorageId() {
31
-		return -1;
32
-	}
33
-
34
-	public function get($file) {
35
-		return $file !== '' ? null :
36
-			new CacheEntry([
37
-				'fileid' => -1,
38
-				'parent' => -1,
39
-				'name' => '',
40
-				'path' => '',
41
-				'size' => '0',
42
-				'mtime' => time(),
43
-				'storage_mtime' => time(),
44
-				'etag' => '',
45
-				'mimetype' => FileInfo::MIMETYPE_FOLDER,
46
-				'mimepart' => 'httpd',
47
-				'permissions' => Constants::PERMISSION_READ
48
-			]);
49
-	}
50
-
51
-	public function getFolderContents($folder) {
52
-		return [];
53
-	}
54
-
55
-	public function getFolderContentsById($fileId) {
56
-		return [];
57
-	}
58
-
59
-	public function put($file, array $data) {
60
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
61
-	}
62
-
63
-	public function insert($file, array $data) {
64
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
65
-	}
66
-
67
-	public function update($id, array $data) {
68
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
69
-	}
70
-
71
-	public function getId($file) {
72
-		return -1;
73
-	}
74
-
75
-	public function getParentId($file) {
76
-		return -1;
77
-	}
78
-
79
-	public function inCache($file) {
80
-		return $file === '';
81
-	}
82
-
83
-	public function remove($file) {
84
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
85
-	}
86
-
87
-	public function move($source, $target) {
88
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
89
-	}
90
-
91
-	public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
92
-		throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
93
-	}
94
-
95
-	public function getStatus($file) {
96
-		return ICache::COMPLETE;
97
-	}
98
-
99
-	public function search($pattern) {
100
-		return [];
101
-	}
102
-
103
-	public function searchByMime($mimetype) {
104
-		return [];
105
-	}
106
-
107
-	public function searchQuery(ISearchQuery $query) {
108
-		return [];
109
-	}
110
-
111
-	public function searchByTag($tag, $userId) {
112
-		return [];
113
-	}
114
-
115
-	public function getIncomplete() {
116
-		return [];
117
-	}
118
-
119
-	public function getPathById($id) {
120
-		return '';
121
-	}
122
-
123
-	public function normalize($path) {
124
-		return $path;
125
-	}
30
+    public function getNumericStorageId() {
31
+        return -1;
32
+    }
33
+
34
+    public function get($file) {
35
+        return $file !== '' ? null :
36
+            new CacheEntry([
37
+                'fileid' => -1,
38
+                'parent' => -1,
39
+                'name' => '',
40
+                'path' => '',
41
+                'size' => '0',
42
+                'mtime' => time(),
43
+                'storage_mtime' => time(),
44
+                'etag' => '',
45
+                'mimetype' => FileInfo::MIMETYPE_FOLDER,
46
+                'mimepart' => 'httpd',
47
+                'permissions' => Constants::PERMISSION_READ
48
+            ]);
49
+    }
50
+
51
+    public function getFolderContents($folder) {
52
+        return [];
53
+    }
54
+
55
+    public function getFolderContentsById($fileId) {
56
+        return [];
57
+    }
58
+
59
+    public function put($file, array $data) {
60
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
61
+    }
62
+
63
+    public function insert($file, array $data) {
64
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
65
+    }
66
+
67
+    public function update($id, array $data) {
68
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
69
+    }
70
+
71
+    public function getId($file) {
72
+        return -1;
73
+    }
74
+
75
+    public function getParentId($file) {
76
+        return -1;
77
+    }
78
+
79
+    public function inCache($file) {
80
+        return $file === '';
81
+    }
82
+
83
+    public function remove($file) {
84
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
85
+    }
86
+
87
+    public function move($source, $target) {
88
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
89
+    }
90
+
91
+    public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
92
+        throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
93
+    }
94
+
95
+    public function getStatus($file) {
96
+        return ICache::COMPLETE;
97
+    }
98
+
99
+    public function search($pattern) {
100
+        return [];
101
+    }
102
+
103
+    public function searchByMime($mimetype) {
104
+        return [];
105
+    }
106
+
107
+    public function searchQuery(ISearchQuery $query) {
108
+        return [];
109
+    }
110
+
111
+    public function searchByTag($tag, $userId) {
112
+        return [];
113
+    }
114
+
115
+    public function getIncomplete() {
116
+        return [];
117
+    }
118
+
119
+    public function getPathById($id) {
120
+        return '';
121
+    }
122
+
123
+    public function normalize($path) {
124
+        return $path;
125
+    }
126 126
 
127 127
 }
Please login to merge, or discard this patch.
apps/user_ldap/templates/renewpassword.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 		<div class="warning title">
19 19
 			<?php p($l->t('Please renew your password.')); ?><br>
20 20
 		</div>
21
-		<?php foreach($_['messages'] as $message): ?>
21
+		<?php foreach ($_['messages'] as $message): ?>
22 22
 			<div class="warning">
23 23
 				<?php p($message); ?><br>
24 24
 			</div>
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 		<?php endif; ?>
32 32
 		<div id="message" class="hidden">
33 33
 			<img class="float-spinner" alt=""
34
-				src="<?php p(image_path('core', 'loading-dark.gif'));?>">
34
+				src="<?php p(image_path('core', 'loading-dark.gif')); ?>">
35 35
 			<span id="messageText"></span>
36 36
 			<!-- the following div ensures that the spinner is always inside the #message div -->
37 37
 			<div style="clear: both;"></div>
38 38
 		</div>
39 39
 		<p class="grouptop">
40 40
 			<input type="password" id="oldPassword" name="oldPassword"
41
-				placeholder="<?php echo $l->t('Current password');?>"
41
+				placeholder="<?php echo $l->t('Current password'); ?>"
42 42
 				autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/>
43 43
 			<label for="oldPassword" class="infield"><?php p($l->t('Current password')); ?></label>
44 44
 		</p>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			<input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label>
48 48
 			<label id="newPassword-label" for="newPassword" class="infield"><?php p($l->t('New password')); ?></label>
49 49
 			<input type="password" id="newPassword" name="newPassword"
50
-				placeholder="<?php echo $l->t('New password');?>"
50
+				placeholder="<?php echo $l->t('New password'); ?>"
51 51
 				data-typetoggle="#personal-show" autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/>
52 52
 		</p>
53 53
 		
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php /** @var $l OC_L10N */ ?>
2 2
 <?php
3 3
 script('user_ldap', [
4
-	'renewPassword',
4
+    'renewPassword',
5 5
 ]);
6 6
 style('user_ldap', 'renewPassword');
7 7
 ?>
Please login to merge, or discard this patch.
lib/private/Repair/RepairInvalidShares.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
 		$updatedEntries = $builder->execute();
73 73
 		if ($updatedEntries > 0) {
74
-			$out->info('Fixed file share permissions for ' . $updatedEntries . ' shares');
74
+			$out->info('Fixed file share permissions for '.$updatedEntries.' shares');
75 75
 		}
76 76
 	}
77 77
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		}
108 108
 
109 109
 		if ($deletedEntries) {
110
-			$out->info('Removed ' . $deletedEntries . ' shares where the parent did not exist');
110
+			$out->info('Removed '.$deletedEntries.' shares where the parent did not exist');
111 111
 		}
112 112
 	}
113 113
 
Please login to merge, or discard this patch.
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -33,90 +33,90 @@
 block discarded – undo
33 33
  */
34 34
 class RepairInvalidShares implements IRepairStep {
35 35
 
36
-	const CHUNK_SIZE = 200;
37
-
38
-	/** @var \OCP\IConfig */
39
-	protected $config;
40
-
41
-	/** @var \OCP\IDBConnection */
42
-	protected $connection;
43
-
44
-	/**
45
-	 * @param \OCP\IConfig $config
46
-	 * @param \OCP\IDBConnection $connection
47
-	 */
48
-	public function __construct($config, $connection) {
49
-		$this->connection = $connection;
50
-		$this->config = $config;
51
-	}
52
-
53
-	public function getName() {
54
-		return 'Repair invalid shares';
55
-	}
56
-
57
-	/**
58
-	 * Adjust file share permissions
59
-	 * @suppress SqlInjectionChecker
60
-	 */
61
-	private function adjustFileSharePermissions(IOutput $out) {
62
-		$mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;
63
-		$builder = $this->connection->getQueryBuilder();
64
-
65
-		$permsFunc = $builder->expr()->bitwiseAnd('permissions', $mask);
66
-		$builder
67
-			->update('share')
68
-			->set('permissions', $permsFunc)
69
-			->where($builder->expr()->eq('item_type', $builder->expr()->literal('file')))
70
-			->andWhere($builder->expr()->neq('permissions', $permsFunc));
71
-
72
-		$updatedEntries = $builder->execute();
73
-		if ($updatedEntries > 0) {
74
-			$out->info('Fixed file share permissions for ' . $updatedEntries . ' shares');
75
-		}
76
-	}
77
-
78
-	/**
79
-	 * Remove shares where the parent share does not exist anymore
80
-	 */
81
-	private function removeSharesNonExistingParent(IOutput $out) {
82
-		$deletedEntries = 0;
83
-
84
-		$query = $this->connection->getQueryBuilder();
85
-		$query->select('s1.parent')
86
-			->from('share', 's1')
87
-			->where($query->expr()->isNotNull('s1.parent'))
88
-				->andWhere($query->expr()->isNull('s2.id'))
89
-			->leftJoin('s1', 'share', 's2', $query->expr()->eq('s1.parent', 's2.id'))
90
-			->groupBy('s1.parent')
91
-			->setMaxResults(self::CHUNK_SIZE);
92
-
93
-		$deleteQuery = $this->connection->getQueryBuilder();
94
-		$deleteQuery->delete('share')
95
-			->where($deleteQuery->expr()->eq('parent', $deleteQuery->createParameter('parent')));
96
-
97
-		$deletedInLastChunk = self::CHUNK_SIZE;
98
-		while ($deletedInLastChunk === self::CHUNK_SIZE) {
99
-			$deletedInLastChunk = 0;
100
-			$result = $query->execute();
101
-			while ($row = $result->fetch()) {
102
-				$deletedInLastChunk++;
103
-				$deletedEntries += $deleteQuery->setParameter('parent', (int) $row['parent'])
104
-					->execute();
105
-			}
106
-			$result->closeCursor();
107
-		}
108
-
109
-		if ($deletedEntries) {
110
-			$out->info('Removed ' . $deletedEntries . ' shares where the parent did not exist');
111
-		}
112
-	}
113
-
114
-	public function run(IOutput $out) {
115
-		$ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
116
-		if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.11', '<')) {
117
-			$this->adjustFileSharePermissions($out);
118
-		}
119
-
120
-		$this->removeSharesNonExistingParent($out);
121
-	}
36
+    const CHUNK_SIZE = 200;
37
+
38
+    /** @var \OCP\IConfig */
39
+    protected $config;
40
+
41
+    /** @var \OCP\IDBConnection */
42
+    protected $connection;
43
+
44
+    /**
45
+     * @param \OCP\IConfig $config
46
+     * @param \OCP\IDBConnection $connection
47
+     */
48
+    public function __construct($config, $connection) {
49
+        $this->connection = $connection;
50
+        $this->config = $config;
51
+    }
52
+
53
+    public function getName() {
54
+        return 'Repair invalid shares';
55
+    }
56
+
57
+    /**
58
+     * Adjust file share permissions
59
+     * @suppress SqlInjectionChecker
60
+     */
61
+    private function adjustFileSharePermissions(IOutput $out) {
62
+        $mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;
63
+        $builder = $this->connection->getQueryBuilder();
64
+
65
+        $permsFunc = $builder->expr()->bitwiseAnd('permissions', $mask);
66
+        $builder
67
+            ->update('share')
68
+            ->set('permissions', $permsFunc)
69
+            ->where($builder->expr()->eq('item_type', $builder->expr()->literal('file')))
70
+            ->andWhere($builder->expr()->neq('permissions', $permsFunc));
71
+
72
+        $updatedEntries = $builder->execute();
73
+        if ($updatedEntries > 0) {
74
+            $out->info('Fixed file share permissions for ' . $updatedEntries . ' shares');
75
+        }
76
+    }
77
+
78
+    /**
79
+     * Remove shares where the parent share does not exist anymore
80
+     */
81
+    private function removeSharesNonExistingParent(IOutput $out) {
82
+        $deletedEntries = 0;
83
+
84
+        $query = $this->connection->getQueryBuilder();
85
+        $query->select('s1.parent')
86
+            ->from('share', 's1')
87
+            ->where($query->expr()->isNotNull('s1.parent'))
88
+                ->andWhere($query->expr()->isNull('s2.id'))
89
+            ->leftJoin('s1', 'share', 's2', $query->expr()->eq('s1.parent', 's2.id'))
90
+            ->groupBy('s1.parent')
91
+            ->setMaxResults(self::CHUNK_SIZE);
92
+
93
+        $deleteQuery = $this->connection->getQueryBuilder();
94
+        $deleteQuery->delete('share')
95
+            ->where($deleteQuery->expr()->eq('parent', $deleteQuery->createParameter('parent')));
96
+
97
+        $deletedInLastChunk = self::CHUNK_SIZE;
98
+        while ($deletedInLastChunk === self::CHUNK_SIZE) {
99
+            $deletedInLastChunk = 0;
100
+            $result = $query->execute();
101
+            while ($row = $result->fetch()) {
102
+                $deletedInLastChunk++;
103
+                $deletedEntries += $deleteQuery->setParameter('parent', (int) $row['parent'])
104
+                    ->execute();
105
+            }
106
+            $result->closeCursor();
107
+        }
108
+
109
+        if ($deletedEntries) {
110
+            $out->info('Removed ' . $deletedEntries . ' shares where the parent did not exist');
111
+        }
112
+    }
113
+
114
+    public function run(IOutput $out) {
115
+        $ocVersionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
116
+        if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.11', '<')) {
117
+            $this->adjustFileSharePermissions($out);
118
+        }
119
+
120
+        $this->removeSharesNonExistingParent($out);
121
+    }
122 122
 }
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.