We would be using a more standard Drupal pattern if we renamed this hook.

Also, such a renaming will potentially avoid fatal error when combined with existing beta5 integrations.

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new9 KB
scor’s picture

Title: Rename hook_apachesolr_modify_query to hook_apachesolr_query_alter » Rename hook_apachesolr_modify_query to hook_apachesolr_query_alter and other API clean up

+1

haven't tried the patch but it looks good.

+++ b/apachesolr.api.php
@@ -5,29 +5,29 @@
-  $query->add_filter("is_uid", 1);
+  $query->addFilter("is_uid", 1);
 
   // Only search titles.
-  $query->params['qf'] = array('label');
+  $query->replaceParam('qf', 'label');
+++ b/apachesolr.api.php
@@ -5,29 +5,29 @@
-  $query->set_available_sort('entity_id', array(
+  $query->setAvailableSort('entity_id', array(

I guess these are just some documentation cleanup (e.g. patch has been committed in a separate issue)?

pwolanin’s picture

yes, doc cleanup - see the query class.

pwolanin’s picture

Status: Needs review » Fixed

committing

pwolanin’s picture

StatusFileSize
new2.65 KB

also committed this

pwolanin’s picture

StatusFileSize
new2.23 KB

committing this cleanup-up patch too.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.