]> git.joonet.de Git - adminer.git/commitdiff
SQLite: Display all rows of variable values
authorJakub Vrana <jakub@vrana.cz>
Wed, 26 Feb 2025 09:46:46 +0000 (10:46 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 26 Feb 2025 11:20:37 +0000 (12:20 +0100)
adminer/drivers/sqlite.inc.php
adminer/variables.inc.php
changes.txt

index f206c02335cc0099126ecb8bfd50170bb6d48d3f..d5fb44a7840961d0c1db0f1b8fd088848c069511 100644 (file)
@@ -756,10 +756,14 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
        }
 
        function show_variables() {
-               global $connection;
                $return = array();
                foreach (get_rows("PRAGMA pragma_list") as $row) {
-                       $return[$row["name"]] = $connection->result("PRAGMA $row[name]");
+                       $name = $row["name"];
+                       if ($name != "pragma_list" && $name != "compile_options") {
+                               foreach (get_rows("PRAGMA $name") as $row) {
+                                       $return[$name] .= implode(", ", $row) . "\n";
+                               }
+                       }
                }
                return $return;
        }
index 46604f8b22d32b87d9074e51b12e84a690e4df50..16c147982d142d4b107f48455f0c3e8ef6769c28 100644 (file)
@@ -10,7 +10,7 @@ if (!$variables) {
        foreach ($variables as $key => $val) {
                echo "<tr>";
                echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
-               echo "<td>" . h($val);
+               echo "<td>" . nl_br(h($val));
        }
        echo "</table>\n";
 }
index 576139b853d7871cc42c7d49d658ecdcc5949afa..08adefbb351a3ffac0e11043b302507dff77f887 100644 (file)
@@ -1,5 +1,6 @@
 Adminer-4.17.2-dev:
 SQLite: Add command Check tables
+SQLite: Display all rows of variable values
 MongoDB: Remove support for deprecated extension mongo
 
 Adminer-4.17.1 (released 2025-02-25):