Merge pull request #18929 from kamil-tekiela/Fix-navigation-after-table-edit
Fix navigation page after table edit
This commit is contained in:
commit
a5e620c00b
@ -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;
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user