@@ -30,57 +30,57 @@ |
||
30 | 30 | use OCP\Settings\ISettings; |
31 | 31 | |
32 | 32 | class Mail implements ISettings { |
33 | - /** @var IConfig */ |
|
34 | - private $config; |
|
33 | + /** @var IConfig */ |
|
34 | + private $config; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @param IConfig $config |
|
38 | - */ |
|
39 | - public function __construct(IConfig $config) { |
|
40 | - $this->config = $config; |
|
41 | - } |
|
36 | + /** |
|
37 | + * @param IConfig $config |
|
38 | + */ |
|
39 | + public function __construct(IConfig $config) { |
|
40 | + $this->config = $config; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @return TemplateResponse |
|
45 | - */ |
|
46 | - public function getForm() { |
|
47 | - $parameters = [ |
|
48 | ||
49 | - 'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'), |
|
50 | - 'mail_domain' => $this->config->getSystemValue('mail_domain', ''), |
|
51 | - 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''), |
|
52 | - 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''), |
|
53 | - 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''), |
|
54 | - 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''), |
|
55 | - 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''), |
|
56 | - 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''), |
|
57 | - 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false), |
|
58 | - 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''), |
|
59 | - 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''), |
|
60 | - ]; |
|
43 | + /** |
|
44 | + * @return TemplateResponse |
|
45 | + */ |
|
46 | + public function getForm() { |
|
47 | + $parameters = [ |
|
48 | ||
49 | + 'sendmail_is_available' => (bool) \OC_Helper::findBinaryPath('sendmail'), |
|
50 | + 'mail_domain' => $this->config->getSystemValue('mail_domain', ''), |
|
51 | + 'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''), |
|
52 | + 'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''), |
|
53 | + 'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''), |
|
54 | + 'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''), |
|
55 | + 'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''), |
|
56 | + 'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''), |
|
57 | + 'mail_smtpauth' => $this->config->getSystemValue('mail_smtpauth', false), |
|
58 | + 'mail_smtpname' => $this->config->getSystemValue('mail_smtpname', ''), |
|
59 | + 'mail_smtppassword' => $this->config->getSystemValue('mail_smtppassword', ''), |
|
60 | + ]; |
|
61 | 61 | |
62 | - if ($parameters['mail_smtppassword'] !== '') { |
|
63 | - $parameters['mail_smtppassword'] = '********'; |
|
64 | - } |
|
62 | + if ($parameters['mail_smtppassword'] !== '') { |
|
63 | + $parameters['mail_smtppassword'] = '********'; |
|
64 | + } |
|
65 | 65 | |
66 | - return new TemplateResponse('settings', 'settings/admin/additional-mail', $parameters, ''); |
|
67 | - } |
|
66 | + return new TemplateResponse('settings', 'settings/admin/additional-mail', $parameters, ''); |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * @return string the section ID, e.g. 'sharing' |
|
71 | - */ |
|
72 | - public function getSection() { |
|
73 | - return 'server'; |
|
74 | - } |
|
69 | + /** |
|
70 | + * @return string the section ID, e.g. 'sharing' |
|
71 | + */ |
|
72 | + public function getSection() { |
|
73 | + return 'server'; |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * @return int whether the form should be rather on the top or bottom of |
|
78 | - * the admin section. The forms are arranged in ascending order of the |
|
79 | - * priority values. It is required to return a value between 0 and 100. |
|
80 | - * |
|
81 | - * E.g.: 70 |
|
82 | - */ |
|
83 | - public function getPriority() { |
|
84 | - return 10; |
|
85 | - } |
|
76 | + /** |
|
77 | + * @return int whether the form should be rather on the top or bottom of |
|
78 | + * the admin section. The forms are arranged in ascending order of the |
|
79 | + * priority values. It is required to return a value between 0 and 100. |
|
80 | + * |
|
81 | + * E.g.: 70 |
|
82 | + */ |
|
83 | + public function getPriority() { |
|
84 | + return 10; |
|
85 | + } |
|
86 | 86 | } |
@@ -32,56 +32,56 @@ |
||
32 | 32 | |
33 | 33 | class Admin implements ISettings { |
34 | 34 | |
35 | - /** @var IniGetWrapper */ |
|
36 | - private $iniWrapper; |
|
35 | + /** @var IniGetWrapper */ |
|
36 | + private $iniWrapper; |
|
37 | 37 | |
38 | - /** @var IRequest */ |
|
39 | - private $request; |
|
38 | + /** @var IRequest */ |
|
39 | + private $request; |
|
40 | 40 | |
41 | - public function __construct(IniGetWrapper $iniWrapper, IRequest $request) { |
|
42 | - $this->iniWrapper = $iniWrapper; |
|
43 | - $this->request = $request; |
|
44 | - } |
|
41 | + public function __construct(IniGetWrapper $iniWrapper, IRequest $request) { |
|
42 | + $this->iniWrapper = $iniWrapper; |
|
43 | + $this->request = $request; |
|
44 | + } |
|
45 | 45 | |
46 | - /** |
|
47 | - * @return TemplateResponse |
|
48 | - */ |
|
49 | - public function getForm() { |
|
50 | - $htaccessWorking = (getenv('htaccessWorking') === 'true'); |
|
51 | - $htaccessWritable = is_writable(\OC::$SERVERROOT.'/.htaccess'); |
|
52 | - $userIniWritable = is_writable(\OC::$SERVERROOT.'/.user.ini'); |
|
46 | + /** |
|
47 | + * @return TemplateResponse |
|
48 | + */ |
|
49 | + public function getForm() { |
|
50 | + $htaccessWorking = (getenv('htaccessWorking') === 'true'); |
|
51 | + $htaccessWritable = is_writable(\OC::$SERVERROOT.'/.htaccess'); |
|
52 | + $userIniWritable = is_writable(\OC::$SERVERROOT.'/.user.ini'); |
|
53 | 53 | |
54 | - $upload_max_filesize = $this->iniWrapper->getBytes('upload_max_filesize'); |
|
55 | - $post_max_size = $this->iniWrapper->getBytes('post_max_size'); |
|
56 | - $maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size)); |
|
54 | + $upload_max_filesize = $this->iniWrapper->getBytes('upload_max_filesize'); |
|
55 | + $post_max_size = $this->iniWrapper->getBytes('post_max_size'); |
|
56 | + $maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size)); |
|
57 | 57 | |
58 | - $parameters = [ |
|
59 | - 'uploadChangable' => ($htaccessWorking and $htaccessWritable) or $userIniWritable, |
|
60 | - 'uploadMaxFilesize' => $maxUploadFilesize, |
|
61 | - // max possible makes only sense on a 32 bit system |
|
62 | - 'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4, |
|
63 | - 'maxPossibleUploadSize' => Util::humanFileSize(PHP_INT_MAX), |
|
64 | - ]; |
|
58 | + $parameters = [ |
|
59 | + 'uploadChangable' => ($htaccessWorking and $htaccessWritable) or $userIniWritable, |
|
60 | + 'uploadMaxFilesize' => $maxUploadFilesize, |
|
61 | + // max possible makes only sense on a 32 bit system |
|
62 | + 'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4, |
|
63 | + 'maxPossibleUploadSize' => Util::humanFileSize(PHP_INT_MAX), |
|
64 | + ]; |
|
65 | 65 | |
66 | - return new TemplateResponse('files', 'admin', $parameters, ''); |
|
67 | - } |
|
66 | + return new TemplateResponse('files', 'admin', $parameters, ''); |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * @return string the section ID, e.g. 'sharing' |
|
71 | - */ |
|
72 | - public function getSection() { |
|
73 | - return 'server'; |
|
74 | - } |
|
69 | + /** |
|
70 | + * @return string the section ID, e.g. 'sharing' |
|
71 | + */ |
|
72 | + public function getSection() { |
|
73 | + return 'server'; |
|
74 | + } |
|
75 | 75 | |
76 | - /** |
|
77 | - * @return int whether the form should be rather on the top or bottom of |
|
78 | - * the admin section. The forms are arranged in ascending order of the |
|
79 | - * priority values. It is required to return a value between 0 and 100. |
|
80 | - * |
|
81 | - * E.g.: 70 |
|
82 | - */ |
|
83 | - public function getPriority() { |
|
84 | - return 5; |
|
85 | - } |
|
76 | + /** |
|
77 | + * @return int whether the form should be rather on the top or bottom of |
|
78 | + * the admin section. The forms are arranged in ascending order of the |
|
79 | + * priority values. It is required to return a value between 0 and 100. |
|
80 | + * |
|
81 | + * E.g.: 70 |
|
82 | + */ |
|
83 | + public function getPriority() { |
|
84 | + return 5; |
|
85 | + } |
|
86 | 86 | |
87 | 87 | } |
@@ -29,41 +29,41 @@ |
||
29 | 29 | |
30 | 30 | class CalDAVSettings implements ISettings { |
31 | 31 | |
32 | - /** @var IConfig */ |
|
33 | - private $config; |
|
32 | + /** @var IConfig */ |
|
33 | + private $config; |
|
34 | 34 | |
35 | - /** |
|
36 | - * CalDAVSettings constructor. |
|
37 | - * |
|
38 | - * @param IConfig $config |
|
39 | - */ |
|
40 | - public function __construct(IConfig $config) { |
|
41 | - $this->config = $config; |
|
42 | - } |
|
35 | + /** |
|
36 | + * CalDAVSettings constructor. |
|
37 | + * |
|
38 | + * @param IConfig $config |
|
39 | + */ |
|
40 | + public function __construct(IConfig $config) { |
|
41 | + $this->config = $config; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @return TemplateResponse |
|
46 | - */ |
|
47 | - public function getForm() { |
|
48 | - $parameters = [ |
|
49 | - 'send_invitations' => $this->config->getAppValue('dav', 'sendInvitations', 'yes'), |
|
50 | - 'generate_birthday_calendar' => $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes'), |
|
51 | - ]; |
|
44 | + /** |
|
45 | + * @return TemplateResponse |
|
46 | + */ |
|
47 | + public function getForm() { |
|
48 | + $parameters = [ |
|
49 | + 'send_invitations' => $this->config->getAppValue('dav', 'sendInvitations', 'yes'), |
|
50 | + 'generate_birthday_calendar' => $this->config->getAppValue('dav', 'generateBirthdayCalendar', 'yes'), |
|
51 | + ]; |
|
52 | 52 | |
53 | - return new TemplateResponse('dav', 'settings-admin-caldav', $parameters); |
|
54 | - } |
|
53 | + return new TemplateResponse('dav', 'settings-admin-caldav', $parameters); |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * @return string |
|
58 | - */ |
|
59 | - public function getSection() { |
|
60 | - return 'server'; |
|
61 | - } |
|
56 | + /** |
|
57 | + * @return string |
|
58 | + */ |
|
59 | + public function getSection() { |
|
60 | + return 'server'; |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @return int |
|
65 | - */ |
|
66 | - public function getPriority() { |
|
67 | - return 20; |
|
68 | - } |
|
63 | + /** |
|
64 | + * @return int |
|
65 | + */ |
|
66 | + public function getPriority() { |
|
67 | + return 20; |
|
68 | + } |
|
69 | 69 | } |
@@ -35,114 +35,114 @@ |
||
35 | 35 | use OCP\Util; |
36 | 36 | |
37 | 37 | class Admin implements ISettings { |
38 | - /** @var IConfig */ |
|
39 | - private $config; |
|
40 | - /** @var UpdateChecker */ |
|
41 | - private $updateChecker; |
|
42 | - /** @var IGroupManager */ |
|
43 | - private $groupManager; |
|
44 | - /** @var IDateTimeFormatter */ |
|
45 | - private $dateTimeFormatter; |
|
46 | - |
|
47 | - /** |
|
48 | - * @param IConfig $config |
|
49 | - * @param UpdateChecker $updateChecker |
|
50 | - * @param IGroupManager $groupManager |
|
51 | - * @param IDateTimeFormatter $dateTimeFormatter |
|
52 | - */ |
|
53 | - public function __construct(IConfig $config, |
|
54 | - UpdateChecker $updateChecker, |
|
55 | - IGroupManager $groupManager, |
|
56 | - IDateTimeFormatter $dateTimeFormatter) { |
|
57 | - $this->config = $config; |
|
58 | - $this->updateChecker = $updateChecker; |
|
59 | - $this->groupManager = $groupManager; |
|
60 | - $this->dateTimeFormatter = $dateTimeFormatter; |
|
61 | - } |
|
62 | - |
|
63 | - /** |
|
64 | - * @return TemplateResponse |
|
65 | - */ |
|
66 | - public function getForm(): TemplateResponse { |
|
67 | - $lastUpdateCheckTimestamp = $this->config->getAppValue('core', 'lastupdatedat'); |
|
68 | - $lastUpdateCheck = $this->dateTimeFormatter->formatDateTime($lastUpdateCheckTimestamp); |
|
69 | - |
|
70 | - $channels = [ |
|
71 | - 'daily', |
|
72 | - 'beta', |
|
73 | - 'stable', |
|
74 | - 'production', |
|
75 | - ]; |
|
76 | - $currentChannel = Util::getChannel(); |
|
77 | - if ($currentChannel === 'git') { |
|
78 | - $channels[] = 'git'; |
|
79 | - } |
|
80 | - |
|
81 | - $updateState = $this->updateChecker->getUpdateState(); |
|
82 | - |
|
83 | - $notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true); |
|
84 | - |
|
85 | - $defaultUpdateServerURL = 'https://updates.nextcloud.com/updater_server/'; |
|
86 | - $updateServerURL = $this->config->getSystemValue('updater.server.url', $defaultUpdateServerURL); |
|
87 | - |
|
88 | - $params = [ |
|
89 | - 'isNewVersionAvailable' => !empty($updateState['updateAvailable']), |
|
90 | - 'isUpdateChecked' => $lastUpdateCheckTimestamp > 0, |
|
91 | - 'lastChecked' => $lastUpdateCheck, |
|
92 | - 'currentChannel' => $currentChannel, |
|
93 | - 'channels' => $channels, |
|
94 | - 'newVersionString' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'], |
|
95 | - 'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'], |
|
96 | - 'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'], |
|
97 | - 'versionIsEol' => empty($updateState['versionIsEol']) ? false : $updateState['versionIsEol'], |
|
98 | - 'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL, |
|
99 | - 'updateServerURL' => $updateServerURL, |
|
100 | - 'notifyGroups' => $this->getSelectedGroups($notifyGroups), |
|
101 | - 'withSettings' => true, |
|
102 | - ]; |
|
103 | - |
|
104 | - $params = [ |
|
105 | - 'json' => json_encode($params), |
|
106 | - 'withSettings' => true, |
|
107 | - ]; |
|
108 | - |
|
109 | - return new TemplateResponse('updatenotification', 'admin', $params, ''); |
|
110 | - } |
|
111 | - |
|
112 | - /** |
|
113 | - * @param array $groupIds |
|
114 | - * @return array |
|
115 | - */ |
|
116 | - protected function getSelectedGroups(array $groupIds): array { |
|
117 | - $result = []; |
|
118 | - foreach ($groupIds as $groupId) { |
|
119 | - $group = $this->groupManager->get($groupId); |
|
120 | - |
|
121 | - if ($group === null) { |
|
122 | - continue; |
|
123 | - } |
|
124 | - |
|
125 | - $result[] = ['value' => $group->getGID(), 'label' => $group->getDisplayName()]; |
|
126 | - } |
|
127 | - |
|
128 | - return $result; |
|
129 | - } |
|
130 | - |
|
131 | - /** |
|
132 | - * @return string the section ID, e.g. 'sharing' |
|
133 | - */ |
|
134 | - public function getSection(): string { |
|
135 | - return 'server'; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return int whether the form should be rather on the top or bottom of |
|
140 | - * the admin section. The forms are arranged in ascending order of the |
|
141 | - * priority values. It is required to return a value between 0 and 100. |
|
142 | - * |
|
143 | - * E.g.: 70 |
|
144 | - */ |
|
145 | - public function getPriority(): int { |
|
146 | - return 90; |
|
147 | - } |
|
38 | + /** @var IConfig */ |
|
39 | + private $config; |
|
40 | + /** @var UpdateChecker */ |
|
41 | + private $updateChecker; |
|
42 | + /** @var IGroupManager */ |
|
43 | + private $groupManager; |
|
44 | + /** @var IDateTimeFormatter */ |
|
45 | + private $dateTimeFormatter; |
|
46 | + |
|
47 | + /** |
|
48 | + * @param IConfig $config |
|
49 | + * @param UpdateChecker $updateChecker |
|
50 | + * @param IGroupManager $groupManager |
|
51 | + * @param IDateTimeFormatter $dateTimeFormatter |
|
52 | + */ |
|
53 | + public function __construct(IConfig $config, |
|
54 | + UpdateChecker $updateChecker, |
|
55 | + IGroupManager $groupManager, |
|
56 | + IDateTimeFormatter $dateTimeFormatter) { |
|
57 | + $this->config = $config; |
|
58 | + $this->updateChecker = $updateChecker; |
|
59 | + $this->groupManager = $groupManager; |
|
60 | + $this->dateTimeFormatter = $dateTimeFormatter; |
|
61 | + } |
|
62 | + |
|
63 | + /** |
|
64 | + * @return TemplateResponse |
|
65 | + */ |
|
66 | + public function getForm(): TemplateResponse { |
|
67 | + $lastUpdateCheckTimestamp = $this->config->getAppValue('core', 'lastupdatedat'); |
|
68 | + $lastUpdateCheck = $this->dateTimeFormatter->formatDateTime($lastUpdateCheckTimestamp); |
|
69 | + |
|
70 | + $channels = [ |
|
71 | + 'daily', |
|
72 | + 'beta', |
|
73 | + 'stable', |
|
74 | + 'production', |
|
75 | + ]; |
|
76 | + $currentChannel = Util::getChannel(); |
|
77 | + if ($currentChannel === 'git') { |
|
78 | + $channels[] = 'git'; |
|
79 | + } |
|
80 | + |
|
81 | + $updateState = $this->updateChecker->getUpdateState(); |
|
82 | + |
|
83 | + $notifyGroups = json_decode($this->config->getAppValue('updatenotification', 'notify_groups', '["admin"]'), true); |
|
84 | + |
|
85 | + $defaultUpdateServerURL = 'https://updates.nextcloud.com/updater_server/'; |
|
86 | + $updateServerURL = $this->config->getSystemValue('updater.server.url', $defaultUpdateServerURL); |
|
87 | + |
|
88 | + $params = [ |
|
89 | + 'isNewVersionAvailable' => !empty($updateState['updateAvailable']), |
|
90 | + 'isUpdateChecked' => $lastUpdateCheckTimestamp > 0, |
|
91 | + 'lastChecked' => $lastUpdateCheck, |
|
92 | + 'currentChannel' => $currentChannel, |
|
93 | + 'channels' => $channels, |
|
94 | + 'newVersionString' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'], |
|
95 | + 'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'], |
|
96 | + 'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'], |
|
97 | + 'versionIsEol' => empty($updateState['versionIsEol']) ? false : $updateState['versionIsEol'], |
|
98 | + 'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL, |
|
99 | + 'updateServerURL' => $updateServerURL, |
|
100 | + 'notifyGroups' => $this->getSelectedGroups($notifyGroups), |
|
101 | + 'withSettings' => true, |
|
102 | + ]; |
|
103 | + |
|
104 | + $params = [ |
|
105 | + 'json' => json_encode($params), |
|
106 | + 'withSettings' => true, |
|
107 | + ]; |
|
108 | + |
|
109 | + return new TemplateResponse('updatenotification', 'admin', $params, ''); |
|
110 | + } |
|
111 | + |
|
112 | + /** |
|
113 | + * @param array $groupIds |
|
114 | + * @return array |
|
115 | + */ |
|
116 | + protected function getSelectedGroups(array $groupIds): array { |
|
117 | + $result = []; |
|
118 | + foreach ($groupIds as $groupId) { |
|
119 | + $group = $this->groupManager->get($groupId); |
|
120 | + |
|
121 | + if ($group === null) { |
|
122 | + continue; |
|
123 | + } |
|
124 | + |
|
125 | + $result[] = ['value' => $group->getGID(), 'label' => $group->getDisplayName()]; |
|
126 | + } |
|
127 | + |
|
128 | + return $result; |
|
129 | + } |
|
130 | + |
|
131 | + /** |
|
132 | + * @return string the section ID, e.g. 'sharing' |
|
133 | + */ |
|
134 | + public function getSection(): string { |
|
135 | + return 'server'; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return int whether the form should be rather on the top or bottom of |
|
140 | + * the admin section. The forms are arranged in ascending order of the |
|
141 | + * priority values. It is required to return a value between 0 and 100. |
|
142 | + * |
|
143 | + * E.g.: 70 |
|
144 | + */ |
|
145 | + public function getPriority(): int { |
|
146 | + return 90; |
|
147 | + } |
|
148 | 148 | } |
@@ -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 | ); |
@@ -31,101 +31,101 @@ discard block |
||
31 | 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 | - // is php setup properly to query system environment variables like getenv('PATH') |
|
35 | - if ($_['getenvServerNotWorking']) { |
|
36 | - ?> |
|
34 | + // is php setup properly to query system environment variables like getenv('PATH') |
|
35 | + if ($_['getenvServerNotWorking']) { |
|
36 | + ?> |
|
37 | 37 | <li> |
38 | 38 | <?php p($l->t('PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.')); ?><br> |
39 | 39 | <?php print_unescaped($l->t('Please check the <a target="_blank" rel="noreferrer noopener" href="%s">installation documentation ↗</a> for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.', link_to_docs('admin-php-fpm'))); ?> |
40 | 40 | </li> |
41 | 41 | <?php |
42 | - } |
|
42 | + } |
|
43 | 43 | |
44 | - // is read only config enabled |
|
45 | - if ($_['readOnlyConfigEnabled']) { |
|
46 | - ?> |
|
44 | + // is read only config enabled |
|
45 | + if ($_['readOnlyConfigEnabled']) { |
|
46 | + ?> |
|
47 | 47 | <li> |
48 | 48 | <?php p($l->t('The Read-Only config has been enabled. This prevents setting some configurations via the web-interface. Furthermore, the file needs to be made writable manually for every update.')); ?> |
49 | 49 | </li> |
50 | 50 | <?php |
51 | - } |
|
51 | + } |
|
52 | 52 | |
53 | - // Are doc blocks accessible? |
|
54 | - if (!$_['isAnnotationsWorking']) { |
|
55 | - ?> |
|
53 | + // Are doc blocks accessible? |
|
54 | + if (!$_['isAnnotationsWorking']) { |
|
55 | + ?> |
|
56 | 56 | <li> |
57 | 57 | <?php p($l->t('PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible.')); ?><br> |
58 | 58 | <?php p($l->t('This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.')); ?> |
59 | 59 | </li> |
60 | 60 | <?php |
61 | - } |
|
61 | + } |
|
62 | 62 | |
63 | - // Is the Transaction isolation level READ_COMMITTED? |
|
64 | - if ($_['invalidTransactionIsolationLevel']) { |
|
65 | - ?> |
|
63 | + // Is the Transaction isolation level READ_COMMITTED? |
|
64 | + if ($_['invalidTransactionIsolationLevel']) { |
|
65 | + ?> |
|
66 | 66 | <li> |
67 | 67 | <?php p($l->t('Your database does not run with "READ COMMITTED" transaction isolation level. This can cause problems when multiple actions are executed in parallel.')); ?> |
68 | 68 | </li> |
69 | 69 | <?php |
70 | - } |
|
70 | + } |
|
71 | 71 | |
72 | - // Warning if memcache is outdated |
|
73 | - foreach ($_['OutdatedCacheWarning'] as $php_module => $data) { |
|
74 | - ?> |
|
72 | + // Warning if memcache is outdated |
|
73 | + foreach ($_['OutdatedCacheWarning'] as $php_module => $data) { |
|
74 | + ?> |
|
75 | 75 | <li> |
76 | 76 | <?php p($l->t('%1$s below version %2$s is installed, for stability and performance reasons it is recommended to update to a newer %1$s version.', $data)); ?> |
77 | 77 | </li> |
78 | 78 | <?php |
79 | - } |
|
79 | + } |
|
80 | 80 | |
81 | - // if module fileinfo available? |
|
82 | - if (!$_['has_fileinfo']) { |
|
83 | - ?> |
|
81 | + // if module fileinfo available? |
|
82 | + if (!$_['has_fileinfo']) { |
|
83 | + ?> |
|
84 | 84 | <li> |
85 | 85 | <?php p($l->t('The PHP module \'fileinfo\' is missing. It is strongly recommended to enable this module to get the best results with MIME type detection.')); ?> |
86 | 86 | </li> |
87 | 87 | <?php |
88 | - } |
|
88 | + } |
|
89 | 89 | |
90 | - // locking configured optimally? |
|
91 | - if ($_['fileLockingType'] === 'none') { |
|
92 | - ?> |
|
90 | + // locking configured optimally? |
|
91 | + if ($_['fileLockingType'] === 'none') { |
|
92 | + ?> |
|
93 | 93 | <li> |
94 | 94 | <?php print_unescaped($l->t('Transactional file locking is disabled, this might lead to issues with race conditions. Enable \'filelocking.enabled\' in config.php to avoid these problems. See the <a target="_blank" rel="noreferrer noopener" href="%s">documentation ↗</a> for more information.', link_to_docs('admin-transactional-locking'))); ?> |
95 | 95 | </li> |
96 | 96 | <?php |
97 | - } |
|
97 | + } |
|
98 | 98 | |
99 | - // is locale working ? |
|
100 | - if (!$_['isLocaleWorking']) { |
|
101 | - ?> |
|
99 | + // is locale working ? |
|
100 | + if (!$_['isLocaleWorking']) { |
|
101 | + ?> |
|
102 | 102 | <li> |
103 | 103 | <?php |
104 | - $locales = 'en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8'; |
|
105 | - p($l->t('System locale can not be set to a one which supports UTF-8.')); |
|
106 | - ?> |
|
104 | + $locales = 'en_US.UTF-8/fr_FR.UTF-8/es_ES.UTF-8/de_DE.UTF-8/ru_RU.UTF-8/pt_BR.UTF-8/it_IT.UTF-8/ja_JP.UTF-8/zh_CN.UTF-8'; |
|
105 | + p($l->t('System locale can not be set to a one which supports UTF-8.')); |
|
106 | + ?> |
|
107 | 107 | <br> |
108 | 108 | <?php |
109 | - p($l->t('This means that there might be problems with certain characters in filenames.')); |
|
110 | - ?> |
|
109 | + p($l->t('This means that there might be problems with certain characters in filenames.')); |
|
110 | + ?> |
|
111 | 111 | <br> |
112 | 112 | <?php |
113 | - p($l->t('It is strongly proposed to install the required packages on your system to support one of the following locales: %s.', [$locales])); |
|
114 | - ?> |
|
113 | + p($l->t('It is strongly proposed to install the required packages on your system to support one of the following locales: %s.', [$locales])); |
|
114 | + ?> |
|
115 | 115 | </li> |
116 | 116 | <?php |
117 | - } |
|
117 | + } |
|
118 | 118 | |
119 | - if ($_['suggestedOverwriteCliUrl']) { |
|
120 | - ?> |
|
119 | + if ($_['suggestedOverwriteCliUrl']) { |
|
120 | + ?> |
|
121 | 121 | <li> |
122 | 122 | <?php p($l->t('If your installation is not installed at the root of the domain and uses system Cron, there can be issues with the URL generation. To avoid these problems, please set the "overwrite.cli.url" option in your config.php file to the webroot path of your installation (Suggested: "%s")', $_['suggestedOverwriteCliUrl'])); ?> |
123 | 123 | </li> |
124 | 124 | <?php |
125 | - } |
|
125 | + } |
|
126 | 126 | |
127 | - if ($_['cronErrors']) { |
|
128 | - ?> |
|
127 | + if ($_['cronErrors']) { |
|
128 | + ?> |
|
129 | 129 | <li> |
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> |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | </ol> |
137 | 137 | </li> |
138 | 138 | <?php |
139 | - } |
|
140 | - ?> |
|
139 | + } |
|
140 | + ?> |
|
141 | 141 | <?php if ($_['lastcron'] !== false): |
142 | - $relative_time = relative_modified_date($_['lastcron']); |
|
143 | - $formatter = \OC::$server->getDateTimeFormatter(); |
|
144 | - $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
145 | - if (time() - $_['lastcron'] > 3600): ?> |
|
142 | + $relative_time = relative_modified_date($_['lastcron']); |
|
143 | + $formatter = \OC::$server->getDateTimeFormatter(); |
|
144 | + $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
145 | + if (time() - $_['lastcron'] > 3600): ?> |
|
146 | 146 | <li class="crondate" title="<?php p($absolute_time);?>"> |
147 | 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> |
@@ -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> |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | <h2 class="inlineblock"><?php p($l->t('Background jobs'));?></h2> |
31 | 31 | <p class="cronlog inlineblock"> |
32 | 32 | <?php if ($_['lastcron'] !== false): |
33 | - $relative_time = relative_modified_date($_['lastcron']); |
|
33 | + $relative_time = relative_modified_date($_['lastcron']); |
|
34 | 34 | |
35 | - $formatter = \OC::$server->getDateTimeFormatter(); |
|
36 | - $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
37 | - if (time() - $_['lastcron'] <= 3600): ?> |
|
35 | + $formatter = \OC::$server->getDateTimeFormatter(); |
|
36 | + $absolute_time = $formatter->formatDateTime($_['lastcron'], 'long', 'long'); |
|
37 | + if (time() - $_['lastcron'] <= 3600): ?> |
|
38 | 38 | <span class="status success"></span> |
39 | 39 | <span class="crondate" title="<?php p($absolute_time);?>"> |
40 | 40 | <?php p($l->t("Last job ran %s.", [$relative_time]));?> |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | <?php p($l->t("Last job execution ran %s. Something seems wrong.", [$relative_time]));?> |
46 | 46 | </span> |
47 | 47 | <?php endif; |
48 | - else: ?> |
|
48 | + else: ?> |
|
49 | 49 | <span class="status error"></span> |
50 | 50 | <?php p($l->t("Background job didn’t run yet!")); |
51 | - endif; ?> |
|
51 | + endif; ?> |
|
52 | 52 | </p> |
53 | 53 | <a target="_blank" rel="noreferrer noopener" class="icon-info" |
54 | 54 | title="<?php p($l->t('Open documentation'));?>" |
@@ -58,38 +58,38 @@ discard block |
||
58 | 58 | <p> |
59 | 59 | <input type="radio" name="mode" value="ajax" class="radio" |
60 | 60 | id="backgroundjobs_ajax" <?php if ($_['backgroundjobs_mode'] === "ajax") { |
61 | - print_unescaped('checked="checked"'); |
|
62 | - } ?>> |
|
61 | + print_unescaped('checked="checked"'); |
|
62 | + } ?>> |
|
63 | 63 | <label for="backgroundjobs_ajax">AJAX</label><br/> |
64 | 64 | <em><?php p($l->t("Execute one task with each page loaded")); ?></em> |
65 | 65 | </p> |
66 | 66 | <p> |
67 | 67 | <input type="radio" name="mode" value="webcron" class="radio" |
68 | 68 | id="backgroundjobs_webcron" <?php if ($_['backgroundjobs_mode'] === "webcron") { |
69 | - print_unescaped('checked="checked"'); |
|
70 | - } ?>> |
|
69 | + print_unescaped('checked="checked"'); |
|
70 | + } ?>> |
|
71 | 71 | <label for="backgroundjobs_webcron">Webcron</label><br/> |
72 | 72 | <em><?php p($l->t("cron.php is registered at a webcron service to call cron.php every 15 minutes over HTTP.")); ?></em> |
73 | 73 | </p> |
74 | 74 | <p> |
75 | 75 | <input type="radio" name="mode" value="cron" class="radio" |
76 | 76 | id="backgroundjobs_cron" <?php if ($_['backgroundjobs_mode'] === "cron") { |
77 | - print_unescaped('checked="checked"'); |
|
78 | - } |
|
79 | - if (!$_['cli_based_cron_possible']) { |
|
80 | - print_unescaped('disabled'); |
|
81 | - }?>> |
|
77 | + print_unescaped('checked="checked"'); |
|
78 | + } |
|
79 | + if (!$_['cli_based_cron_possible']) { |
|
80 | + print_unescaped('disabled'); |
|
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 | 84 | <?php if($_['cli_based_cron_possible']) { |
85 | - p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); |
|
86 | - } else { |
|
87 | - print_unescaped(str_replace( |
|
88 | - ['{linkstart}', '{linkend}'], |
|
89 | - ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'], |
|
90 | - $l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') |
|
91 | - )); |
|
92 | - } ?></em> |
|
85 | + p($l->t('The cron.php needs to be executed by the system user "%s".', [$_['cli_based_cron_user']])); |
|
86 | + } else { |
|
87 | + print_unescaped(str_replace( |
|
88 | + ['{linkstart}', '{linkend}'], |
|
89 | + ['<a href="http://php.net/manual/en/book.posix.php">', ' ↗</a>'], |
|
90 | + $l->t('To run this you need the PHP POSIX extension. See {linkstart}PHP documentation{linkend} for more details.') |
|
91 | + )); |
|
92 | + } ?></em> |
|
93 | 93 | |
94 | 94 | </p> |
95 | 95 | </div> |
96 | 96 | \ No newline at end of file |
@@ -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( |