diff --git a/adminer/schema.inc.php b/adminer/schema.inc.php index 1a7e0576..fb42af41 100644 --- a/adminer/schema.inc.php +++ b/adminer/schema.inc.php @@ -4,7 +4,7 @@ page_header(lang('Database schema'), "", array(), DB); $table_pos = array(); $table_pos_js = array(); // saved in one cookie because there is a limit of 20 cookies per domain -preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~', $_COOKIE["adminer_schema"], $matches, PREG_SET_ORDER); //! ':' in table name +preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~', ($_GET["schema"] ? $_GET["schema"] : $_COOKIE["adminer_schema"]), $matches, PREG_SET_ORDER); //! ':' in table name foreach ($matches as $i => $match) { $table_pos[$match[1]] = array($match[2], $match[3]); $table_pos_js[] = "\n\t'" . js_escape($match[1]) . "': [ $match[2], $match[3] ]"; @@ -100,3 +100,4 @@ foreach ($schema as $name => $table) { } ?> +

" id="schema-link"># diff --git a/adminer/static/editing.js b/adminer/static/editing.js index 15994c50..9d4b9446 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -400,6 +400,9 @@ function schemaMouseup(ev) { for (var key in tablePos) { s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000; } - cookie('adminer_schema=' + encodeURIComponent(s.substr(1)), 30, '; path="' + location.pathname + location.search + '"'); + s = encodeURIComponent(s.substr(1)); + var link = document.getElementById('schema-link'); + link.href = link.href.replace(/[^=]+$/, '') + s; + cookie('adminer_schema=' + s, 30, '; path="' + location.pathname + location.search + '"'); } } diff --git a/changes.txt b/changes.txt index 378d42fa..9cbf81df 100644 --- a/changes.txt +++ b/changes.txt @@ -1,10 +1,13 @@ Adminer 3.2.0-dev: Get long texts and slow information by AJAX All links and some forms by AJAX in browsers with support for history.pushState +Permanent link in schema +Display total time in show only errors mode in SQL command History: edit all MS SQL: auto primary and foreign key SQLite: display 0 Create table default data type: int +Work without session.use_cookies (bug #3138640) Portuguese translation Adminer 3.1.0 (released 2010-11-16): diff --git a/todo.txt b/todo.txt index 680c84c7..d569ef0e 100644 --- a/todo.txt +++ b/todo.txt @@ -8,8 +8,8 @@ Shift-click in checkboxes to select range Export by GET parameters Only first part of big BZ2 export is readable, files are missing in TAR Auto-refresh processlist (thanks to Jan Garaj) -Save schema layout to #hash in URL Double click in select - Esc to abort editation +Draggable columns in alter table (thanks to Michal Manak) ? Filter by value in row under in select ? Column and table names auto-completition in SQL textarea ? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, aliasing of $connection->query can save 24 B, JS Closure compiler can save 2 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB