summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashantsinalkar2019-11-04 16:23:01 +0530
committerprashantsinalkar2019-11-04 16:23:01 +0530
commit5195ab2b981527a9f674c4dbe6313153d3e7be2e (patch)
tree940664e4b3cdcdbf65a776dc64acff0ddc0ecbcd
parent2919bcb535f7de18bb8d653bedcb66095e9a65ad (diff)
downloadr_solr_search-5195ab2b981527a9f674c4dbe6313153d3e7be2e.tar.gz
r_solr_search-5195ab2b981527a9f674c4dbe6313153d3e7be2e.tar.bz2
r_solr_search-5195ab2b981527a9f674c4dbe6313153d3e7be2e.zip
added index for array to get the value
-rwxr-xr-xsolr_search.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/solr_search.module b/solr_search.module
index b945786..a9a4e91 100755
--- a/solr_search.module
+++ b/solr_search.module
@@ -206,7 +206,7 @@ function ajax_solr_search_result_callback($form, $form_state)
foreach ($response['response']->docs as $doc) {
$sno++;
$output .= '<li>';
- $output .= '<p><b>Book: &nbsp;</b>' . $doc->title . ' (' . $doc->author . ')</p>';
+ $output .= '<p><b>Book: &nbsp;</b>' . $doc->title . ' (' . $doc->author[0] . ')</p>';
$output .= '<p><b>Chapter: &nbsp;</b>' . $doc->chapter[0] . '</p>';
$output .= '<p><b>Example: &nbsp;</b>' . $doc->example[0] . '</p>';
$output .= '<p><b>Links: </b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . base_path() . 'textbook-companion/download/book/' . $doc->book_id[0]. '"><span style="font-weight:bold;font-size:16px;">&#10549;</span> Download entire book</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'. $cloud_url.'?eid=' . $doc->id . '" target="_blank"><span style="font-weight:bold;font-size:20px;">&#187;</span> View this example</a></p>';