]> git.joonet.de Git - adminer.git/commitdiff
Simpler URL
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 9 Jul 2007 14:48:46 +0000 (14:48 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 9 Jul 2007 14:48:46 +0000 (14:48 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@83 7c3ca157-0c34-0410-bff1-cbf682f78f5c

index.php
table.inc.php

index 0263c4ae669a62d3080cdee66cd7e616904b5a77..8d2fce9f1cc93cbcd65d1338a9be30d848915d72 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
 <?php
-// Copyright 2007 Jakub Vrana http://phpminadmin.sourceforge.net, licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
+// Copyright 2007 Jakub Vrana http://phpminadmin.sourceforge.net, licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
 
 session_start();
 error_reporting(E_ALL & ~E_NOTICE);
@@ -27,6 +27,12 @@ if (isset($_GET["dump"])) {
                        $error = (in_array($_POST["token"], (array) $TOKENS) ? "" : lang('Invalid CSRF token. Send the form again.'));
                }
                $token = ($_POST && !$error ? $_POST["token"] : token());
+               if (isset($_GET["default"])) {
+                       $_GET["edit"] = $_GET["default"];
+               }
+               if (isset($_GET["callf"])) {
+                       $_GET["call"] = $_GET["callf"];
+               }
                if (isset($_GET["sql"])) {
                        include "./sql.inc.php";
                } elseif (isset($_GET["edit"])) {
@@ -51,7 +57,7 @@ if (isset($_GET["dump"])) {
                                        while ($row = mysql_fetch_assoc($result)) {
                                                echo "<tr valign='top'>";
                                                echo "<th>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</th>";
-                                               echo '<td><a href="' . htmlspecialchars($SELF) . 'call=' . urlencode($row["ROUTINE_NAME"]) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? '&amp;type=FUNCTION' : '') . '">' . htmlspecialchars($row["ROUTINE_NAME"]) . '</a></td>';
+                                               echo '<td><a href="' . htmlspecialchars($SELF) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'callf' : 'call') . '=' . urlencode($row["ROUTINE_NAME"]) . '">' . htmlspecialchars($row["ROUTINE_NAME"]) . '</a></td>';
                                                echo "<td><pre>" . htmlspecialchars($row["ROUTINE_DEFINITION"]) . "</pre></td>";
                                                echo "</tr>\n";
                                        }
index b4e04e7117ad9d84f03fd43633197b5cdbcc07a3..d97eef4bab349bf7801c4ce6ad6562abaeaaa29a 100644 (file)
@@ -18,7 +18,7 @@ if (!$result) {
        
        echo "<p>";
        echo '<a href="' . htmlspecialchars($SELF) . 'create=' . urlencode($_GET["table"]) . '">' . lang('Alter table') . '</a>';
-       echo ($auto_increment_only ? '' : ' <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET["table"]) . '&amp;default=">' . lang('Default values') . '</a>');
+       echo ($auto_increment_only ? '' : ' <a href="' . htmlspecialchars($SELF) . 'default=' . urlencode($_GET["table"]) . '">' . lang('Default values') . '</a>');
        echo "</p>\n";
        
        echo "<h3>" . lang('Indexes') . "</h3>\n";