Merge branch 'SachinBahukhandi-search-key-fix' into QA_5_2
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
commit
e9edcbf67f
@ -58,6 +58,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #18578 Fixed PDF export NULL values gives a type error
|
||||
- issue #18650 Fixed double escaping on foreign key relation link title
|
||||
- issue #18533 Fixed wrong count for simulated queries
|
||||
- issue #18611 Fixed an error when searching a table without conditions
|
||||
|
||||
5.2.1 (2023-02-07)
|
||||
- issue #17522 Fix case where the routes cache file is invalid
|
||||
|
||||
@ -90,9 +90,12 @@ final class Search
|
||||
// If there are no search criteria set or no unary criteria operators,
|
||||
// return
|
||||
if (
|
||||
! isset($_POST['criteriaValues'])
|
||||
&& ! isset($_POST['criteriaColumnOperators'])
|
||||
&& ! isset($_POST['geom_func'])
|
||||
! isset($_POST['criteriaColumnOperators'])
|
||||
|| (
|
||||
! isset($_POST['criteriaValues'])
|
||||
&& ! isset($_POST['criteriaColumnOperators'])
|
||||
&& ! isset($_POST['geom_func'])
|
||||
)
|
||||
) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -238,4 +238,21 @@ class SearchTest extends AbstractTestCase
|
||||
$this->search->buildSqlQuery()
|
||||
);
|
||||
}
|
||||
|
||||
public function testBuildSqlQueryWithoutConditions(): void
|
||||
{
|
||||
$_POST['db'] = 'opengis';
|
||||
$_POST['table'] = 'world_cities';
|
||||
$_POST['back'] = 'index.php?route=/table/search';
|
||||
$_POST['geom_func'] = [2 => ' '];
|
||||
$_POST['customWhereClause'] = '';
|
||||
$_POST['session_max_rows'] = '25';
|
||||
$_POST['orderByColumn'] = '--nil--';
|
||||
$_POST['order'] = 'ASC';
|
||||
$_POST['submit'] = 'Go';
|
||||
$_POST['ajax_request'] = 'true';
|
||||
$_POST['displayAllColumns'] = 'true';
|
||||
|
||||
$this->assertSame('SELECT * FROM `world_cities`', $this->search->buildSqlQuery());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user