PDO: Support binary fields download

This commit is contained in:
Jakub Vrana 2018-02-20 22:31:49 +01:00
parent 5b359263eb
commit 7b35ebd82e
3 changed files with 5 additions and 9 deletions

View file

@ -155,10 +155,6 @@ if (isset($_GET["pgsql"])) {
return ($adminer->database() == $database); return ($adminer->database() == $database);
} }
function value($val, $field) {
return $val;
}
function quoteBinary($s) { function quoteBinary($s) {
return q($s); return q($s);
} }
@ -204,10 +200,6 @@ if (isset($_GET["pgsql"])) {
); );
} }
function value($val, $field) {
return $this->_conn->value($val, $field);
}
function quoteBinary($s) { function quoteBinary($s) {
return $this->_conn->quoteBinary($s); return $this->_conn->quoteBinary($s);
} }

View file

@ -129,7 +129,10 @@
* @return string * @return string
*/ */
function value($val, $field) { function value($val, $field) {
return $val; return (method_exists($this->_conn, 'value')
? $this->_conn->value($val, $field)
: (is_resource($val) ? stream_get_contents($val) : $val)
);
} }
/** Quote binary string /** Quote binary string

View file

@ -1,4 +1,5 @@
Adminer 4.6.3-dev: Adminer 4.6.3-dev:
PDO: Support binary fields download
Adminer 4.6.2 (released 2018-02-20): Adminer 4.6.2 (released 2018-02-20):
Semi-transparent border on table actions Semi-transparent border on table actions