@@ -33,80 +33,80 @@ |
||
33 | 33 | * Specialized version of Local storage for home directory usage |
34 | 34 | */ |
35 | 35 | class Home extends Local implements \OCP\Files\IHomeStorage { |
36 | - /** |
|
37 | - * @var string |
|
38 | - */ |
|
39 | - protected $id; |
|
36 | + /** |
|
37 | + * @var string |
|
38 | + */ |
|
39 | + protected $id; |
|
40 | 40 | |
41 | - /** |
|
42 | - * @var \OC\User\User $user |
|
43 | - */ |
|
44 | - protected $user; |
|
41 | + /** |
|
42 | + * @var \OC\User\User $user |
|
43 | + */ |
|
44 | + protected $user; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Construct a Home storage instance |
|
48 | - * |
|
49 | - * @param array $arguments array with "user" containing the |
|
50 | - * storage owner |
|
51 | - */ |
|
52 | - public function __construct($arguments) { |
|
53 | - $this->user = $arguments['user']; |
|
54 | - $datadir = $this->user->getHome(); |
|
55 | - $this->id = 'home::' . $this->user->getUID(); |
|
46 | + /** |
|
47 | + * Construct a Home storage instance |
|
48 | + * |
|
49 | + * @param array $arguments array with "user" containing the |
|
50 | + * storage owner |
|
51 | + */ |
|
52 | + public function __construct($arguments) { |
|
53 | + $this->user = $arguments['user']; |
|
54 | + $datadir = $this->user->getHome(); |
|
55 | + $this->id = 'home::' . $this->user->getUID(); |
|
56 | 56 | |
57 | - parent::__construct(['datadir' => $datadir]); |
|
58 | - } |
|
57 | + parent::__construct(['datadir' => $datadir]); |
|
58 | + } |
|
59 | 59 | |
60 | - public function getId() { |
|
61 | - return $this->id; |
|
62 | - } |
|
60 | + public function getId() { |
|
61 | + return $this->id; |
|
62 | + } |
|
63 | 63 | |
64 | - /** |
|
65 | - * @return \OC\Files\Cache\HomeCache |
|
66 | - */ |
|
67 | - public function getCache($path = '', $storage = null) { |
|
68 | - if (!$storage) { |
|
69 | - $storage = $this; |
|
70 | - } |
|
71 | - if (!isset($this->cache)) { |
|
72 | - $this->cache = new \OC\Files\Cache\HomeCache($storage); |
|
73 | - } |
|
74 | - return $this->cache; |
|
75 | - } |
|
64 | + /** |
|
65 | + * @return \OC\Files\Cache\HomeCache |
|
66 | + */ |
|
67 | + public function getCache($path = '', $storage = null) { |
|
68 | + if (!$storage) { |
|
69 | + $storage = $this; |
|
70 | + } |
|
71 | + if (!isset($this->cache)) { |
|
72 | + $this->cache = new \OC\Files\Cache\HomeCache($storage); |
|
73 | + } |
|
74 | + return $this->cache; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * get a propagator instance for the cache |
|
79 | - * |
|
80 | - * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher |
|
81 | - * @return \OC\Files\Cache\Propagator |
|
82 | - */ |
|
83 | - public function getPropagator($storage = null) { |
|
84 | - if (!$storage) { |
|
85 | - $storage = $this; |
|
86 | - } |
|
87 | - if (!isset($this->propagator)) { |
|
88 | - $this->propagator = new HomePropagator($storage, \OC::$server->getDatabaseConnection()); |
|
89 | - } |
|
90 | - return $this->propagator; |
|
91 | - } |
|
77 | + /** |
|
78 | + * get a propagator instance for the cache |
|
79 | + * |
|
80 | + * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher |
|
81 | + * @return \OC\Files\Cache\Propagator |
|
82 | + */ |
|
83 | + public function getPropagator($storage = null) { |
|
84 | + if (!$storage) { |
|
85 | + $storage = $this; |
|
86 | + } |
|
87 | + if (!isset($this->propagator)) { |
|
88 | + $this->propagator = new HomePropagator($storage, \OC::$server->getDatabaseConnection()); |
|
89 | + } |
|
90 | + return $this->propagator; |
|
91 | + } |
|
92 | 92 | |
93 | 93 | |
94 | - /** |
|
95 | - * Returns the owner of this home storage |
|
96 | - * |
|
97 | - * @return \OC\User\User owner of this home storage |
|
98 | - */ |
|
99 | - public function getUser() { |
|
100 | - return $this->user; |
|
101 | - } |
|
94 | + /** |
|
95 | + * Returns the owner of this home storage |
|
96 | + * |
|
97 | + * @return \OC\User\User owner of this home storage |
|
98 | + */ |
|
99 | + public function getUser() { |
|
100 | + return $this->user; |
|
101 | + } |
|
102 | 102 | |
103 | - /** |
|
104 | - * get the owner of a path |
|
105 | - * |
|
106 | - * @param string $path The path to get the owner |
|
107 | - * @return string uid or false |
|
108 | - */ |
|
109 | - public function getOwner($path) { |
|
110 | - return $this->user->getUID(); |
|
111 | - } |
|
103 | + /** |
|
104 | + * get the owner of a path |
|
105 | + * |
|
106 | + * @param string $path The path to get the owner |
|
107 | + * @return string uid or false |
|
108 | + */ |
|
109 | + public function getOwner($path) { |
|
110 | + return $this->user->getUID(); |
|
111 | + } |
|
112 | 112 | } |
@@ -30,41 +30,41 @@ |
||
30 | 30 | * @var $this \OCP\Route\IRouter |
31 | 31 | **/ |
32 | 32 | \OC_Mount_Config::$app->registerRoutes( |
33 | - $this, |
|
34 | - [ |
|
35 | - 'resources' => [ |
|
36 | - 'global_storages' => ['url' => '/globalstorages'], |
|
37 | - 'user_storages' => ['url' => '/userstorages'], |
|
38 | - 'user_global_storages' => ['url' => '/userglobalstorages'], |
|
39 | - ], |
|
40 | - 'routes' => [ |
|
41 | - [ |
|
42 | - 'name' => 'Ajax#getSshKeys', |
|
43 | - 'url' => '/ajax/public_key.php', |
|
44 | - 'verb' => 'POST', |
|
45 | - 'requirements' => [], |
|
46 | - ], |
|
47 | - [ |
|
48 | - 'name' => 'Ajax#saveGlobalCredentials', |
|
49 | - 'url' => '/globalcredentials', |
|
50 | - 'verb' => 'POST', |
|
51 | - ], |
|
52 | - ], |
|
53 | - 'ocs' => [ |
|
54 | - [ |
|
55 | - 'name' => 'Api#getUserMounts', |
|
56 | - 'url' => '/api/v1/mounts', |
|
57 | - 'verb' => 'GET', |
|
58 | - ], |
|
59 | - ], |
|
60 | - ] |
|
33 | + $this, |
|
34 | + [ |
|
35 | + 'resources' => [ |
|
36 | + 'global_storages' => ['url' => '/globalstorages'], |
|
37 | + 'user_storages' => ['url' => '/userstorages'], |
|
38 | + 'user_global_storages' => ['url' => '/userglobalstorages'], |
|
39 | + ], |
|
40 | + 'routes' => [ |
|
41 | + [ |
|
42 | + 'name' => 'Ajax#getSshKeys', |
|
43 | + 'url' => '/ajax/public_key.php', |
|
44 | + 'verb' => 'POST', |
|
45 | + 'requirements' => [], |
|
46 | + ], |
|
47 | + [ |
|
48 | + 'name' => 'Ajax#saveGlobalCredentials', |
|
49 | + 'url' => '/globalcredentials', |
|
50 | + 'verb' => 'POST', |
|
51 | + ], |
|
52 | + ], |
|
53 | + 'ocs' => [ |
|
54 | + [ |
|
55 | + 'name' => 'Api#getUserMounts', |
|
56 | + 'url' => '/api/v1/mounts', |
|
57 | + 'verb' => 'GET', |
|
58 | + ], |
|
59 | + ], |
|
60 | + ] |
|
61 | 61 | ); |
62 | 62 | |
63 | 63 | $this->create('files_external_oauth1', 'ajax/oauth1.php') |
64 | - ->actionInclude('files_external/ajax/oauth1.php'); |
|
64 | + ->actionInclude('files_external/ajax/oauth1.php'); |
|
65 | 65 | $this->create('files_external_oauth2', 'ajax/oauth2.php') |
66 | - ->actionInclude('files_external/ajax/oauth2.php'); |
|
66 | + ->actionInclude('files_external/ajax/oauth2.php'); |
|
67 | 67 | |
68 | 68 | |
69 | 69 | $this->create('files_external_list_applicable', '/applicable') |
70 | - ->actionInclude('files_external/ajax/applicable.php'); |
|
70 | + ->actionInclude('files_external/ajax/applicable.php'); |
@@ -31,41 +31,41 @@ |
||
31 | 31 | * @since 7.0.0 |
32 | 32 | */ |
33 | 33 | interface IAppConfig { |
34 | - /** |
|
35 | - * check if a key is set in the appconfig |
|
36 | - * @param string $app |
|
37 | - * @param string $key |
|
38 | - * @return bool |
|
39 | - * @since 7.0.0 |
|
40 | - */ |
|
41 | - public function hasKey($app, $key); |
|
34 | + /** |
|
35 | + * check if a key is set in the appconfig |
|
36 | + * @param string $app |
|
37 | + * @param string $key |
|
38 | + * @return bool |
|
39 | + * @since 7.0.0 |
|
40 | + */ |
|
41 | + public function hasKey($app, $key); |
|
42 | 42 | |
43 | - /** |
|
44 | - * get multiply values, either the app or key can be used as wildcard by setting it to false |
|
45 | - * |
|
46 | - * @param string|false $key |
|
47 | - * @param string|false $app |
|
48 | - * @return array|false |
|
49 | - * @since 7.0.0 |
|
50 | - */ |
|
51 | - public function getValues($app, $key); |
|
43 | + /** |
|
44 | + * get multiply values, either the app or key can be used as wildcard by setting it to false |
|
45 | + * |
|
46 | + * @param string|false $key |
|
47 | + * @param string|false $app |
|
48 | + * @return array|false |
|
49 | + * @since 7.0.0 |
|
50 | + */ |
|
51 | + public function getValues($app, $key); |
|
52 | 52 | |
53 | - /** |
|
54 | - * get all values of the app or and filters out sensitive data |
|
55 | - * |
|
56 | - * @param string $app |
|
57 | - * @return array |
|
58 | - * @since 12.0.0 |
|
59 | - */ |
|
60 | - public function getFilteredValues($app); |
|
53 | + /** |
|
54 | + * get all values of the app or and filters out sensitive data |
|
55 | + * |
|
56 | + * @param string $app |
|
57 | + * @return array |
|
58 | + * @since 12.0.0 |
|
59 | + */ |
|
60 | + public function getFilteredValues($app); |
|
61 | 61 | |
62 | - /** |
|
63 | - * Get all apps using the config |
|
64 | - * @return array an array of app ids |
|
65 | - * |
|
66 | - * This function returns a list of all apps that have at least one |
|
67 | - * entry in the appconfig table. |
|
68 | - * @since 7.0.0 |
|
69 | - */ |
|
70 | - public function getApps(); |
|
62 | + /** |
|
63 | + * Get all apps using the config |
|
64 | + * @return array an array of app ids |
|
65 | + * |
|
66 | + * This function returns a list of all apps that have at least one |
|
67 | + * entry in the appconfig table. |
|
68 | + * @since 7.0.0 |
|
69 | + */ |
|
70 | + public function getApps(); |
|
71 | 71 | } |
@@ -38,63 +38,63 @@ |
||
38 | 38 | use OCP\Util; |
39 | 39 | |
40 | 40 | class AdminController extends Controller { |
41 | - /** @var IJobList */ |
|
42 | - private $jobList; |
|
43 | - /** @var ISecureRandom */ |
|
44 | - private $secureRandom; |
|
45 | - /** @var IConfig */ |
|
46 | - private $config; |
|
47 | - /** @var ITimeFactory */ |
|
48 | - private $timeFactory; |
|
49 | - /** @var IL10N */ |
|
50 | - private $l10n; |
|
41 | + /** @var IJobList */ |
|
42 | + private $jobList; |
|
43 | + /** @var ISecureRandom */ |
|
44 | + private $secureRandom; |
|
45 | + /** @var IConfig */ |
|
46 | + private $config; |
|
47 | + /** @var ITimeFactory */ |
|
48 | + private $timeFactory; |
|
49 | + /** @var IL10N */ |
|
50 | + private $l10n; |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param string $appName |
|
54 | - * @param IRequest $request |
|
55 | - * @param IJobList $jobList |
|
56 | - * @param ISecureRandom $secureRandom |
|
57 | - * @param IConfig $config |
|
58 | - * @param ITimeFactory $timeFactory |
|
59 | - * @param IL10N $l10n |
|
60 | - */ |
|
61 | - public function __construct($appName, |
|
62 | - IRequest $request, |
|
63 | - IJobList $jobList, |
|
64 | - ISecureRandom $secureRandom, |
|
65 | - IConfig $config, |
|
66 | - ITimeFactory $timeFactory, |
|
67 | - IL10N $l10n) { |
|
68 | - parent::__construct($appName, $request); |
|
69 | - $this->jobList = $jobList; |
|
70 | - $this->secureRandom = $secureRandom; |
|
71 | - $this->config = $config; |
|
72 | - $this->timeFactory = $timeFactory; |
|
73 | - $this->l10n = $l10n; |
|
74 | - } |
|
52 | + /** |
|
53 | + * @param string $appName |
|
54 | + * @param IRequest $request |
|
55 | + * @param IJobList $jobList |
|
56 | + * @param ISecureRandom $secureRandom |
|
57 | + * @param IConfig $config |
|
58 | + * @param ITimeFactory $timeFactory |
|
59 | + * @param IL10N $l10n |
|
60 | + */ |
|
61 | + public function __construct($appName, |
|
62 | + IRequest $request, |
|
63 | + IJobList $jobList, |
|
64 | + ISecureRandom $secureRandom, |
|
65 | + IConfig $config, |
|
66 | + ITimeFactory $timeFactory, |
|
67 | + IL10N $l10n) { |
|
68 | + parent::__construct($appName, $request); |
|
69 | + $this->jobList = $jobList; |
|
70 | + $this->secureRandom = $secureRandom; |
|
71 | + $this->config = $config; |
|
72 | + $this->timeFactory = $timeFactory; |
|
73 | + $this->l10n = $l10n; |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * @param string $channel |
|
78 | - * @return DataResponse |
|
79 | - */ |
|
80 | - public function setChannel(string $channel): DataResponse { |
|
81 | - Util::setChannel($channel); |
|
82 | - $this->config->setAppValue('core', 'lastupdatedat', 0); |
|
83 | - return new DataResponse(['status' => 'success', 'data' => ['message' => $this->l10n->t('Channel updated')]]); |
|
84 | - } |
|
76 | + /** |
|
77 | + * @param string $channel |
|
78 | + * @return DataResponse |
|
79 | + */ |
|
80 | + public function setChannel(string $channel): DataResponse { |
|
81 | + Util::setChannel($channel); |
|
82 | + $this->config->setAppValue('core', 'lastupdatedat', 0); |
|
83 | + return new DataResponse(['status' => 'success', 'data' => ['message' => $this->l10n->t('Channel updated')]]); |
|
84 | + } |
|
85 | 85 | |
86 | - /** |
|
87 | - * @return DataResponse |
|
88 | - */ |
|
89 | - public function createCredentials(): DataResponse { |
|
90 | - // Create a new job and store the creation date |
|
91 | - $this->jobList->add(ResetTokenBackgroundJob::class); |
|
92 | - $this->config->setAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()); |
|
86 | + /** |
|
87 | + * @return DataResponse |
|
88 | + */ |
|
89 | + public function createCredentials(): DataResponse { |
|
90 | + // Create a new job and store the creation date |
|
91 | + $this->jobList->add(ResetTokenBackgroundJob::class); |
|
92 | + $this->config->setAppValue('core', 'updater.secret.created', $this->timeFactory->getTime()); |
|
93 | 93 | |
94 | - // Create a new token |
|
95 | - $newToken = $this->secureRandom->generate(64); |
|
96 | - $this->config->setSystemValue('updater.secret', password_hash($newToken, PASSWORD_DEFAULT)); |
|
94 | + // Create a new token |
|
95 | + $newToken = $this->secureRandom->generate(64); |
|
96 | + $this->config->setSystemValue('updater.secret', password_hash($newToken, PASSWORD_DEFAULT)); |
|
97 | 97 | |
98 | - return new DataResponse($newToken); |
|
99 | - } |
|
98 | + return new DataResponse($newToken); |
|
99 | + } |
|
100 | 100 | } |
@@ -31,45 +31,45 @@ |
||
31 | 31 | * @package OCA\AdminAudit\Actions |
32 | 32 | */ |
33 | 33 | class Security extends Action { |
34 | - /** |
|
35 | - * Log twofactor auth enabled |
|
36 | - * |
|
37 | - * @param IUser $user |
|
38 | - * @param array $params |
|
39 | - */ |
|
40 | - public function twofactorFailed(IUser $user, array $params) { |
|
41 | - $params['uid'] = $user->getUID(); |
|
42 | - $params['displayName'] = $user->getDisplayName(); |
|
34 | + /** |
|
35 | + * Log twofactor auth enabled |
|
36 | + * |
|
37 | + * @param IUser $user |
|
38 | + * @param array $params |
|
39 | + */ |
|
40 | + public function twofactorFailed(IUser $user, array $params) { |
|
41 | + $params['uid'] = $user->getUID(); |
|
42 | + $params['displayName'] = $user->getDisplayName(); |
|
43 | 43 | |
44 | - $this->log( |
|
45 | - 'Failed two factor attempt by user %s (%s) with provider %s', |
|
46 | - $params, |
|
47 | - [ |
|
48 | - 'displayName', |
|
49 | - 'uid', |
|
50 | - 'provider', |
|
51 | - ] |
|
52 | - ); |
|
53 | - } |
|
44 | + $this->log( |
|
45 | + 'Failed two factor attempt by user %s (%s) with provider %s', |
|
46 | + $params, |
|
47 | + [ |
|
48 | + 'displayName', |
|
49 | + 'uid', |
|
50 | + 'provider', |
|
51 | + ] |
|
52 | + ); |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * Logs unsharing of data |
|
57 | - * |
|
58 | - * @param IUser $user |
|
59 | - * @param array $params |
|
60 | - */ |
|
61 | - public function twofactorSuccess(IUser $user, array $params) { |
|
62 | - $params['uid'] = $user->getUID(); |
|
63 | - $params['displayName'] = $user->getDisplayName(); |
|
55 | + /** |
|
56 | + * Logs unsharing of data |
|
57 | + * |
|
58 | + * @param IUser $user |
|
59 | + * @param array $params |
|
60 | + */ |
|
61 | + public function twofactorSuccess(IUser $user, array $params) { |
|
62 | + $params['uid'] = $user->getUID(); |
|
63 | + $params['displayName'] = $user->getDisplayName(); |
|
64 | 64 | |
65 | - $this->log( |
|
66 | - 'Successful two factor attempt by user %s (%s) with provider %s', |
|
67 | - $params, |
|
68 | - [ |
|
69 | - 'displayName', |
|
70 | - 'uid', |
|
71 | - 'provider', |
|
72 | - ] |
|
73 | - ); |
|
74 | - } |
|
65 | + $this->log( |
|
66 | + 'Successful two factor attempt by user %s (%s) with provider %s', |
|
67 | + $params, |
|
68 | + [ |
|
69 | + 'displayName', |
|
70 | + 'uid', |
|
71 | + 'provider', |
|
72 | + ] |
|
73 | + ); |
|
74 | + } |
|
75 | 75 | } |
@@ -36,47 +36,47 @@ |
||
36 | 36 | */ |
37 | 37 | class OwncloudGuestShareType implements IRepairStep { |
38 | 38 | |
39 | - /** @var IDBConnection */ |
|
40 | - private $connection; |
|
39 | + /** @var IDBConnection */ |
|
40 | + private $connection; |
|
41 | 41 | |
42 | - /** @var IConfig */ |
|
43 | - private $config; |
|
42 | + /** @var IConfig */ |
|
43 | + private $config; |
|
44 | 44 | |
45 | 45 | |
46 | - public function __construct(IDBConnection $connection, IConfig $config) { |
|
47 | - $this->connection = $connection; |
|
48 | - $this->config = $config; |
|
49 | - } |
|
46 | + public function __construct(IDBConnection $connection, IConfig $config) { |
|
47 | + $this->connection = $connection; |
|
48 | + $this->config = $config; |
|
49 | + } |
|
50 | 50 | |
51 | - /** |
|
52 | - * Returns the step's name |
|
53 | - * |
|
54 | - * @return string |
|
55 | - * @since 9.1.0 |
|
56 | - */ |
|
57 | - public function getName() { |
|
58 | - return 'Fix the share type of guest shares when migrating from ownCloud'; |
|
59 | - } |
|
51 | + /** |
|
52 | + * Returns the step's name |
|
53 | + * |
|
54 | + * @return string |
|
55 | + * @since 9.1.0 |
|
56 | + */ |
|
57 | + public function getName() { |
|
58 | + return 'Fix the share type of guest shares when migrating from ownCloud'; |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @param IOutput $output |
|
63 | - */ |
|
64 | - public function run(IOutput $output) { |
|
65 | - if (!$this->shouldRun()) { |
|
66 | - return; |
|
67 | - } |
|
61 | + /** |
|
62 | + * @param IOutput $output |
|
63 | + */ |
|
64 | + public function run(IOutput $output) { |
|
65 | + if (!$this->shouldRun()) { |
|
66 | + return; |
|
67 | + } |
|
68 | 68 | |
69 | - $query = $this->connection->getQueryBuilder(); |
|
70 | - $query->update('share') |
|
71 | - ->set('share_type', $query->createNamedParameter(Share::SHARE_TYPE_GUEST)) |
|
72 | - ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_EMAIL))); |
|
73 | - $query->execute(); |
|
74 | - } |
|
69 | + $query = $this->connection->getQueryBuilder(); |
|
70 | + $query->update('share') |
|
71 | + ->set('share_type', $query->createNamedParameter(Share::SHARE_TYPE_GUEST)) |
|
72 | + ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_EMAIL))); |
|
73 | + $query->execute(); |
|
74 | + } |
|
75 | 75 | |
76 | - protected function shouldRun() { |
|
77 | - $appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0'); |
|
78 | - return $appVersion === '0.10.0' || |
|
79 | - $this->config->getAppValue('core', 'vendor', '') === 'owncloud'; |
|
80 | - } |
|
76 | + protected function shouldRun() { |
|
77 | + $appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0'); |
|
78 | + return $appVersion === '0.10.0' || |
|
79 | + $this->config->getAppValue('core', 'vendor', '') === 'owncloud'; |
|
80 | + } |
|
81 | 81 | |
82 | 82 | } |
@@ -23,63 +23,63 @@ |
||
23 | 23 | namespace OC\App\CodeChecker; |
24 | 24 | |
25 | 25 | class PrivateCheck extends AbstractCheck { |
26 | - /** |
|
27 | - * @return string |
|
28 | - */ |
|
29 | - protected function getLocalDescription() { |
|
30 | - return 'private'; |
|
31 | - } |
|
26 | + /** |
|
27 | + * @return string |
|
28 | + */ |
|
29 | + protected function getLocalDescription() { |
|
30 | + return 'private'; |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * @return array |
|
35 | - */ |
|
36 | - public function getLocalClasses() { |
|
37 | - return [ |
|
38 | - // classes replaced by the public api |
|
39 | - 'OC_API' => '6.0.0', |
|
40 | - 'OC_App' => '6.0.0', |
|
41 | - 'OC_AppConfig' => '6.0.0', |
|
42 | - 'OC_Avatar' => '6.0.0', |
|
43 | - 'OC_BackgroundJob' => '6.0.0', |
|
44 | - 'OC_Config' => '6.0.0', |
|
45 | - 'OC_DB' => '6.0.0', |
|
46 | - 'OC_Files' => '6.0.0', |
|
47 | - 'OC_Helper' => '6.0.0', |
|
48 | - 'OC_Hook' => '6.0.0', |
|
49 | - 'OC_Image' => '6.0.0', |
|
50 | - 'OC_JSON' => '6.0.0', |
|
51 | - 'OC_L10N' => '6.0.0', |
|
52 | - 'OC_Log' => '6.0.0', |
|
53 | - 'OC_Mail' => '6.0.0', |
|
54 | - 'OC_Preferences' => '6.0.0', |
|
55 | - 'OC_Search_Provider' => '6.0.0', |
|
56 | - 'OC_Search_Result' => '6.0.0', |
|
57 | - 'OC_Request' => '6.0.0', |
|
58 | - 'OC_Response' => '6.0.0', |
|
59 | - 'OC_Template' => '6.0.0', |
|
60 | - 'OC_User' => '6.0.0', |
|
61 | - 'OC_Util' => '6.0.0', |
|
62 | - ]; |
|
63 | - } |
|
33 | + /** |
|
34 | + * @return array |
|
35 | + */ |
|
36 | + public function getLocalClasses() { |
|
37 | + return [ |
|
38 | + // classes replaced by the public api |
|
39 | + 'OC_API' => '6.0.0', |
|
40 | + 'OC_App' => '6.0.0', |
|
41 | + 'OC_AppConfig' => '6.0.0', |
|
42 | + 'OC_Avatar' => '6.0.0', |
|
43 | + 'OC_BackgroundJob' => '6.0.0', |
|
44 | + 'OC_Config' => '6.0.0', |
|
45 | + 'OC_DB' => '6.0.0', |
|
46 | + 'OC_Files' => '6.0.0', |
|
47 | + 'OC_Helper' => '6.0.0', |
|
48 | + 'OC_Hook' => '6.0.0', |
|
49 | + 'OC_Image' => '6.0.0', |
|
50 | + 'OC_JSON' => '6.0.0', |
|
51 | + 'OC_L10N' => '6.0.0', |
|
52 | + 'OC_Log' => '6.0.0', |
|
53 | + 'OC_Mail' => '6.0.0', |
|
54 | + 'OC_Preferences' => '6.0.0', |
|
55 | + 'OC_Search_Provider' => '6.0.0', |
|
56 | + 'OC_Search_Result' => '6.0.0', |
|
57 | + 'OC_Request' => '6.0.0', |
|
58 | + 'OC_Response' => '6.0.0', |
|
59 | + 'OC_Template' => '6.0.0', |
|
60 | + 'OC_User' => '6.0.0', |
|
61 | + 'OC_Util' => '6.0.0', |
|
62 | + ]; |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * @return array |
|
67 | - */ |
|
68 | - public function getLocalConstants() { |
|
69 | - return []; |
|
70 | - } |
|
65 | + /** |
|
66 | + * @return array |
|
67 | + */ |
|
68 | + public function getLocalConstants() { |
|
69 | + return []; |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * @return array |
|
74 | - */ |
|
75 | - public function getLocalFunctions() { |
|
76 | - return []; |
|
77 | - } |
|
72 | + /** |
|
73 | + * @return array |
|
74 | + */ |
|
75 | + public function getLocalFunctions() { |
|
76 | + return []; |
|
77 | + } |
|
78 | 78 | |
79 | - /** |
|
80 | - * @return array |
|
81 | - */ |
|
82 | - public function getLocalMethods() { |
|
83 | - return []; |
|
84 | - } |
|
79 | + /** |
|
80 | + * @return array |
|
81 | + */ |
|
82 | + public function getLocalMethods() { |
|
83 | + return []; |
|
84 | + } |
|
85 | 85 | } |
@@ -26,27 +26,27 @@ |
||
26 | 26 | |
27 | 27 | class RequestTime extends Controller { |
28 | 28 | |
29 | - /** |
|
30 | - * @NoAdminRequired |
|
31 | - * |
|
32 | - * @param string $search |
|
33 | - * @return JSONResponse |
|
34 | - */ |
|
35 | - public function getTimezones($search = '') { |
|
36 | - $timezones = \DateTimeZone::listIdentifiers(); |
|
29 | + /** |
|
30 | + * @NoAdminRequired |
|
31 | + * |
|
32 | + * @param string $search |
|
33 | + * @return JSONResponse |
|
34 | + */ |
|
35 | + public function getTimezones($search = '') { |
|
36 | + $timezones = \DateTimeZone::listIdentifiers(); |
|
37 | 37 | |
38 | - if ($search !== '') { |
|
39 | - $timezones = array_filter($timezones, function ($timezone) use ($search) { |
|
40 | - return stripos($timezone, $search) !== false; |
|
41 | - }); |
|
42 | - } |
|
38 | + if ($search !== '') { |
|
39 | + $timezones = array_filter($timezones, function ($timezone) use ($search) { |
|
40 | + return stripos($timezone, $search) !== false; |
|
41 | + }); |
|
42 | + } |
|
43 | 43 | |
44 | - $timezones = array_slice($timezones, 0, 10); |
|
44 | + $timezones = array_slice($timezones, 0, 10); |
|
45 | 45 | |
46 | - $response = []; |
|
47 | - foreach ($timezones as $timezone) { |
|
48 | - $response[$timezone] = $timezone; |
|
49 | - } |
|
50 | - return new JSONResponse($response); |
|
51 | - } |
|
46 | + $response = []; |
|
47 | + foreach ($timezones as $timezone) { |
|
48 | + $response[$timezone] = $timezone; |
|
49 | + } |
|
50 | + return new JSONResponse($response); |
|
51 | + } |
|
52 | 52 | } |
@@ -37,14 +37,14 @@ |
||
37 | 37 | $appContainer = \OC_Mount_Config::$app->getContainer(); |
38 | 38 | |
39 | 39 | \OCA\Files\App::getNavigationManager()->add(function () { |
40 | - $l = \OC::$server->getL10N('files_external'); |
|
41 | - return [ |
|
42 | - 'id' => 'extstoragemounts', |
|
43 | - 'appname' => 'files_external', |
|
44 | - 'script' => 'list.php', |
|
45 | - 'order' => 30, |
|
46 | - 'name' => $l->t('External storages'), |
|
47 | - ]; |
|
40 | + $l = \OC::$server->getL10N('files_external'); |
|
41 | + return [ |
|
42 | + 'id' => 'extstoragemounts', |
|
43 | + 'appname' => 'files_external', |
|
44 | + 'script' => 'list.php', |
|
45 | + 'order' => 30, |
|
46 | + 'name' => $l->t('External storages'), |
|
47 | + ]; |
|
48 | 48 | }); |
49 | 49 | |
50 | 50 | $mountProvider = $appContainer->query(ConfigAdapter::class); |