Skip to content

Commit

Permalink
Fix the nojs variant
Browse files Browse the repository at this point in the history
  • Loading branch information
zuuperman committed Sep 18, 2013
1 parent 05950b5 commit f0a3377
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion culturefeed_search_ui/culturefeed_search_ui.module
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ function culturefeed_search_ui_menu() {
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$arguments = explode('/', $search_type['path']);
$items[$search_type['path'] . '/%'] = array(
'title' => $search_type['page_title'],
'title callback' => FALSE,
'page callback' => 'culturefeed_search_ui_search_page',
'page arguments' => array($name, $class_name, TRUE),
'page arguments' => array($name, $class_name, count($arguments)),
'file' => 'includes/pages.inc',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
Expand Down
3 changes: 2 additions & 1 deletion culturefeed_search_ui/includes/pages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use \Guzzle\Http\Exception;
* @param Boolean $ajax
* The type of request.
*/
function culturefeed_search_ui_search_page($name, $class_name = NULL, $ajax = FALSE) {
function culturefeed_search_ui_search_page($name, $class_name = NULL, $request_type = 'nojs') {

// The first search page callback is a dummy callback to redirect to the
// real search page.
Expand All @@ -28,6 +28,7 @@ function culturefeed_search_ui_search_page($name, $class_name = NULL, $ajax = FA

$conf = culturefeed_get_searchable_type($name);
$page = culturefeed_get_search_page($conf);
$ajax = $request_type == 'ajax';
if ($ajax) {
$page->setFullPage(FALSE);
}
Expand Down

0 comments on commit f0a3377

Please sign in to comment.