projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3328f54
)
Only return each index once in MysqlDatabaseEditor::getIndices()
author
Matthias Schmidt
<gravatronics@live.com>
Sat, 17 Aug 2019 11:33:56 +0000
(13:33 +0200)
committer
Matthias Schmidt
<gravatronics@live.com>
Sat, 17 Aug 2019 11:33:56 +0000
(13:33 +0200)
Close #3012
wcfsetup/install/files/lib/system/database/editor/DatabaseEditor.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/system/database/editor/DatabaseEditor.class.php
b/wcfsetup/install/files/lib/system/database/editor/DatabaseEditor.class.php
index 3592bd0e9770da90444c109b759eca9dbec51f44..393c984a17f37ef8964a90f33d4ed5b08e974fc4 100644
(file)
--- a/
wcfsetup/install/files/lib/system/database/editor/DatabaseEditor.class.php
+++ b/
wcfsetup/install/files/lib/system/database/editor/DatabaseEditor.class.php
@@
-42,7
+42,7
@@
abstract class DatabaseEditor {
abstract public function getColumns($tableName);
/**
- * Returns the indices of a table.
+ * Returns the
names of
indices of a table.
*
* @param string $tableName
* @return array $indices
diff --git
a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
index 5779a23b5bfa57c76815bb09fc76a936d681cba0..91e92076ea1d45178b01e7bc3fd69209f03ad1c1 100644
(file)
--- a/
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
+++ b/
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
@@
-103,7
+103,7
@@
class MySQLDatabaseEditor extends DatabaseEditor {
$indices[] = $row['Key_name'];
}
- return
$indices
;
+ return
array_unique($indices)
;
}
/**