Comments
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@872 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
c8dd281546
commit
c325cbe02d
|
@ -8,26 +8,32 @@ ob_end_clean();
|
||||||
class Adminer {
|
class Adminer {
|
||||||
|
|
||||||
function name() {
|
function name() {
|
||||||
|
// custom name in title and heading
|
||||||
return 'CDs';
|
return 'CDs';
|
||||||
}
|
}
|
||||||
|
|
||||||
function credentials() {
|
function credentials() {
|
||||||
|
// ODBC user without password on localhost
|
||||||
return array('localhost', 'ODBC', '');
|
return array('localhost', 'ODBC', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function database() {
|
function database() {
|
||||||
|
// will be escaped by Adminer
|
||||||
return 'cds';
|
return 'cds';
|
||||||
}
|
}
|
||||||
|
|
||||||
function login($login, $password) {
|
function login($login, $password) {
|
||||||
|
// username: admin, password: anything
|
||||||
return ($login == 'admin');
|
return ($login == 'admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
function table_name($row) {
|
function table_name($row) {
|
||||||
|
// tables without comments would return empty string and will be ignored by Adminer
|
||||||
return htmlspecialchars($row["Comment"]);
|
return htmlspecialchars($row["Comment"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function field_name($fields, $key) {
|
function field_name($fields, $key) {
|
||||||
|
// fields without comments will be ignored
|
||||||
return htmlspecialchars($fields[$key]["comment"]);
|
return htmlspecialchars($fields[$key]["comment"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue