-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathtable-indexes-structure.php
More file actions
74 lines (71 loc) · 2.29 KB
/
Copy pathtable-indexes-structure.php
File metadata and controls
74 lines (71 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/** Expanded table indexes structure output
* @link https://www.adminer.org/plugins/#use
* @author Matthew Gamble, https://www.matthewgamble.net/
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerTableIndexesStructure extends Adminer\Plugin {
function tableIndexesPrint($indexes, $tableStatus): bool {
echo "<table>\n";
echo "<thead><tr><th>" . $this->lang('Name') . "<th>" . $this->lang('Type') . "<th>" . $this->lang('Algorithm') . "<th>" . $this->lang('Columns') . "<tbody>\n";
foreach ($indexes as $name => $index) {
echo "<tr><th>" . Adminer\h($name) . "<td>" . Adminer\h($index["type"]) . "<td>" . Adminer\h($index["algorithm"]);
ksort($index["columns"]); // enforce correct columns order
$print = array();
foreach ($index["columns"] as $key => $val) {
$print[] = "<i>" . Adminer\h($val) . "</i>"
. ($index["lengths"][$key] ? "(" . Adminer\h($index["lengths"][$key]) . ")" : "")
. ($index["descs"][$key] ? " DESC" : "")
;
}
echo "<td>" . implode(", ", $print) . "\n";
}
echo "</table>\n";
return true;
}
protected $translations = array(
'cs' => array(
'' => 'Rozšířené informace o indexech',
'Name' => 'Název',
'Type' => 'Typ',
'Algorithm' => 'Algoritmus',
'Columns' => 'Sloupce',
),
'de' => array(
'' => 'Erweiterte Ausgabe der Tabellenindize',
'Name' => 'Name',
'Type' => 'Typ',
'Algorithm' => 'Algorithmus',
'Columns' => 'Spalten',
),
'pl' => array(
'' => 'Rozszerzona tabela wyników struktury indeksów',
'Name' => 'Nazwa',
'Type' => 'Typ',
'Algorithm' => 'Algorytm',
'Columns' => 'Kolumny',
),
'ro' => array(
'' => 'Ieșirea expandată a structurii indecsilor tabelului',
'Name' => 'Titlu',
'Type' => 'Tip',
'Algorithm' => 'Algoritm',
'Columns' => 'Coloane',
),
'ja' => array(
'' => 'テーブルのインデックス構造を拡張表示',
'Name' => '名称',
'Type' => '型',
'Algorithm' => 'アルゴリズム',
'Columns' => 'カラム',
),
'hr' => array(
'' => 'Prošireni prikaz indeksa tablice',
'Name' => 'Naziv',
'Type' => 'Tip',
'Algorithm' => 'Algoritam',
'Columns' => 'Stupci',
),
);
}