diff --git a/adminer/drivers/elastic.inc.php b/adminer/drivers/elastic.inc.php index f406ed3f..413a67b1 100644 --- a/adminer/drivers/elastic.inc.php +++ b/adminer/drivers/elastic.inc.php @@ -105,7 +105,7 @@ if (isset($_GET["elastic"])) { class Min_Driver extends Min_SQL { - function select($table, $select, $where, $group, $order, $limit, $page, $print = false) { + function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { global $adminer; $data = array(); $query = "$table/_search"; diff --git a/adminer/drivers/mongo.inc.php b/adminer/drivers/mongo.inc.php index ba9d67e0..89016112 100644 --- a/adminer/drivers/mongo.inc.php +++ b/adminer/drivers/mongo.inc.php @@ -120,7 +120,7 @@ if (isset($_GET["mongo"])) { return ($value === null ? $value : parent::quote($value)); } - function select($table, $select, $where, $group, $order, $limit, $page, $print = false) { + function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { $select = ($select == array("*") ? array() : array_fill_keys($select, true) diff --git a/adminer/drivers/simpledb.inc.php b/adminer/drivers/simpledb.inc.php index fec66c00..be1c28bb 100644 --- a/adminer/drivers/simpledb.inc.php +++ b/adminer/drivers/simpledb.inc.php @@ -150,7 +150,7 @@ if (isset($_GET["simpledb"])) { return $return; } - function select($table, $select, $where, $group, $order, $limit, $page, $print = false) { + function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { global $connection; $connection->next = $_GET["next"]; $return = parent::select($table, $select, $where, $group, $order, $limit, $page, $print); diff --git a/adminer/edit.inc.php b/adminer/edit.inc.php index 4e7be3cd..f7d8cea4 100644 --- a/adminer/edit.inc.php +++ b/adminer/edit.inc.php @@ -89,7 +89,7 @@ if ($_POST["save"]) { $select = array("*"); } if ($select) { - $result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1), 0); + $result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1)); $row = $result->fetch_assoc(); if (!$row) { // MySQLi returns null $row = false; @@ -102,7 +102,7 @@ if ($_POST["save"]) { if (!support("table") && !$fields) { if (!$where) { // insert - $result = $driver->select($TABLE, array("*"), $where, array("*"), array(), 1, 0); + $result = $driver->select($TABLE, array("*"), $where, array("*")); $row = ($result ? $result->fetch_assoc() : false); if (!$row) { $row = array($driver->primary => ""); diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index 7ea563e9..e6b50f8d 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -29,7 +29,7 @@ * @param bool whether to print the query * @return Min_Result */ - function select($table, $select, $where, $group, $order, $limit, $page, $print = false) { + function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { global $adminer, $jush; $is_group = (count($group) < count($select)); $query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page); diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 2f1965e4..a75deb45 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -41,7 +41,7 @@ if ($_GET["val"] && is_ajax()) { $as = convert_field($fields[key($row)]); $select = array($as ? $as : idf_escape(key($row))); $where[] = where_check($unique_idf, $fields); - $return = $driver->select($TABLE, $select, $where, $select, array(), 1, 0); + $return = $driver->select($TABLE, $select, $where, $select); if ($return) { echo reset($return->fetch_row()); }