From da9d5f3e49ebacfc7fde3d578f33eef14dd7a66d Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 18 Oct 2010 10:28:03 +0200 Subject: [PATCH 1/9] Release --- adminer/include/version.inc.php | 2 +- changes.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/include/version.inc.php b/adminer/include/version.inc.php index 5daa1441..bb2a83d1 100644 --- a/adminer/include/version.inc.php +++ b/adminer/include/version.inc.php @@ -1,2 +1,2 @@ Date: Mon, 18 Oct 2010 10:34:47 +0200 Subject: [PATCH 2/9] Develop --- adminer/include/version.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/include/version.inc.php b/adminer/include/version.inc.php index bb2a83d1..36986d4f 100644 --- a/adminer/include/version.inc.php +++ b/adminer/include/version.inc.php @@ -1,2 +1,2 @@ Date: Mon, 18 Oct 2010 16:56:10 +0200 Subject: [PATCH 3/9] Maria renamed to Aria --- adminer/indexes.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/indexes.inc.php b/adminer/indexes.inc.php index cb9f5c10..afb91270 100644 --- a/adminer/indexes.inc.php +++ b/adminer/indexes.inc.php @@ -2,7 +2,7 @@ $TABLE = $_GET["indexes"]; $index_types = array("PRIMARY", "UNIQUE", "INDEX"); $table_status = table_status($TABLE); -if (ereg("MyISAM|Maria", $table_status["Engine"])) { +if (eregi("MyISAM|M?aria", $table_status["Engine"])) { $index_types[] = "FULLTEXT"; } $indexes = indexes($TABLE); From d8d419317da4beed141b9c1d381be4b8da6a80bb Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 18 Oct 2010 22:17:43 +0200 Subject: [PATCH 4/9] Last page with empty result (thanks to Frantisek Svoboda) --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 21e8ef48..73c0bc77 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -209,7 +209,7 @@ if (!$columns) { $page = $_GET["page"]; if ($page == "last") { $found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : "")); - $page = floor(($found_rows - 1) / $limit); + $page = floor(max(0, ($found_rows - 1) / $limit); } $query = "SELECT" . limit((intval($limit) && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from, ($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by, ($limit != "" ? intval($limit) : null), ($page ? $limit * $page : 0), "\n"); From 31afb968bcbd5d6b158e0239ca08b3ea6436d068 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 18 Oct 2010 22:17:43 +0200 Subject: [PATCH 5/9] Last page with empty result (thanks to Frantisek Svoboda) --- adminer/select.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 73c0bc77..80aec73e 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -209,7 +209,7 @@ if (!$columns) { $page = $_GET["page"]; if ($page == "last") { $found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : "")); - $page = floor(max(0, ($found_rows - 1) / $limit); + $page = floor(max(0, $found_rows - 1) / $limit); } $query = "SELECT" . limit((intval($limit) && $group && count($group) < count($select) && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . $from, ($where ? "\nWHERE " . implode(" AND ", $where) : "") . $group_by, ($limit != "" ? intval($limit) : null), ($page ? $limit * $page : 0), "\n"); From b50a0fc61578a79b641c92db2cfc8d9755bb8cdf Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 18 Oct 2010 23:09:26 +0200 Subject: [PATCH 6/9] Disable zend.ze1_compatibility_mode (bug #3089645) --- adminer/include/bootstrap.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php index efec0463..e50b79f1 100644 --- a/adminer/include/bootstrap.inc.php +++ b/adminer/include/bootstrap.inc.php @@ -43,6 +43,7 @@ if (function_exists("set_magic_quotes_runtime")) { set_magic_quotes_runtime(false); } @set_time_limit(0); // @ - can be disabled +@ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated include "../adminer/include/lang.inc.php"; include "../adminer/lang/$LANG.inc.php"; From a93bc19108c3b8eed4199309d0fcd5210f2fc46e Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 18 Oct 2010 23:57:39 +0200 Subject: [PATCH 7/9] Create confirm function --- adminer/create.inc.php | 2 +- adminer/database.inc.php | 2 +- adminer/db.inc.php | 2 +- adminer/edit.inc.php | 2 +- adminer/event.inc.php | 2 +- adminer/foreign.inc.php | 2 +- adminer/include/bootstrap.inc.php | 1 - adminer/include/connect.inc.php | 2 +- adminer/include/functions.inc.php | 8 ++++++++ adminer/procedure.inc.php | 2 +- adminer/scheme.inc.php | 2 +- adminer/select.inc.php | 2 +- adminer/sequence.inc.php | 2 +- adminer/trigger.inc.php | 2 +- adminer/type.inc.php | 2 +- adminer/user.inc.php | 2 +- 16 files changed, 22 insertions(+), 15 deletions(-) diff --git a/adminer/create.inc.php b/adminer/create.inc.php index f7a23ea1..fcce1e28 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -164,7 +164,7 @@ document.write('