Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
597e27de
Commit
597e27de
authored
Jan 22, 2021
by
Cédric Anne
Committed by
Johan Cwiklinski
Jan 22, 2021
Browse files
Fix filtering in table listing
parent
d27bdb42
Changes
3
Hide whitespace changes
Inline
Side-by-side
inc/console/migration/utf8mb4command.class.php
View file @
597e27de
...
...
@@ -123,7 +123,7 @@ class Utf8mb4Command extends AbstractCommand {
private
function
upgradeRowFormat
():
void
{
$table_iterator
=
$this
->
db
->
listTables
(
'glpi_%'
,
'glpi
\
_%'
,
[
'row_format'
=>
[
'Compact'
,
'Redundant'
],
]
...
...
inc/dbmysql.class.php
View file @
597e27de
...
...
@@ -595,7 +595,7 @@ class DBmysql {
'FROM'
=>
'information_schema.tables'
,
'WHERE'
=>
[
'information_schema.tables.table_schema'
=>
$this
->
dbdefault
,
'information_schema.tables.table_name'
=>
[
'LIKE'
,
'glpi_%'
],
'information_schema.tables.table_name'
=>
[
'LIKE'
,
'glpi
\
_%'
],
'information_schema.tables.table_type'
=>
'BASE TABLE'
,
[
'NOT'
=>
[
'information_schema.tables.table_collation'
=>
'utf8mb4_unicode_ci'
]],
],
...
...
@@ -623,7 +623,7 @@ class DBmysql {
],
'WHERE'
=>
[
'information_schema.tables.table_schema'
=>
$this
->
dbdefault
,
'information_schema.tables.table_name'
=>
[
'LIKE'
,
'glpi_%'
],
'information_schema.tables.table_name'
=>
[
'LIKE'
,
'glpi
\
_%'
],
'information_schema.tables.table_type'
=>
'BASE TABLE'
,
[
'NOT'
=>
[
'information_schema.columns.collation_name'
=>
null
]],
[
'NOT'
=>
[
'information_schema.columns.collation_name'
=>
'utf8mb4_unicode_ci'
]]
...
...
install/install.php
View file @
597e27de
...
...
@@ -579,7 +579,7 @@ function update1($DBname) {
include_once
(
GLPI_CONFIG_DIR
.
"/config_db.php"
);
global
$DB
;
$DB
=
new
DB
();
if
(
$DB
->
listTables
(
'glpi_%'
,
[
'table_collation'
=>
'utf8mb4_unicode_ci'
])
->
count
()
>
0
)
{
if
(
$DB
->
listTables
(
'glpi
\
_%'
,
[
'table_collation'
=>
'utf8mb4_unicode_ci'
])
->
count
()
>
0
)
{
// Use utf8mb4 charset for update process if at least one table already uses this charset.
if
(
$success
=
DBConnection
::
updateConfigProperty
(
'use_utf8mb4'
,
true
))
{
$DB
->
use_utf8mb4
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment