@@ -30,12 +30,12 @@ |
||
30 | 30 | */ |
31 | 31 | interface IReporter { |
32 | 32 | |
33 | - /** |
|
34 | - * Report an (unhandled) exception |
|
35 | - * |
|
36 | - * @since 13.0.0 |
|
37 | - * @param Exception|Throwable $exception |
|
38 | - * @param array $context |
|
39 | - */ |
|
40 | - public function report($exception, array $context = []); |
|
33 | + /** |
|
34 | + * Report an (unhandled) exception |
|
35 | + * |
|
36 | + * @since 13.0.0 |
|
37 | + * @param Exception|Throwable $exception |
|
38 | + * @param array $context |
|
39 | + */ |
|
40 | + public function report($exception, array $context = []); |
|
41 | 41 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $res['group'] = []; |
88 | 88 | $res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; |
89 | 89 | $res['group']['expire_date']['enabled'] = true; |
90 | - $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL); |
|
90 | + $res['default_permissions'] = (int) $this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | //Federated sharing |
@@ -35,91 +35,91 @@ |
||
35 | 35 | */ |
36 | 36 | class Capabilities implements ICapability { |
37 | 37 | |
38 | - /** @var IConfig */ |
|
39 | - private $config; |
|
40 | - |
|
41 | - public function __construct(IConfig $config) { |
|
42 | - $this->config = $config; |
|
43 | - } |
|
44 | - |
|
45 | - /** |
|
46 | - * Return this classes capabilities |
|
47 | - * |
|
48 | - * @return array |
|
49 | - */ |
|
50 | - public function getCapabilities() { |
|
51 | - $res = []; |
|
52 | - |
|
53 | - if ($this->config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') { |
|
54 | - $res['api_enabled'] = false; |
|
55 | - $res['public'] = ['enabled' => false]; |
|
56 | - $res['user'] = ['send_mail' => false]; |
|
57 | - $res['resharing'] = false; |
|
58 | - } else { |
|
59 | - $res['api_enabled'] = true; |
|
60 | - |
|
61 | - $public = []; |
|
62 | - $public['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes'; |
|
63 | - if ($public['enabled']) { |
|
64 | - $public['password'] = []; |
|
65 | - $public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes'); |
|
66 | - |
|
67 | - if ($public['password']['enforced']) { |
|
68 | - $public['password']['askForOptionalPassword'] = false; |
|
69 | - } else { |
|
70 | - $public['password']['askForOptionalPassword'] = ($this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no') === 'yes'); |
|
71 | - } |
|
72 | - |
|
73 | - $public['expire_date'] = []; |
|
74 | - $public['multiple_links'] = true; |
|
75 | - $public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |
|
76 | - if ($public['expire_date']['enabled']) { |
|
77 | - $public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
78 | - $public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes'; |
|
79 | - } |
|
80 | - |
|
81 | - $public['expire_date_internal'] = []; |
|
82 | - $public['expire_date_internal']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no') === 'yes'; |
|
83 | - if ($public['expire_date_internal']['enabled']) { |
|
84 | - $public['expire_date_internal']['days'] = $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'); |
|
85 | - $public['expire_date_internal']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; |
|
86 | - } |
|
87 | - |
|
88 | - $public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes'; |
|
89 | - $public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes'; |
|
90 | - $public['upload_files_drop'] = $public['upload']; |
|
91 | - } |
|
92 | - $res['public'] = $public; |
|
93 | - |
|
94 | - $res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes'; |
|
95 | - |
|
96 | - $res['user']['send_mail'] = false; |
|
97 | - $res['user']['expire_date']['enabled'] = true; |
|
98 | - |
|
99 | - // deprecated in favour of 'group', but we need to keep it for now |
|
100 | - // in order to stay compatible with older clients |
|
101 | - $res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; |
|
102 | - |
|
103 | - $res['group'] = []; |
|
104 | - $res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; |
|
105 | - $res['group']['expire_date']['enabled'] = true; |
|
106 | - $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL); |
|
107 | - } |
|
108 | - |
|
109 | - //Federated sharing |
|
110 | - $res['federation'] = [ |
|
111 | - 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes', |
|
112 | - 'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes', |
|
113 | - 'expire_date' => ['enabled' => true] |
|
114 | - ]; |
|
115 | - |
|
116 | - // Sharee searches |
|
117 | - $res['sharee'] = [ |
|
118 | - 'query_lookup_default' => $this->config->getSystemValueBool('gs.enabled', false) |
|
119 | - ]; |
|
120 | - |
|
121 | - return [ |
|
122 | - 'files_sharing' => $res, |
|
123 | - ]; |
|
124 | - } |
|
38 | + /** @var IConfig */ |
|
39 | + private $config; |
|
40 | + |
|
41 | + public function __construct(IConfig $config) { |
|
42 | + $this->config = $config; |
|
43 | + } |
|
44 | + |
|
45 | + /** |
|
46 | + * Return this classes capabilities |
|
47 | + * |
|
48 | + * @return array |
|
49 | + */ |
|
50 | + public function getCapabilities() { |
|
51 | + $res = []; |
|
52 | + |
|
53 | + if ($this->config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') { |
|
54 | + $res['api_enabled'] = false; |
|
55 | + $res['public'] = ['enabled' => false]; |
|
56 | + $res['user'] = ['send_mail' => false]; |
|
57 | + $res['resharing'] = false; |
|
58 | + } else { |
|
59 | + $res['api_enabled'] = true; |
|
60 | + |
|
61 | + $public = []; |
|
62 | + $public['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes'; |
|
63 | + if ($public['enabled']) { |
|
64 | + $public['password'] = []; |
|
65 | + $public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes'); |
|
66 | + |
|
67 | + if ($public['password']['enforced']) { |
|
68 | + $public['password']['askForOptionalPassword'] = false; |
|
69 | + } else { |
|
70 | + $public['password']['askForOptionalPassword'] = ($this->config->getAppValue('core', 'shareapi_enable_link_password_by_default', 'no') === 'yes'); |
|
71 | + } |
|
72 | + |
|
73 | + $public['expire_date'] = []; |
|
74 | + $public['multiple_links'] = true; |
|
75 | + $public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes'; |
|
76 | + if ($public['expire_date']['enabled']) { |
|
77 | + $public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); |
|
78 | + $public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes'; |
|
79 | + } |
|
80 | + |
|
81 | + $public['expire_date_internal'] = []; |
|
82 | + $public['expire_date_internal']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_internal_expire_date', 'no') === 'yes'; |
|
83 | + if ($public['expire_date_internal']['enabled']) { |
|
84 | + $public['expire_date_internal']['days'] = $this->config->getAppValue('core', 'shareapi_internal_expire_after_n_days', '7'); |
|
85 | + $public['expire_date_internal']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_internal_expire_date', 'no') === 'yes'; |
|
86 | + } |
|
87 | + |
|
88 | + $public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes'; |
|
89 | + $public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes'; |
|
90 | + $public['upload_files_drop'] = $public['upload']; |
|
91 | + } |
|
92 | + $res['public'] = $public; |
|
93 | + |
|
94 | + $res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes'; |
|
95 | + |
|
96 | + $res['user']['send_mail'] = false; |
|
97 | + $res['user']['expire_date']['enabled'] = true; |
|
98 | + |
|
99 | + // deprecated in favour of 'group', but we need to keep it for now |
|
100 | + // in order to stay compatible with older clients |
|
101 | + $res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; |
|
102 | + |
|
103 | + $res['group'] = []; |
|
104 | + $res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; |
|
105 | + $res['group']['expire_date']['enabled'] = true; |
|
106 | + $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL); |
|
107 | + } |
|
108 | + |
|
109 | + //Federated sharing |
|
110 | + $res['federation'] = [ |
|
111 | + 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes', |
|
112 | + 'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes', |
|
113 | + 'expire_date' => ['enabled' => true] |
|
114 | + ]; |
|
115 | + |
|
116 | + // Sharee searches |
|
117 | + $res['sharee'] = [ |
|
118 | + 'query_lookup_default' => $this->config->getSystemValueBool('gs.enabled', false) |
|
119 | + ]; |
|
120 | + |
|
121 | + return [ |
|
122 | + 'files_sharing' => $res, |
|
123 | + ]; |
|
124 | + } |
|
125 | 125 | } |
@@ -23,18 +23,18 @@ |
||
23 | 23 | * |
24 | 24 | */ |
25 | 25 | |
26 | -require_once __DIR__ . '/../lib/versioncheck.php'; |
|
27 | -require_once __DIR__ . '/../lib/base.php'; |
|
26 | +require_once __DIR__.'/../lib/versioncheck.php'; |
|
27 | +require_once __DIR__.'/../lib/base.php'; |
|
28 | 28 | |
29 | 29 | header('Content-type: application/xml'); |
30 | 30 | |
31 | 31 | $request = \OC::$server->getRequest(); |
32 | 32 | |
33 | -$url = $request->getServerProtocol() . '://' . substr($request->getServerHost() . $request->getRequestUri(), 0, -17).'ocs/v1.php/'; |
|
33 | +$url = $request->getServerProtocol().'://'.substr($request->getServerHost().$request->getRequestUri(), 0, -17).'ocs/v1.php/'; |
|
34 | 34 | |
35 | 35 | $writer = new XMLWriter(); |
36 | 36 | $writer->openURI('php://output'); |
37 | -$writer->startDocument('1.0','UTF-8'); |
|
37 | +$writer->startDocument('1.0', 'UTF-8'); |
|
38 | 38 | $writer->setIndent(true); |
39 | 39 | $writer->startElement('providers'); |
40 | 40 | $writer->startElement('provider'); |
@@ -27,17 +27,17 @@ |
||
27 | 27 | * @since 13.0.0 |
28 | 28 | */ |
29 | 29 | interface ICachedMountFileInfo extends ICachedMountInfo { |
30 | - /** |
|
31 | - * Return the path for the file within the cached mount |
|
32 | - * |
|
33 | - * @return string |
|
34 | - * @since 13.0.0 |
|
35 | - */ |
|
36 | - public function getInternalPath(); |
|
30 | + /** |
|
31 | + * Return the path for the file within the cached mount |
|
32 | + * |
|
33 | + * @return string |
|
34 | + * @since 13.0.0 |
|
35 | + */ |
|
36 | + public function getInternalPath(); |
|
37 | 37 | |
38 | - /** |
|
39 | - * @return string |
|
40 | - * @since 13.0.0 |
|
41 | - */ |
|
42 | - public function getPath(); |
|
38 | + /** |
|
39 | + * @return string |
|
40 | + * @since 13.0.0 |
|
41 | + */ |
|
42 | + public function getPath(); |
|
43 | 43 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitFederatedFileSharing::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitFiles_Sharing::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitEncryption::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitTwoFactorBackupCodes::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); |
27 | 27 | if ($useStaticLoader) { |
28 | - require_once __DIR__ . '/autoload_static.php'; |
|
28 | + require_once __DIR__.'/autoload_static.php'; |
|
29 | 29 | |
30 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInitLookupServerConnector::getInitializer($loader)); |
31 | 31 | } else { |
32 | - $classMap = require __DIR__ . '/autoload_classmap.php'; |
|
32 | + $classMap = require __DIR__.'/autoload_classmap.php'; |
|
33 | 33 | if ($classMap) { |
34 | 34 | $loader->addClassMap($classMap); |
35 | 35 | } |