Posted by gianfrasoft on October 29, 2010 at 11:09am
1 follower
| Project: | Views Saved Searches |
| Version: | 6.x-1.0-beta3 |
| Component: | Code |
| Category: | bug report |
| Priority: | major |
| Assigned: | gianfrasoft |
| Status: | needs review |
Issue Summary
In have one view in which i defined four pages with different paths.
When I register a search on a page with a specific path, accessing the saved search I always get the path of the first page (the one with the same name of the view).
I solved this problem changing the value in the field "display" of the table views_savedsearches: my opinion is thet the value actually stored can't be named diplay because it seems to be the view's name.
Here is the fix:
1. in function views_savedsearches_save_search_form put the correct value in the display field by using this code:
<?php
$form['variables']['display'] = array('#type' => 'hidden', '#value' => $view->display[$view->current_display]->display_options['path']);
?>2. in function _views_savedsearches_saved_searches_to_form_options load the correct value in the $options variable:
<?php
$options[$sid] = l($saved_search->name, $saved_search->display, array('attributes' => array('class' => $class), 'query' => $query));
?>Bye.