@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | /** |
4 | 4 | * @copyright (c) 2018 Joas Schilling <[email protected]> |
5 | 5 | * |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | style('updatenotification', 'admin'); |
13 | 13 | /** @var array $_ */ |
14 | 14 | ?> |
15 | -<?php if($_['withSettings'] === true) { ?> |
|
15 | +<?php if ($_['withSettings'] === true) { ?> |
|
16 | 16 | <div class="section"> |
17 | - <h2><?php p($l->t('Updates'));?></h2> |
|
17 | + <h2><?php p($l->t('Updates')); ?></h2> |
|
18 | 18 | <p><strong><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" rel="noreferrer noopener" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></strong></p> |
19 | 19 | </div> |
20 | 20 | <?php }?> |
@@ -6,35 +6,35 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitUpdateNotification |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\UpdateNotification\\' => 23, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\UpdateNotification\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\UpdateNotification\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\UpdateNotification\\Controller\\APIController' => __DIR__ . '/..' . '/../lib/Controller/APIController.php', |
|
26 | - 'OCA\\UpdateNotification\\Controller\\AdminController' => __DIR__ . '/..' . '/../lib/Controller/AdminController.php', |
|
27 | - 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => __DIR__ . '/..' . '/../lib/Notification/BackgroundJob.php', |
|
28 | - 'OCA\\UpdateNotification\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
29 | - 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => __DIR__ . '/..' . '/../lib/ResetTokenBackgroundJob.php', |
|
30 | - 'OCA\\UpdateNotification\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
31 | - 'OCA\\UpdateNotification\\Settings\\AdminOverview' => __DIR__ . '/..' . '/../lib/Settings/AdminOverview.php', |
|
32 | - 'OCA\\UpdateNotification\\UpdateChecker' => __DIR__ . '/..' . '/../lib/UpdateChecker.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\UpdateNotification\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\UpdateNotification\\Controller\\APIController' => __DIR__.'/..'.'/../lib/Controller/APIController.php', |
|
26 | + 'OCA\\UpdateNotification\\Controller\\AdminController' => __DIR__.'/..'.'/../lib/Controller/AdminController.php', |
|
27 | + 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => __DIR__.'/..'.'/../lib/Notification/BackgroundJob.php', |
|
28 | + 'OCA\\UpdateNotification\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
29 | + 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => __DIR__.'/..'.'/../lib/ResetTokenBackgroundJob.php', |
|
30 | + 'OCA\\UpdateNotification\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
31 | + 'OCA\\UpdateNotification\\Settings\\AdminOverview' => __DIR__.'/..'.'/../lib/Settings/AdminOverview.php', |
|
32 | + 'OCA\\UpdateNotification\\UpdateChecker' => __DIR__.'/..'.'/../lib/UpdateChecker.php', |
|
33 | 33 | ); |
34 | 34 | |
35 | 35 | public static function getInitializer(ClassLoader $loader) |
36 | 36 | { |
37 | - return \Closure::bind(function () use ($loader) { |
|
37 | + return \Closure::bind(function() use ($loader) { |
|
38 | 38 | $loader->prefixLengthsPsr4 = ComposerStaticInitUpdateNotification::$prefixLengthsPsr4; |
39 | 39 | $loader->prefixDirsPsr4 = ComposerStaticInitUpdateNotification::$prefixDirsPsr4; |
40 | 40 | $loader->classMap = ComposerStaticInitUpdateNotification::$classMap; |
@@ -6,13 +6,13 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\UpdateNotification\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\UpdateNotification\\Controller\\APIController' => $baseDir . '/../lib/Controller/APIController.php', |
|
11 | - 'OCA\\UpdateNotification\\Controller\\AdminController' => $baseDir . '/../lib/Controller/AdminController.php', |
|
12 | - 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => $baseDir . '/../lib/Notification/BackgroundJob.php', |
|
13 | - 'OCA\\UpdateNotification\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
14 | - 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => $baseDir . '/../lib/ResetTokenBackgroundJob.php', |
|
15 | - 'OCA\\UpdateNotification\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php', |
|
16 | - 'OCA\\UpdateNotification\\Settings\\AdminOverview' => $baseDir . '/../lib/Settings/AdminOverview.php', |
|
17 | - 'OCA\\UpdateNotification\\UpdateChecker' => $baseDir . '/../lib/UpdateChecker.php', |
|
9 | + 'OCA\\UpdateNotification\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\UpdateNotification\\Controller\\APIController' => $baseDir.'/../lib/Controller/APIController.php', |
|
11 | + 'OCA\\UpdateNotification\\Controller\\AdminController' => $baseDir.'/../lib/Controller/AdminController.php', |
|
12 | + 'OCA\\UpdateNotification\\Notification\\BackgroundJob' => $baseDir.'/../lib/Notification/BackgroundJob.php', |
|
13 | + 'OCA\\UpdateNotification\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
14 | + 'OCA\\UpdateNotification\\ResetTokenBackgroundJob' => $baseDir.'/../lib/ResetTokenBackgroundJob.php', |
|
15 | + 'OCA\\UpdateNotification\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php', |
|
16 | + 'OCA\\UpdateNotification\\Settings\\AdminOverview' => $baseDir.'/../lib/Settings/AdminOverview.php', |
|
17 | + 'OCA\\UpdateNotification\\UpdateChecker' => $baseDir.'/../lib/UpdateChecker.php', |
|
18 | 18 | ); |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <div id="security-warning" class="section"> |
30 | - <h2><?php p($l->t('Security & setup warnings'));?></h2> |
|
31 | - <p class="settings-hint"><?php p($l->t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.'));?></p> |
|
30 | + <h2><?php p($l->t('Security & setup warnings')); ?></h2> |
|
31 | + <p class="settings-hint"><?php p($l->t('It\'s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the Tips & Tricks section and the documentation for more information.')); ?></p> |
|
32 | 32 | <ul> |
33 | 33 | <?php |
34 | 34 | // is php setup properly to query system environment variables like getenv('PATH') |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | <?php p($l->t('It was not possible to execute the cron job via CLI. The following technical errors have appeared:')); ?> |
131 | 131 | <br> |
132 | 132 | <ol> |
133 | - <?php foreach(json_decode($_['cronErrors']) as $error) { if(isset($error->error)) {?> |
|
133 | + <?php foreach (json_decode($_['cronErrors']) as $error) { if (isset($error->error)) {?> |
|
134 | 134 | <li><?php p($error->error) ?> <?php p($error->hint) ?></li> |
135 | 135 | <?php }} ?> |
136 | 136 | </ol> |
@@ -143,30 +143,30 @@ discard block |
||
143 | 143 | $formatter = \OC::$server->getDateTimeFormatter(); |
144 | 144 | $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
145 | 145 | if (time() - $_['lastcron'] > 3600): ?> |
146 | - <li class="crondate" title="<?php p($absolute_time);?>"> |
|
147 | - <?php p($l->t("Last background job execution ran %s. Something seems wrong.", [$relative_time]));?> |
|
146 | + <li class="crondate" title="<?php p($absolute_time); ?>"> |
|
147 | + <?php p($l->t("Last background job execution ran %s. Something seems wrong.", [$relative_time])); ?> |
|
148 | 148 | <a href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'server'])); ?>#backgroundjobs"><?php p($l->t('Check the background job settings')); ?></a> |
149 | 149 | </li> |
150 | 150 | <?php endif; ?> |
151 | 151 | <?php endif; ?> |
152 | 152 | </ul> |
153 | 153 | |
154 | - <div id="postsetupchecks" data-check-wellknown="<?php if($_['checkForWorkingWellKnownSetup']) { p('true'); } else { p('false'); } ?>"> |
|
154 | + <div id="postsetupchecks" data-check-wellknown="<?php if ($_['checkForWorkingWellKnownSetup']) { p('true'); } else { p('false'); } ?>"> |
|
155 | 155 | <div class="loading"></div> |
156 | 156 | <ul class="errors hidden"></ul> |
157 | 157 | <ul class="warnings hidden"></ul> |
158 | 158 | <ul class="info hidden"></ul> |
159 | 159 | <p class="hint hidden"> |
160 | - <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?> |
|
160 | + <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?> |
|
161 | 161 | </p> |
162 | 162 | </div> |
163 | 163 | <div id="security-warning-state"> |
164 | - <span class="hidden icon-checkmark"><?php p($l->t('All checks passed.'));?></span> |
|
164 | + <span class="hidden icon-checkmark"><?php p($l->t('All checks passed.')); ?></span> |
|
165 | 165 | </div> |
166 | 166 | </div> |
167 | 167 | |
168 | 168 | <div class="section"> |
169 | 169 | <!-- should be the last part, so Updater can follow if enabled (it has no heading therefore). --> |
170 | - <h2><?php p($l->t('Version'));?></h2> |
|
170 | + <h2><?php p($l->t('Version')); ?></h2> |
|
171 | 171 | <p><strong><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" rel="noreferrer noopener" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></strong></p> |
172 | 172 | </div> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <div class="section" id="backgroundjobs"> |
30 | - <h2 class="inlineblock"><?php p($l->t('Background jobs'));?></h2> |
|
30 | + <h2 class="inlineblock"><?php p($l->t('Background jobs')); ?></h2> |
|
31 | 31 | <p class="cronlog inlineblock"> |
32 | 32 | <?php if ($_['lastcron'] !== false): |
33 | 33 | $relative_time = relative_modified_date($_['lastcron']); |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
37 | 37 | if (time() - $_['lastcron'] <= 3600): ?> |
38 | 38 | <span class="status success"></span> |
39 | - <span class="crondate" title="<?php p($absolute_time);?>"> |
|
40 | - <?php p($l->t("Last job ran %s.", [$relative_time]));?> |
|
39 | + <span class="crondate" title="<?php p($absolute_time); ?>"> |
|
40 | + <?php p($l->t("Last job ran %s.", [$relative_time])); ?> |
|
41 | 41 | </span> |
42 | 42 | <?php else: ?> |
43 | 43 | <span class="status error"></span> |
44 | - <span class="crondate" title="<?php p($absolute_time);?>"> |
|
45 | - <?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> |
|
44 | + <span class="crondate" title="<?php p($absolute_time); ?>"> |
|
45 | + <?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time])); ?> |
|
46 | 46 | </span> |
47 | 47 | <?php endif; |
48 | 48 | else: ?> |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | endif; ?> |
52 | 52 | </p> |
53 | 53 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
54 | - title="<?php p($l->t('Open documentation'));?>" |
|
54 | + title="<?php p($l->t('Open documentation')); ?>" |
|
55 | 55 | href="<?php p(link_to_docs('admin-background-jobs')); ?>"></a> |
56 | 56 | |
57 | - <p class="settings-hint"><?php p($l->t('For optimal performance it\'s important to configure background jobs correctly. For bigger instances \'Cron\' is the recommended setting. Please see the documentation for more information.'));?></p> |
|
57 | + <p class="settings-hint"><?php p($l->t('For optimal performance it\'s important to configure background jobs correctly. For bigger instances \'Cron\' is the recommended setting. Please see the documentation for more information.')); ?></p> |
|
58 | 58 | <p> |
59 | 59 | <input type="radio" name="mode" value="ajax" class="radio" |
60 | 60 | id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | }?>> |
82 | 82 | <label for="backgroundjobs_cron">Cron</label><br/> |
83 | 83 | <em><?php p($l->t("Use system cron service to call the cron.php file every 15 minutes.")); ?> |
84 | - <?php if($_['cli_based_cron_possible']) { |
|
84 | + <?php if ($_['cli_based_cron_possible']) { |
|
85 | 85 | p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); |
86 | 86 | } else { |
87 | 87 | print_unescaped(str_replace( |
@@ -4,13 +4,13 @@ discard block |
||
4 | 4 | script('federatedfilesharing', 'settings-admin'); |
5 | 5 | ?> |
6 | 6 | |
7 | -<?php if($_['internalOnly'] === false): ?> |
|
7 | +<?php if ($_['internalOnly'] === false): ?> |
|
8 | 8 | |
9 | 9 | <div id="fileSharingSettings" class="section"> |
10 | 10 | <h2> |
11 | - <?php p($l->t('Federated Cloud Sharing'));?> |
|
11 | + <?php p($l->t('Federated Cloud Sharing')); ?> |
|
12 | 12 | <a target="_blank" rel="noreferrer noopener" class="icon-info svg" |
13 | - title="<?php p($l->t('Open documentation'));?>" |
|
13 | + title="<?php p($l->t('Open documentation')); ?>" |
|
14 | 14 | href="<?php p(link_to_docs('admin-sharing-federated')); ?>"></a> |
15 | 15 | </h2> |
16 | 16 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox" |
21 | 21 | value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
22 | 22 | <label for="outgoingServer2serverShareEnabled"> |
23 | - <?php p($l->t('Allow users on this server to send shares to other servers'));?> |
|
23 | + <?php p($l->t('Allow users on this server to send shares to other servers')); ?> |
|
24 | 24 | </label> |
25 | 25 | </p> |
26 | 26 | |
@@ -28,21 +28,21 @@ discard block |
||
28 | 28 | <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox" |
29 | 29 | value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> /> |
30 | 30 | <label for="incomingServer2serverShareEnabled"> |
31 | - <?php p($l->t('Allow users on this server to receive shares from other servers'));?> |
|
31 | + <?php p($l->t('Allow users on this server to receive shares from other servers')); ?> |
|
32 | 32 | </label><br/> |
33 | 33 | </p> |
34 | 34 | <p> |
35 | 35 | <input type="checkbox" name="lookupServerEnabled" id="lookupServerEnabled" class="checkbox" |
36 | 36 | value="1" <?php if ($_['lookupServerEnabled']) print_unescaped('checked="checked"'); ?> /> |
37 | 37 | <label for="lookupServerEnabled"> |
38 | - <?php p($l->t('Search global and public address book for users'));?> |
|
38 | + <?php p($l->t('Search global and public address book for users')); ?> |
|
39 | 39 | </label><br/> |
40 | 40 | </p> |
41 | 41 | <p> |
42 | 42 | <input type="checkbox" name="lookupServerUploadEnabled" id="lookupServerUploadEnabled" class="checkbox" |
43 | 43 | value="1" <?php if ($_['lookupServerUploadEnabled']) print_unescaped('checked="checked"'); ?> /> |
44 | 44 | <label for="lookupServerUploadEnabled"> |
45 | - <?php p($l->t('Allow users to publish their data to a global and public address book'));?> |
|
45 | + <?php p($l->t('Allow users to publish their data to a global and public address book')); ?> |
|
46 | 46 | </label><br/> |
47 | 47 | </p> |
48 | 48 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | use OCP\Settings\IIconSection; |
31 | 31 | use OCP\Settings\ISettings; |
32 | 32 | |
33 | -trait CommonSettingsTrait { |
|
33 | +trait CommonSettingsTrait { |
|
34 | 34 | /** @var ISettingsManager */ |
35 | 35 | private $settingsManager; |
36 | 36 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'admin' => [] |
48 | 48 | ]; |
49 | 49 | |
50 | - if(\OC_User::isAdminUser(\OC_User::getUser())) { |
|
50 | + if (\OC_User::isAdminUser(\OC_User::getUser())) { |
|
51 | 51 | $templateParameters['admin'] = $this->formatAdminSections($currentType, $currentSection); |
52 | 52 | } |
53 | 53 | |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | protected function formatSections($sections, $currentSection, $type, $currentType) { |
60 | 60 | $templateParameters = []; |
61 | 61 | /** @var \OCP\Settings\ISection[] $prioritizedSections */ |
62 | - foreach($sections as $prioritizedSections) { |
|
62 | + foreach ($sections as $prioritizedSections) { |
|
63 | 63 | foreach ($prioritizedSections as $section) { |
64 | - if($type === 'admin') { |
|
64 | + if ($type === 'admin') { |
|
65 | 65 | $settings = $this->settingsManager->getAdminSettings($section->getID()); |
66 | - } else if($type === 'personal') { |
|
66 | + } else if ($type === 'personal') { |
|
67 | 67 | $settings = $this->settingsManager->getPersonalSettings($section->getID()); |
68 | 68 | } |
69 | 69 | if (empty($settings) && !($section->getID() === 'additional' && count(\OC_App::getForms('admin')) > 0)) { |
@@ -27,10 +27,6 @@ |
||
27 | 27 | namespace OC\Settings\Admin; |
28 | 28 | |
29 | 29 | use Doctrine\DBAL\Connection; |
30 | -use Doctrine\DBAL\DBALException; |
|
31 | -use Doctrine\DBAL\Platforms\SqlitePlatform; |
|
32 | -use OC\Lock\DBLockingProvider; |
|
33 | -use OC\Lock\NoopLockingProvider; |
|
34 | 30 | use OCP\AppFramework\Http\TemplateResponse; |
35 | 31 | use OCP\IConfig; |
36 | 32 | use OCP\IDBConnection; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), |
81 | 81 | 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'), |
82 | 82 | 'cli_based_cron_possible' => function_exists('posix_getpwuid'), |
83 | - 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', |
|
83 | + 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir.'config.php'))['name'] : '', |
|
84 | 84 | ]; |
85 | 85 | |
86 | 86 | return new TemplateResponse('settings', 'settings/admin/server', $parameters, ''); |
@@ -107,7 +107,7 @@ |
||
107 | 107 | |
108 | 108 | $suggestedOverwriteCliUrl = ''; |
109 | 109 | if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { |
110 | - $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; |
|
110 | + $suggestedOverwriteCliUrl = $this->request->getServerProtocol().'://'.$this->request->getInsecureServerHost().\OC::$WEBROOT; |
|
111 | 111 | if (!$this->config->getSystemValue('config_is_read_only', false)) { |
112 | 112 | // Set the overwrite URL when it was not set yet. |
113 | 113 | $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); |