Skip to content

Commit

Permalink
Merge pull request #153 from nhart/7.x-1.4
Browse files Browse the repository at this point in the history
add page fragment regardless of search type
  • Loading branch information
ruebot committed Oct 28, 2014
2 parents 1bebbe2 + f07c173 commit c122834
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 c122834

Please sign in to comment.