@@ -25,28 +25,28 @@ |
||
25 | 25 | use OCP\IDBConnection; |
26 | 26 | |
27 | 27 | class HomePropagator extends Propagator { |
28 | - private $ignoredBaseFolders; |
|
28 | + private $ignoredBaseFolders; |
|
29 | 29 | |
30 | - /** |
|
31 | - * @param \OC\Files\Storage\Storage $storage |
|
32 | - */ |
|
33 | - public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $connection) { |
|
34 | - parent::__construct($storage, $connection); |
|
35 | - $this->ignoredBaseFolders = ['files_encryption']; |
|
36 | - } |
|
30 | + /** |
|
31 | + * @param \OC\Files\Storage\Storage $storage |
|
32 | + */ |
|
33 | + public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $connection) { |
|
34 | + parent::__construct($storage, $connection); |
|
35 | + $this->ignoredBaseFolders = ['files_encryption']; |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - /** |
|
40 | - * @param string $internalPath |
|
41 | - * @param int $time |
|
42 | - * @param int $sizeDifference number of bytes the file has grown |
|
43 | - */ |
|
44 | - public function propagateChange($internalPath, $time, $sizeDifference = 0) { |
|
45 | - list($baseFolder) = explode('/', $internalPath, 2); |
|
46 | - if (in_array($baseFolder, $this->ignoredBaseFolders)) { |
|
47 | - return []; |
|
48 | - } else { |
|
49 | - parent::propagateChange($internalPath, $time, $sizeDifference); |
|
50 | - } |
|
51 | - } |
|
39 | + /** |
|
40 | + * @param string $internalPath |
|
41 | + * @param int $time |
|
42 | + * @param int $sizeDifference number of bytes the file has grown |
|
43 | + */ |
|
44 | + public function propagateChange($internalPath, $time, $sizeDifference = 0) { |
|
45 | + list($baseFolder) = explode('/', $internalPath, 2); |
|
46 | + if (in_array($baseFolder, $this->ignoredBaseFolders)) { |
|
47 | + return []; |
|
48 | + } else { |
|
49 | + parent::propagateChange($internalPath, $time, $sizeDifference); |
|
50 | + } |
|
51 | + } |
|
52 | 52 | } |
@@ -29,13 +29,13 @@ |
||
29 | 29 | */ |
30 | 30 | class Image extends File { |
31 | 31 | |
32 | - /** |
|
33 | - * Type name; translated in templates |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public $type = 'image'; |
|
32 | + /** |
|
33 | + * Type name; translated in templates |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public $type = 'image'; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @TODO add EXIF information |
|
40 | - */ |
|
38 | + /** |
|
39 | + * @TODO add EXIF information |
|
40 | + */ |
|
41 | 41 | } |
@@ -29,13 +29,13 @@ |
||
29 | 29 | */ |
30 | 30 | class Audio extends File { |
31 | 31 | |
32 | - /** |
|
33 | - * Type name; translated in templates |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public $type = 'audio'; |
|
32 | + /** |
|
33 | + * Type name; translated in templates |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public $type = 'audio'; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @TODO add ID3 information |
|
40 | - */ |
|
38 | + /** |
|
39 | + * @TODO add ID3 information |
|
40 | + */ |
|
41 | 41 | } |
@@ -29,10 +29,10 @@ |
||
29 | 29 | */ |
30 | 30 | class Folder extends File { |
31 | 31 | |
32 | - /** |
|
33 | - * Type name; translated in templates |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - public $type = 'folder'; |
|
32 | + /** |
|
33 | + * Type name; translated in templates |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + public $type = 'folder'; |
|
37 | 37 | |
38 | 38 | } |
@@ -30,70 +30,70 @@ |
||
30 | 30 | * Very thin wrapper class to make output testable |
31 | 31 | */ |
32 | 32 | class Output implements IOutput { |
33 | - /** @var string */ |
|
34 | - private $webRoot; |
|
33 | + /** @var string */ |
|
34 | + private $webRoot; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @param $webRoot |
|
38 | - */ |
|
39 | - public function __construct($webRoot) { |
|
40 | - $this->webRoot = $webRoot; |
|
41 | - } |
|
36 | + /** |
|
37 | + * @param $webRoot |
|
38 | + */ |
|
39 | + public function __construct($webRoot) { |
|
40 | + $this->webRoot = $webRoot; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param string $out |
|
45 | - */ |
|
46 | - public function setOutput($out) { |
|
47 | - print($out); |
|
48 | - } |
|
43 | + /** |
|
44 | + * @param string $out |
|
45 | + */ |
|
46 | + public function setOutput($out) { |
|
47 | + print($out); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @param string|resource $path or file handle |
|
52 | - * |
|
53 | - * @return bool false if an error occurred |
|
54 | - */ |
|
55 | - public function setReadfile($path) { |
|
56 | - if (is_resource($path)) { |
|
57 | - $output = fopen('php://output', 'w'); |
|
58 | - return stream_copy_to_stream($path, $output) > 0; |
|
59 | - } else { |
|
60 | - return @readfile($path); |
|
61 | - } |
|
62 | - } |
|
50 | + /** |
|
51 | + * @param string|resource $path or file handle |
|
52 | + * |
|
53 | + * @return bool false if an error occurred |
|
54 | + */ |
|
55 | + public function setReadfile($path) { |
|
56 | + if (is_resource($path)) { |
|
57 | + $output = fopen('php://output', 'w'); |
|
58 | + return stream_copy_to_stream($path, $output) > 0; |
|
59 | + } else { |
|
60 | + return @readfile($path); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @param string $header |
|
66 | - */ |
|
67 | - public function setHeader($header) { |
|
68 | - header($header); |
|
69 | - } |
|
64 | + /** |
|
65 | + * @param string $header |
|
66 | + */ |
|
67 | + public function setHeader($header) { |
|
68 | + header($header); |
|
69 | + } |
|
70 | 70 | |
71 | - /** |
|
72 | - * @param int $code sets the http status code |
|
73 | - */ |
|
74 | - public function setHttpResponseCode($code) { |
|
75 | - http_response_code($code); |
|
76 | - } |
|
71 | + /** |
|
72 | + * @param int $code sets the http status code |
|
73 | + */ |
|
74 | + public function setHttpResponseCode($code) { |
|
75 | + http_response_code($code); |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @return int returns the current http response code |
|
80 | - */ |
|
81 | - public function getHttpResponseCode() { |
|
82 | - return http_response_code(); |
|
83 | - } |
|
78 | + /** |
|
79 | + * @return int returns the current http response code |
|
80 | + */ |
|
81 | + public function getHttpResponseCode() { |
|
82 | + return http_response_code(); |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * @param string $name |
|
87 | - * @param string $value |
|
88 | - * @param int $expire |
|
89 | - * @param string $path |
|
90 | - * @param string $domain |
|
91 | - * @param bool $secure |
|
92 | - * @param bool $httpOnly |
|
93 | - */ |
|
94 | - public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly) { |
|
95 | - $path = $this->webRoot ? : '/'; |
|
96 | - setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly); |
|
97 | - } |
|
85 | + /** |
|
86 | + * @param string $name |
|
87 | + * @param string $value |
|
88 | + * @param int $expire |
|
89 | + * @param string $path |
|
90 | + * @param string $domain |
|
91 | + * @param bool $secure |
|
92 | + * @param bool $httpOnly |
|
93 | + */ |
|
94 | + public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly) { |
|
95 | + $path = $this->webRoot ? : '/'; |
|
96 | + setcookie($name, $value, $expire, $path, $domain, $secure, $httpOnly); |
|
97 | + } |
|
98 | 98 | |
99 | 99 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * @package OC\AppFramework\Middleware\Security\Exceptions |
32 | 32 | */ |
33 | 33 | class NotConfirmedException extends SecurityException { |
34 | - public function __construct() { |
|
35 | - parent::__construct('Password confirmation is required', Http::STATUS_FORBIDDEN); |
|
36 | - } |
|
34 | + public function __construct() { |
|
35 | + parent::__construct('Password confirmation is required', Http::STATUS_FORBIDDEN); |
|
36 | + } |
|
37 | 37 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @package OC\AppFramework\Middleware\Security\Exceptions |
35 | 35 | */ |
36 | 36 | class CrossSiteRequestForgeryException extends SecurityException { |
37 | - public function __construct() { |
|
38 | - parent::__construct('CSRF check failed', Http::STATUS_PRECONDITION_FAILED); |
|
39 | - } |
|
37 | + public function __construct() { |
|
38 | + parent::__construct('CSRF check failed', Http::STATUS_PRECONDITION_FAILED); |
|
39 | + } |
|
40 | 40 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @package OC\AppFramework\Middleware\Security\Exceptions |
35 | 35 | */ |
36 | 36 | class AppNotEnabledException extends SecurityException { |
37 | - public function __construct() { |
|
38 | - parent::__construct('App is not enabled', Http::STATUS_PRECONDITION_FAILED); |
|
39 | - } |
|
37 | + public function __construct() { |
|
38 | + parent::__construct('App is not enabled', Http::STATUS_PRECONDITION_FAILED); |
|
39 | + } |
|
40 | 40 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @package OC\AppFramework\Middleware\Security\Exceptions |
35 | 35 | */ |
36 | 36 | class NotLoggedInException extends SecurityException { |
37 | - public function __construct() { |
|
38 | - parent::__construct('Current user is not logged in', Http::STATUS_UNAUTHORIZED); |
|
39 | - } |
|
37 | + public function __construct() { |
|
38 | + parent::__construct('Current user is not logged in', Http::STATUS_UNAUTHORIZED); |
|
39 | + } |
|
40 | 40 | } |