mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 01:24:17 +02:00
Allow specifying external links (bug #3392685)
This commit is contained in:
@@ -185,6 +185,14 @@ username.form['auth[driver]'].onchange();
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/** Get a link to use in select table
|
||||
* @param string raw value of the field
|
||||
* @param array single field returned from fields()
|
||||
* @return string or null to create the default link
|
||||
*/
|
||||
function selectLink($val, $field) {
|
||||
}
|
||||
|
||||
/** Value printed in select table
|
||||
* @param string HTML-escaped value to print
|
||||
* @param string link to foreign key
|
||||
|
@@ -384,9 +384,9 @@ if (!$columns) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$link) {
|
||||
if (is_mail($val)) {
|
||||
$link = "mailto:$val";
|
||||
if (!$link && ($link = $adminer->selectLink($row[$key], $field)) === null) {
|
||||
if (is_mail($row[$key])) {
|
||||
$link = "mailto:$row[$key]";
|
||||
}
|
||||
if ($protocol = is_url($row[$key])) {
|
||||
$link = ($protocol == "http" && $HTTPS
|
||||
|
Reference in New Issue
Block a user