From ab38ea5b1e6ae6bfb8fb6d351aa527493a88292e Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Mon, 1 Jun 2009 13:06:11 +0000 Subject: [PATCH] Rename JavaScript functions git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@638 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- dump.inc.php | 12 ++++++------ functions.js | 26 +++++++------------------- include/connect.inc.php | 2 +- index.php | 4 ++-- 4 files changed, 16 insertions(+), 28 deletions(-) diff --git a/dump.inc.php b/dump.inc.php index 98a8db0a..88d3c204 100644 --- a/dump.inc.php +++ b/dump.inc.php @@ -154,10 +154,10 @@ echo "" . lang('Data') . "" . lang('Database') . "\n"; + echo "\n\n"; foreach (get_databases() as $db) { if ($db != "information_schema" || $dbh->server_info < 5) { - echo '\n"; + echo '\n"; } } echo "
\n"; @@ -166,18 +166,18 @@ if (!strlen($_GET["db"])) { if (strlen($_GET["db"])) { $checked = (strlen($_GET["dump"]) ? "" : " checked='checked'"); echo "\n"; - echo ""; - echo ""; + echo ""; + echo ""; echo "\n"; $views = ""; $result = $dbh->query("SHOW TABLE STATUS"); while ($row = $result->fetch_assoc()) { $checked = (strlen($_GET["dump"]) && $row["Name"] != $_GET["dump"] ? '' : " checked='checked'"); - $print = '"; + $print = '"; if (!$row["Engine"]) { $views .= "$print\n"; } else { - echo "$print\n"; + echo "$print\n"; } } echo "$views
\n"; diff --git a/functions.js b/functions.js index 4c8d4510..0fb94e6d 100644 --- a/functions.js +++ b/functions.js @@ -6,7 +6,7 @@ function toggle(id) { return true; } -function check_version(version) { +function verify_version(version) { document.cookie = 'phpMinAdmin_version=0'; var script = document.createElement('script'); script.src = 'http://www.phpminadmin.net/version.php?version=' + version; @@ -29,15 +29,19 @@ function load_jush() { document.body.appendChild(script); } -function tables_check(el) { +function form_check(el, name) { var elems = el.form.elements; for (var i=0; i < elems.length; i++) { - if (elems[i].name == 'tables[]') { + if (name.test(elems[i].name)) { elems[i].checked = el.checked; } } } +function form_uncheck(id) { + document.getElementById(id).checked = false; +} + function where_change(op) { @@ -253,19 +257,3 @@ function schema_mouseup(ev) { document.cookie = 'schema=' + encodeURIComponent(s.substr(1)) + '; expires=' + date + '; path=' + location.pathname + location.search; } } - - - -function dump_check(el, name) { - var inputs = el.form.getElementsByTagName('input'); - for (var i=0; i < inputs.length; i++) { - if (name.test(inputs[i].name)) { - inputs[i].checked = el.checked; - } - } - return true; -} - -function dump_uncheck(id) { - document.getElementById(id).checked = false; -} diff --git a/include/connect.inc.php b/include/connect.inc.php index 20b083d1..222304e8 100644 --- a/include/connect.inc.php +++ b/include/connect.inc.php @@ -14,7 +14,7 @@ function connect_error() { ?> \n"; echo "\n"; - echo '\n"; + echo '\n"; while ($row = $result->fetch_assoc()) { table_comment($row); - echo '
' . lang('Table') . '' . lang('Engine') . '' . lang('Comment') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . "
' . lang('Table') . '' . lang('Engine') . '' . lang('Comment') . '' . lang('Collation') . '' . lang('Data Length') . '' . lang('Index Length') . '' . lang('Data Free') . '' . lang('Auto Increment') . '' . lang('Rows') . "
' . (isset($row["Rows"]) ? '' . htmlspecialchars($row["Name"]) . "$row[Engine]" . (strlen(trim($row["Comment"])) ? htmlspecialchars($row["Comment"]) : " ") . "$row[Collation]" : ' ' . htmlspecialchars($row["Name"]) . '' . lang('View') . ''); + echo '
' . (isset($row["Rows"]) ? '' . htmlspecialchars($row["Name"]) . "$row[Engine]" . (strlen(trim($row["Comment"])) ? htmlspecialchars($row["Comment"]) : " ") . "$row[Collation]" : ' ' . htmlspecialchars($row["Name"]) . '' . lang('View') . ''); foreach ((isset($row["Rows"]) ? array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") : array()) as $key => $link) { $val = number_format($row[$key], 0, '.', lang(',')); echo '' . (strlen($row[$key]) ? '' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val) . '' : ' ');