Commit 6a660d60 authored by ygerasimov's avatar ygerasimov

Issue #1517514: Fixed Exposed filter setting not kept during submit.

parent d7ca739a
......@@ -34,9 +34,16 @@ function draggableviews_form_alter(&$form, &$form_state, $form_id) {
}
// Set action as current path.
$form['#action'] = base_path() . current_path();
// Keep destination.
if (isset($_GET['destination'])) {
$form['#action'] .= '?destination=' . $_GET['destination'];
// Keep destination and other GET params.
if (count($_GET) > 1) {
if (isset($_GET['destination'])) {
$form['#action'] .= '?destination=' . $_GET['destination'];
}
else {
$get = $_GET;
unset($get['q']);
$form['#action'] .= '?destination=' . urlencode(current_path() . '?' . http_build_query($get));
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment