mirror of
https://github.com/vrana/adminer.git
synced 2025-08-11 09:04:02 +02:00
IMAP: Export
This commit is contained in:
@@ -115,10 +115,12 @@ if (isset($_GET["imap"])) {
|
||||
class Result {
|
||||
public $num_rows;
|
||||
private $result;
|
||||
private $fields;
|
||||
|
||||
function __construct($result) {
|
||||
$this->result = $result;
|
||||
$this->num_rows = count($result);
|
||||
$this->fields = ($result ? array_keys(reset($result)) : array());
|
||||
}
|
||||
|
||||
function fetch_assoc() {
|
||||
@@ -131,6 +133,12 @@ if (isset($_GET["imap"])) {
|
||||
$row = $this->fetch_assoc();
|
||||
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