1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 09:04:02 +02:00

IMAP: Export

This commit is contained in:
Jakub Vrana
2025-03-18 14:05:51 +01:00
parent 16989a736c
commit 655cca0872

View File

@@ -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);
}
}
}