Diff of /adminer/include/functions.inc.php [6591d4] .. [8be29a]  Maximize  Restore

Switch to side-by-side view

--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -418,15 +418,17 @@
 * @param string
 * @param string
 * @param string
-* @return string
-*/
-function auth_url($driver, $server, $username) {
+* @param string
+* @return string
+*/
+function auth_url($driver, $server, $username, $db = null) {
 	global $drivers;
-	preg_match('~([^?]*)\\??(.*)~', remove_from_uri(implode("|", array_keys($drivers)) . "|username|" . session_name()), $match);
+	preg_match('~([^?]*)\\??(.*)~', remove_from_uri(implode("|", array_keys($drivers)) . "|username|" . ($db !== null ? "db|" : "") . session_name()), $match);
 	return "$match[1]?"
 		. (sid() ? SID . "&" : "")
 		. ($driver != "server" || $server != "" ? urlencode($driver) . "=" . urlencode($server) . "&" : "")
 		. "username=" . urlencode($username)
+		. ($db != "" ? "&db=" . urlencode($db) : "")
 		. ($match[2] ? "&$match[2]" : "")
 	;
 }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks