Skip to content

Commit

Permalink
Merge pull request #152 from nhart/7.x-page-fragment-missing-advanced…
Browse files Browse the repository at this point in the history
…-search

add page fragment regardless of search type
  • Loading branch information
ruebot committed Oct 28, 2014
2 parents 55e12b2 + 0d15e57 commit ee4a006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion islandora_book.module
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,12 @@ function islandora_book_islandora_pageCModel_islandora_solr_object_result_alter(

if (islandora_object_access(ISLANDORA_VIEW_OBJECTS, islandora_object_load($book_pid))) {
$search_results['object_url'] = "islandora/object/$book_pid";
$search_results['object_url_fragment'] = "page/$page_number/mode/1up";

// XXX: Won't handle fielded searches nicely... then again, if our
// highlighting field is not the one being search on, this makes sense?
if ($query_processor->solrDefType == 'dismax' || $query_processor->solrDefType == 'edismax') {
$search_results['object_url_fragment'] = "page/$page_number/mode/1up/search/" . rawurlencode($query_processor->solrQuery);
$search_results['object_url_fragment'] .= "/search/" . rawurlencode($query_processor->solrQuery);
}
}
}
Expand Down

0 comments on commit ee4a006

Please sign in to comment.