mirror of
https://github.com/vrana/adminer.git
synced 2025-08-17 12:00:41 +02:00
Pass $field to select_val
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@897 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -109,10 +109,12 @@ function adminer_row_descriptions($rows, $foreign_keys) {
|
||||
/** Value printed in select table
|
||||
* @param string escaped value to print
|
||||
* @param string link to foreign key
|
||||
* @param array single field returned from fields()
|
||||
* @return string
|
||||
*/
|
||||
function adminer_select_val($val, $link) {
|
||||
return call_adminer('select_val', ($link ? "<a href=\"$link\">$val</a>" : $val), $val, $link);
|
||||
function adminer_select_val($val, $link, $field) {
|
||||
$return = ($field["type"] == "char" ? "<code>$val</code>" : $val);
|
||||
return call_adminer('select_val', ($link ? "<a href=\"$link\">$return</a>" : $return), $val, $link);
|
||||
}
|
||||
|
||||
/** Query printed after execution in the message
|
||||
|
@@ -364,11 +364,11 @@ function email_header($header) {
|
||||
return "=?UTF-8?B?" . base64_encode($header) . "?="; //! split long lines
|
||||
}
|
||||
|
||||
function call_adminer($method, $default, $arg1 = null, $arg2 = null) {
|
||||
function call_adminer($method, $default, $arg1 = null, $arg2 = null, $arg3 = null) {
|
||||
// maintains original method name in minification
|
||||
if (method_exists('Adminer', $method)) { // user defined class
|
||||
// can use func_get_args() and call_user_func_array()
|
||||
return Adminer::$method($arg1, $arg2);
|
||||
return Adminer::$method($arg1, $arg2, $arg3);
|
||||
}
|
||||
return $default; //! $default is evaluated even if not neccessary
|
||||
}
|
||||
|
Reference in New Issue
Block a user