Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
commit
bdc08e5238
@ -9890,6 +9890,16 @@ parameters:
|
||||
count: 1
|
||||
path: src/Navigation/Nodes/NodeDatabase.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, 'strnatcasecmp' given\\.$#"
|
||||
count: 3
|
||||
path: src/Navigation/Nodes/NodeDatabase.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(string\\|null, string\\|null\\)\\: int, 'strnatcasecmp' given\\.$#"
|
||||
count: 3
|
||||
path: src/Navigation/Nodes/NodeDatabase.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$realName on PhpMyAdmin\\\\Navigation\\\\Nodes\\\\Node\\|false\\.$#"
|
||||
count: 1
|
||||
|
||||
@ -7527,6 +7527,11 @@
|
||||
<code>DatabaseInterface::getInstance()</code>
|
||||
<code>DatabaseInterface::getInstance()</code>
|
||||
</DeprecatedMethod>
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
</InvalidArgument>
|
||||
<InvalidReturnStatement>
|
||||
<code><![CDATA[$dbi->queryAndGetNumRows($query)]]></code>
|
||||
<code><![CDATA[$dbi->queryAndGetNumRows($query)]]></code>
|
||||
@ -7539,6 +7544,11 @@
|
||||
<code>int</code>
|
||||
<code>int</code>
|
||||
</InvalidReturnType>
|
||||
<MixedArgumentTypeCoercion>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
<code><![CDATA[usort($retval, 'strnatcasecmp')]]></code>
|
||||
</MixedArgumentTypeCoercion>
|
||||
</file>
|
||||
<file src="src/Navigation/Nodes/NodeDatabaseChild.php">
|
||||
<PossiblyInvalidPropertyFetch>
|
||||
|
||||
@ -18,8 +18,10 @@ use PhpMyAdmin\Url;
|
||||
use PhpMyAdmin\Util;
|
||||
|
||||
use function __;
|
||||
use function array_slice;
|
||||
use function in_array;
|
||||
use function substr;
|
||||
use function usort;
|
||||
|
||||
/**
|
||||
* Represents a database node in the navigation tree
|
||||
@ -350,9 +352,13 @@ class NodeDatabase extends Node
|
||||
}
|
||||
|
||||
$query .= 'ORDER BY `TABLE_NAME` ASC ';
|
||||
$query .= 'LIMIT ' . $pos . ', ' . $maxItems;
|
||||
$retval = $dbi->fetchResult($query);
|
||||
|
||||
return $dbi->fetchResult($query);
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
$query = ' SHOW FULL TABLES FROM ';
|
||||
@ -368,20 +374,14 @@ class NodeDatabase extends Node
|
||||
$retval = [];
|
||||
$handle = $dbi->tryQuery($query);
|
||||
if ($handle !== false) {
|
||||
$count = 0;
|
||||
if ($handle->seek($pos)) {
|
||||
while ($arr = $handle->fetchRow()) {
|
||||
if ($count >= $maxItems) {
|
||||
break;
|
||||
}
|
||||
|
||||
$retval[] = $arr[0];
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
$retval = $handle->fetchAllColumn();
|
||||
}
|
||||
|
||||
return $retval;
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,9 +438,13 @@ class NodeDatabase extends Node
|
||||
}
|
||||
|
||||
$query .= 'ORDER BY `ROUTINE_NAME` ASC ';
|
||||
$query .= 'LIMIT ' . $pos . ', ' . $maxItems;
|
||||
$retval = $dbi->fetchResult($query);
|
||||
|
||||
return $dbi->fetchResult($query);
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
$query = 'SHOW ' . $routineType . ' STATUS WHERE `Db`=' . $dbi->quoteString($this->realName) . ' ';
|
||||
@ -454,20 +458,16 @@ class NodeDatabase extends Node
|
||||
$retval = [];
|
||||
$handle = $dbi->tryQuery($query);
|
||||
if ($handle !== false) {
|
||||
$count = 0;
|
||||
if ($handle->seek($pos)) {
|
||||
while ($arr = $handle->fetchAssoc()) {
|
||||
if ($count >= $maxItems) {
|
||||
break;
|
||||
}
|
||||
|
||||
$retval[] = $arr['Name'];
|
||||
$count++;
|
||||
}
|
||||
while ($arr = $handle->fetchAssoc()) {
|
||||
$retval[] = $arr['Name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $retval;
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -522,9 +522,13 @@ class NodeDatabase extends Node
|
||||
}
|
||||
|
||||
$query .= 'ORDER BY `EVENT_NAME` ASC ';
|
||||
$query .= 'LIMIT ' . $pos . ', ' . $maxItems;
|
||||
$retval = $dbi->fetchResult($query);
|
||||
|
||||
return $dbi->fetchResult($query);
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
$query = 'SHOW EVENTS FROM ' . Util::backquote($this->realName) . ' ';
|
||||
@ -538,20 +542,16 @@ class NodeDatabase extends Node
|
||||
$retval = [];
|
||||
$handle = $dbi->tryQuery($query);
|
||||
if ($handle !== false) {
|
||||
$count = 0;
|
||||
if ($handle->seek($pos)) {
|
||||
while ($arr = $handle->fetchAssoc()) {
|
||||
if ($count >= $maxItems) {
|
||||
break;
|
||||
}
|
||||
|
||||
$retval[] = $arr['Name'];
|
||||
$count++;
|
||||
}
|
||||
while ($arr = $handle->fetchAssoc()) {
|
||||
$retval[] = $arr['Name'];
|
||||
}
|
||||
}
|
||||
|
||||
return $retval;
|
||||
if ($config->settings['NaturalOrder']) {
|
||||
usort($retval, 'strnatcasecmp');
|
||||
}
|
||||
|
||||
return array_slice($retval, $pos, $maxItems);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user