## Adminer dev
- PostgreSQL: Display auto_increment of inserted rows
+- PostgreSQL: Display description of system variables
- CSS: Sticky table headers (bug #918)
- IMAP: New plugin driver created for fun
}
/** Get server variables
- * @return array [$name => $value]
+ * @return array [[$name, $value]]
*/
function show_variables() {
- return get_key_vals("SHOW VARIABLES");
+ return get_rows("SHOW VARIABLES");
+ }
+
+ /** Get status variables
+ * @return array [[$name, $value]]
+ */
+ function show_status() {
+ return get_rows("SHOW STATUS");
}
/** Get process list
return get_rows("SHOW FULL PROCESSLIST");
}
- /** Get status variables
- * @return array [$name => $value]
- */
- function show_status() {
- return get_key_vals("SHOW STATUS");
- }
-
/** Convert field in select and edit
* @param array one element from fields()
* @return string
}
function show_variables() {
- return get_key_vals('SELECT name, display_value FROM v$parameter');
+ return get_rows('SELECT name, display_value FROM v$parameter');
+ }
+
+ function show_status() {
+ $return = array();
+ $rows = get_rows('SELECT * FROM v$instance');
+ foreach (reset($rows) as $key => $val) {
+ $return[] = array($key, $val);
+ }
+ return $return;
}
function process_list() {
');
}
- function show_status() {
- $rows = get_rows('SELECT * FROM v$instance');
- return reset($rows);
- }
-
function convert_field($field) {
}
}
function show_variables() {
- return get_key_vals("SHOW ALL");
+ return get_rows("SHOW ALL");
}
function process_list() {
foreach (get_rows("PRAGMA pragma_list") as $row) {
$name = $row["name"];
if ($name != "pragma_list" && $name != "compile_options") {
+ $return[$name] = array($name, '');
foreach (get_rows("PRAGMA $name") as $row) {
- $return[$name] .= implode(", ", $row) . "\n";
+ $return[$name][1] .= implode(", ", $row) . "\n";
}
}
}
function show_status() {
$return = array();
foreach (get_vals("PRAGMA compile_options") as $option) {
- list($key, $val) = explode("=", $option, 2);
- $return[$key] = $val;
+ $return[] = explode("=", $option, 2);
}
return $return;
}
echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
echo "<table>\n";
- foreach ($variables as $key => $val) {
+ foreach ($variables as $row) {
echo "<tr>";
+ $key = array_shift($row);
echo "<th><code class='jush-" . JUSH . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
- echo "<td>" . nl_br(h($val));
+ foreach ($row as $val) {
+ echo "<td>" . nl_br(h($val));
+ }
}
echo "</table>\n";
}