Merge pull request #18929 from kamil-tekiela/Fix-navigation-after-table-edit

Fix navigation page after table edit
This commit is contained in:
Maurício Meneghini Fauth 2024-01-31 11:52:41 -03:00 committed by GitHub
commit a5e620c00b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -1245,7 +1245,7 @@ class InsertEdit
if (! preg_match('@^[a-z_]+\.php$@', $GLOBALS['goto'])) {
// this should NOT happen
//$GLOBALS['goto'] = false;
if ($GLOBALS['goto'] === 'index.php?route=/sql') {
if (str_contains($GLOBALS['goto'], 'index.php?route=/sql')) {
$gotoInclude = '/sql';
} else {
$gotoInclude = false;

View File

@ -1884,6 +1884,13 @@ class InsertEditTest extends AbstractTestCase
$this->assertEquals('', $GLOBALS['table']);
$GLOBALS['goto'] = 'index.php?route=/sql&server=2';
$this->assertEquals(
'/sql',
$this->insertEdit->getGotoInclude('index')
);
$_POST['after_insert'] = 'new_insert';
$this->assertEquals(
'/table/change',