Commit 3b570531 authored by merlinofchaos's avatar merlinofchaos

#141205: (by mfrederickson) Add an argument to views_get_filter_values() to let other code use it.

parent 6c764527
......@@ -9,6 +9,7 @@ Views 5.x-dev
o #138510: Multi-select for taxonomy had disappeared.
o #117365: Comment: Last Changed Time wasn't ensuring node_comment_statistics is in the query.
o #136794: Sort by nid via click-sorting was also broken
o #141205: (by mfrederickson) Add an argument to _views_get_filter_values() to let other code use it.
Views 5.x-beta3
Bugs fixed:
......
......@@ -497,7 +497,7 @@ function views_build_view($type, &$view, $args = array(), $use_pager = false, $l
// if no filter values are passed in, get them from the $_GET array
if ($filters == NULL) {
$filters = _views_get_filter_values();
$filters = views_get_filter_values();
}
views_set_current_view($view);
......@@ -2057,9 +2057,12 @@ function views_t_strings($text) {
/**
* This function fetches filter values from the $_GET object
*/
function _views_get_filter_values() {
function views_get_filter_values($input = NULL) {
if (!isset($input)) {
$input = $_GET;
}
$values = array();
foreach($_GET as $key => $value) {
foreach($input as $key => $value) {
if(strpos($key, 'op') === 0) { // starts with op
$values[substr($key, 2)]['op'] = $value; // two letters in op
} elseif (strpos($key, 'filter') === 0) { // starts with op
......
......@@ -400,6 +400,7 @@ function views_ui_admin_import() {
* Handle the submit button on importing a view.
*/
function views_ui_admin_import_submit($formid, $form) {
views_load_cache();
ob_start();
eval($form['view']);
ob_end_clean();
......
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