Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Schema permanent link before mouse move

  • Loading branch information...
commit 989d75886f5c90d69774f1313a48f3eafcec65a3 1 parent 52a67a9
Jakub Vrána authored March 26, 2011

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  adminer/schema.inc.php
5  adminer/schema.inc.php
@@ -5,7 +5,8 @@
5 5
 $table_pos_js = array();
6 6
 // saved in one cookie because there is a limit of 20 cookies per domain
7 7
 $name = "adminer_schema";
8  
-preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~', ($_GET["schema"] ? $_GET["schema"] : $_COOKIE[($_COOKIE["$name-" . DB] ? "$name-" . DB : $name)]), $matches, PREG_SET_ORDER); // $_COOKIE["adminer_schema"] was used before 3.2.0 //! ':' in table name
  8
+$SCHEMA = ($_GET["schema"] ? $_GET["schema"] : $_COOKIE[($_COOKIE["$name-" . DB] ? "$name-" . DB : $name)]); // $_COOKIE["adminer_schema"] was used before 3.2.0 //! ':' in table name
  9
+preg_match_all('~([^:]+):([-0-9.]+)x([-0-9.]+)(_|$)~', $SCHEMA, $matches, PREG_SET_ORDER);
9 10
 foreach ($matches as $i => $match) {
10 11
 	$table_pos[$match[1]] = array($match[2], $match[3]);
11 12
 	$table_pos_js[] = "\n\t'" . js_escape($match[1]) . "': [ $match[2], $match[3] ]";
@@ -103,4 +104,4 @@
103 104
 }
104 105
 ?>
105 106
 </div>
106  
-<p><a href="<?php echo h($_SERVER["REQUEST_URI"]); ?>" id="schema-link"><?php echo lang('Permanent link'); ?></a>
  107
+<p><a href="<?php echo h(ME . "schema=" . urlencode($SCHEMA)); ?>" id="schema-link"><?php echo lang('Permanent link'); ?></a>

0 notes on commit 989d758

Please sign in to comment.
Something went wrong with that request. Please try again.