? .cvsignore
? SolrPhpClient
? Zend
? auth-servlet.patch
? current-breadcrumb-667124-1.patch
? fu-630798-7.patch
? improve-hook-666648-1.patch
? improve-hook-666648-2.patch
? less-breakage-528086-21.patch
? mlt-restrict-372767-38.patch
? mlt-restrict-372767-40.patch
? multsite-411262-35.patch
? multsite-support-411262-36.patch
? mysql-opt-592522-16.patch
? schema-core-664572-1.patch
? schema-core-664572-2.patch
? text-analyzer.xml
? und-662232-10.patch
Index: contrib/apachesolr_image/apachesolr_image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/contrib/apachesolr_image/apachesolr_image.module,v
retrieving revision 1.1.2.1.2.5
diff -u -p -r1.1.2.1.2.5 apachesolr_image.module
--- contrib/apachesolr_image/apachesolr_image.module 24 Dec 2009 03:41:29 -0000 1.1.2.1.2.5
+++ contrib/apachesolr_image/apachesolr_image.module 26 Dec 2009 19:38:02 -0000
@@ -30,8 +30,13 @@ function apachesolr_image_apachesolr_upd
* Implementation of hook_apachesolr_modify_query().
*/
function apachesolr_image_apachesolr_modify_query(&$query, &$params, $caller) {
- // Also retrieve image thumbnail links.
- $params['fl'] .= ',ss_image_relative';
+ if (empty($query->multisite)) {
+ // Also retrieve image thumbnail links.
+ $params['fl'] .= ',ss_image_relative';
+ }
+ else {
+ $params['fl'] .= ',ss_image_absolute';
+ }
}
/**
@@ -39,14 +44,22 @@ function apachesolr_image_apachesolr_mod
*/
function apachesolr_image_apachesolr_process_results(&$results) {
foreach ($results as $index => $item) {
- if ($item['node']->type == 'image' && !empty($item['node']->ss_image_relative)) {
+ if ($item['node']->type == 'image' && (!empty($item['node']->ss_image_relative) || !empty($item['node']->ss_image_absolute))) {
$results[$index]['snippet'] = theme('apachesolr_image_snippet', $item);
}
}
}
function theme_apachesolr_image_snippet($item){
- return ''. theme('image', $item['node']->ss_image_relative, $item['title'], $item['title'], array('align' => 'left')) .''. $item['snippet'] . '
';
+
+ $output = '';
+ if (isset($item['node']->ss_image_relative)) {
+ $output .= theme('image', $item['node']->ss_image_relative, $item['title'], $item['title'], array('align' => 'left'));
+ }
+ elseif (isset($item['node']->ss_image_absolute)) {
+ $output .= theme('image', $item['node']->ss_image_absolute, $item['title'], $item['title'], array('align' => 'left'), FALSE);
+ }
+ return $output .'';
}
/**