]> git.joonet.de Git - adminer.git/commitdiff
Add namespace to routine call
authorGargaj <gargaj@conspiracy.hu>
Sat, 19 Sep 2015 21:24:09 +0000 (23:24 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sun, 19 Feb 2017 08:53:51 +0000 (09:53 +0100)
MSSQL is picky about this, shouldn't affect the drivers that don't use namespaces.

adminer/call.inc.php

index 095925446210dcb8ed8d863a14564c57f68e9471..befd36c192997019918fa283ab37b31523fe16c1 100644 (file)
@@ -29,7 +29,7 @@ if (!$error && $_POST) {
                $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
        }
        
-       $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")";
+       $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . (isset($_GET["ns"]) ? idf_escape($_GET["ns"]) . "." : "" ) . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")";
        echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
        
        if (!$connection->multi_query($query)) {