mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Elastic: Fix types
This commit is contained in:
@@ -328,7 +328,7 @@ function convert_fields(array $columns, array $fields, array $select = array()):
|
|||||||
/** Set cookie valid on current path
|
/** Set cookie valid on current path
|
||||||
* @param int $lifetime number of seconds, 0 for session cookie, 2592000 - 30 days
|
* @param int $lifetime number of seconds, 0 for session cookie, 2592000 - 30 days
|
||||||
*/
|
*/
|
||||||
function cookie(string $name, string $value, int $lifetime = 2592000): void {
|
function cookie(string $name, ?string $value, int $lifetime = 2592000): void {
|
||||||
global $HTTPS;
|
global $HTTPS;
|
||||||
header(
|
header(
|
||||||
"Set-Cookie: $name=" . urlencode($value)
|
"Set-Cookie: $name=" . urlencode($value)
|
||||||
@@ -491,8 +491,10 @@ function apply_queries(string $query, array $tables, $escape = 'Adminer\table'):
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Redirect by remembered queries */
|
/** Redirect by remembered queries
|
||||||
function queries_redirect(string $location, string $message, bool $redirect): bool {
|
* @param bool $redirect
|
||||||
|
*/
|
||||||
|
function queries_redirect(string $location, string $message, $redirect): bool {
|
||||||
$queries = implode("\n", Queries::$queries);
|
$queries = implode("\n", Queries::$queries);
|
||||||
$time = format_time(Queries::$start);
|
$time = format_time(Queries::$start);
|
||||||
return query_redirect($queries, $location, $message, $redirect, false, !$redirect, $time);
|
return query_redirect($queries, $location, $message, $redirect, false, !$redirect, $time);
|
||||||
|
@@ -508,10 +508,14 @@ if (isset($_GET["elastic"])) {
|
|||||||
function found_rows($table_status, $where) {
|
function found_rows($table_status, $where) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function auto_increment(): string {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
/** Alter type
|
/** Alter type
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function alter_table(array $table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
function alter_table(string $table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||||
$properties = array();
|
$properties = array();
|
||||||
foreach ($fields as $f) {
|
foreach ($fields as $f) {
|
||||||
$field_name = trim($f[1][0]);
|
$field_name = trim($f[1][0]);
|
||||||
|
Reference in New Issue
Block a user