You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @license GNU AGPL version 3 or any later version
11
+
*
12
+
* This program is free software: you can redistribute it and/or modify
13
+
* it under the terms of the GNU Affero General Public License as
14
+
* published by the Free Software Foundation, either version 3 of the
15
+
* License, or (at your option) any later version.
16
+
*
17
+
* This program is distributed in the hope that it will be useful,
18
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+
* GNU Affero General Public License for more details.
21
+
*
22
+
* You should have received a copy of the GNU Affero General Public License
23
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
24
+
*
25
+
*/
26
+
namespaceOCA\Settings\SetupChecks;
27
+
28
+
useOCP\IConfig;
29
+
useOCP\IL10N;
30
+
useOCP\IURLGenerator;
31
+
useOCP\SetupCheck\ISetupCheck;
32
+
useOCP\SetupCheck\SetupResult;
33
+
34
+
class MysqlUnicodeSupport implements ISetupCheck {
35
+
publicfunction__construct(
36
+
privateIL10N$l10n,
37
+
privateIConfig$config,
38
+
privateIURLGenerator$urlGenerator,
39
+
) {
40
+
}
41
+
42
+
publicfunctiongetName(): string {
43
+
return$this->l10n->t('MySQL unicode support');
44
+
}
45
+
46
+
publicfunctiongetCategory(): string {
47
+
return'database';
48
+
}
49
+
50
+
publicfunctionrun(): SetupResult {
51
+
if ($this->config->getSystemValueString('dbtype') !== 'mysql') {
52
+
return SetupResult::success($this->l10n->t('You are not using MySQL'));
53
+
}
54
+
if ($this->config->getSystemValueBool('mysql.utf8mb4', false)) {
55
+
return SetupResult::success($this->l10n->t('MySQL is used as database and does support 4-byte characters'));
56
+
} else {
57
+
return SetupResult::warning(
58
+
$this->l10n->t('MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL.'),
Copy file name to clipboardExpand all lines: core/js/setupchecks.js
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -189,14 +189,6 @@
189
189
});
190
190
}
191
191
192
-
if(data.isMysqlUsedWithoutUTF8MB4){
193
-
messages.push({
194
-
msg: t('core','MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read {linkstart}the documentation page about this ↗{linkend}.')
msg: t('core','This instance uses an S3 based object store as primary storage. The uploaded files are stored temporarily on the server and thus it is recommended to have 50 GB of free space available in the temp directory of PHP. Check the logs for full details about the path and the available space. To improve this please change the temporary directory in the php.ini or make more space available in that path.'),
msg: 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read <a target="_blank" rel="noreferrer noopener" class="external" href="https://docs.example.org/admin-mysql-utf8mb4">the documentation page about this ↗</a>.',
467
-
type: OC.SetupChecks.MESSAGE_TYPE_WARNING
468
-
}]);
469
-
done();
470
-
});
471
-
});
472
-
473
433
// THe following test is invalid as the code in core/js/setupchecks.js is calling
474
434
// window.location.protocol which always return http during tests
475
435
// if there is a way to trick window.location.protocol during test, then we could re-activate it
0 commit comments