@@ -343,8 +343,9 @@ |
||
343 | 343 | $files = []; |
344 | 344 | $physicalDir = $this->getSourcePath($dir); |
345 | 345 | foreach (scandir($physicalDir) as $item) { |
346 | - if (\OC\Files\Filesystem::isIgnoredDir($item)) |
|
347 | - continue; |
|
346 | + if (\OC\Files\Filesystem::isIgnoredDir($item)) { |
|
347 | + continue; |
|
348 | + } |
|
348 | 349 | $physicalItem = $physicalDir . '/' . $item; |
349 | 350 | |
350 | 351 | if (strstr(strtolower($item), strtolower($query)) !== false) { |
@@ -116,8 +116,7 @@ discard block |
||
116 | 116 | public function append( $key, $value ) { |
117 | 117 | if( array_key_exists( $key, $this->vars )) { |
118 | 118 | $this->vars[$key][] = $value; |
119 | - } |
|
120 | - else{ |
|
119 | + } else{ |
|
121 | 120 | $this->vars[$key] = [ $value ]; |
122 | 121 | } |
123 | 122 | } |
@@ -132,8 +131,7 @@ discard block |
||
132 | 131 | $data = $this->fetchPage(); |
133 | 132 | if( $data === false ) { |
134 | 133 | return false; |
135 | - } |
|
136 | - else{ |
|
134 | + } else{ |
|
137 | 135 | print $data; |
138 | 136 | return true; |
139 | 137 | } |
@@ -133,10 +133,10 @@ |
||
133 | 133 | if ($signalClass) { |
134 | 134 | if ($signalName) { |
135 | 135 | self::$registered[$signalClass][$signalName]=[]; |
136 | - }else{ |
|
136 | + } else{ |
|
137 | 137 | self::$registered[$signalClass]=[]; |
138 | 138 | } |
139 | - }else{ |
|
139 | + } else{ |
|
140 | 140 | self::$registered=[]; |
141 | 141 | } |
142 | 142 | } |
@@ -89,13 +89,11 @@ discard block |
||
89 | 89 | if (count($rangeArray) > 1) { |
90 | 90 | $type = 'multipart/byteranges; boundary='.self::getBoundary(); |
91 | 91 | // no Content-Length header here |
92 | - } |
|
93 | - else { |
|
92 | + } else { |
|
94 | 93 | header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true); |
95 | 94 | OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1); |
96 | 95 | } |
97 | - } |
|
98 | - else { |
|
96 | + } else { |
|
99 | 97 | OC_Response::setContentLengthHeader($fileSize); |
100 | 98 | } |
101 | 99 | } |
@@ -263,13 +261,11 @@ discard block |
||
263 | 261 | if ($minOffset >= $fileSize) { |
264 | 262 | break; |
265 | 263 | } |
266 | - } |
|
267 | - elseif (is_numeric($ranges[0]) && $ranges[0] < $fileSize) { |
|
264 | + } elseif (is_numeric($ranges[0]) && $ranges[0] < $fileSize) { |
|
268 | 265 | // case: x- |
269 | 266 | $rangeArray[$ind++] = [ 'from' => $ranges[0], 'to' => $fileSize-1, 'size' => $fileSize ]; |
270 | 267 | break; |
271 | - } |
|
272 | - elseif (is_numeric($ranges[1])) { |
|
268 | + } elseif (is_numeric($ranges[1])) { |
|
273 | 269 | // case: -x |
274 | 270 | if ($ranges[1] > $fileSize) { |
275 | 271 | $ranges[1] = $fileSize; |
@@ -331,8 +327,7 @@ discard block |
||
331 | 327 | try { |
332 | 328 | if (count($rangeArray) == 1) { |
333 | 329 | $view->readfilePart($filename, $rangeArray[0]['from'], $rangeArray[0]['to']); |
334 | - } |
|
335 | - else { |
|
330 | + } else { |
|
336 | 331 | // check if file is seekable (if not throw UnseekableException) |
337 | 332 | // we have to check it before body contents |
338 | 333 | $view->readfilePart($filename, $rangeArray[0]['size'], $rangeArray[0]['size']); |
@@ -355,8 +350,7 @@ discard block |
||
355 | 350 | self::sendHeaders($filename, $name, []); |
356 | 351 | $view->readfile($filename); |
357 | 352 | } |
358 | - } |
|
359 | - else { |
|
353 | + } else { |
|
360 | 354 | $view->readfile($filename); |
361 | 355 | } |
362 | 356 | } |
@@ -14,10 +14,13 @@ |
||
14 | 14 | ?> |
15 | 15 | <?php if (isset($_['content'])): ?> |
16 | 16 | <?php print_unescaped($_['content']) ?> |
17 | -<?php else: ?> |
|
17 | +<?php else { |
|
18 | + : ?> |
|
18 | 19 | <div class="body-login-container update"> |
19 | 20 | <div class="icon-big icon-search icon-white"></div> |
20 | - <h2><?php p($l->t('File not found')); ?></h2> |
|
21 | + <h2><?php p($l->t('File not found')); |
|
22 | +} |
|
23 | +?></h2> |
|
21 | 24 | <p class="infogroup"><?php p($l->t('The document could not be found on the server. Maybe the share was deleted or has expired?')); ?></p> |
22 | 25 | <p><a class="button primary" href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>"> |
23 | 26 | <?php p($l->t('Back to %s', [$theme->getName()])); ?> |