Merge pull request #15058 from mauriciofauth/fix-create-edit-view
Fix bug when creating or editing views
This commit is contained in:
commit
832a0e986e
@ -1761,6 +1761,7 @@ class Util
|
||||
if (($url_length > $GLOBALS['cfg']['LinkLengthLimit'])
|
||||
|| ! $in_suhosin_limits
|
||||
|| strpos($url, 'sql_query=') !== false
|
||||
|| strpos($url, 'view[as]=') !== false
|
||||
) {
|
||||
$parts = explode('?', $url, 2);
|
||||
/*
|
||||
|
||||
@ -170,7 +170,7 @@ if (isset($_POST['createview']) || isset($_POST['alterview'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$sql_query = ! empty($_GET['sql_query']) ? $_GET['sql_query'] : '';
|
||||
$sql_query = ! empty($_POST['sql_query']) ? $_POST['sql_query'] : '';
|
||||
|
||||
// prefill values if not already filled from former submission
|
||||
$view = array(
|
||||
@ -185,8 +185,8 @@ $view = array(
|
||||
'with' => '',
|
||||
);
|
||||
|
||||
if (Core::isValid($_GET['view'], 'array')) {
|
||||
$view = array_merge($view, $_GET['view']);
|
||||
if (Core::isValid($_POST['view'], 'array')) {
|
||||
$view = array_merge($view, $_POST['view']);
|
||||
}
|
||||
|
||||
$url_params['db'] = $GLOBALS['db'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user