mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 00:54:08 +02:00
IMAP: Export
This commit is contained in:
@@ -115,10 +115,12 @@ if (isset($_GET["imap"])) {
|
|||||||
class Result {
|
class Result {
|
||||||
public $num_rows;
|
public $num_rows;
|
||||||
private $result;
|
private $result;
|
||||||
|
private $fields;
|
||||||
|
|
||||||
function __construct($result) {
|
function __construct($result) {
|
||||||
$this->result = $result;
|
$this->result = $result;
|
||||||
$this->num_rows = count($result);
|
$this->num_rows = count($result);
|
||||||
|
$this->fields = ($result ? array_keys(reset($result)) : array());
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetch_assoc() {
|
function fetch_assoc() {
|
||||||
@@ -131,6 +133,12 @@ if (isset($_GET["imap"])) {
|
|||||||
$row = $this->fetch_assoc();
|
$row = $this->fetch_assoc();
|
||||||
return ($row ? array_values($row) : false);
|
return ($row ? array_values($row) : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fetch_field() {
|
||||||
|
$field = current($this->fields);
|
||||||
|
next($this->fields);
|
||||||
|
return ($field != '' ? (object) array('name' => $field) : false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user