summaryrefslogtreecommitdiff
path: root/modules/search/search.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-01-04 16:10:48 +0000
committerDries Buytaert <dries@buytaert.net>2009-01-04 16:10:48 +0000
commit6690a4ec4cf75b2f18cc53bf67f011c1ecc45e15 (patch)
tree5cac9cb74340d9d26922f3041cb06a9ec9c4e5cd /modules/search/search.module
parentfbf4e0f1167cdc88b4f8244df63a917ce5167191 (diff)
downloadbrdo-6690a4ec4cf75b2f18cc53bf67f011c1ecc45e15.tar.gz
brdo-6690a4ec4cf75b2f18cc53bf67f011c1ecc45e15.tar.bz2
- Patch #353480 by dereine, justinrandell: remove from hook_comment().
Diffstat (limited to 'modules/search/search.module')
-rw-r--r--modules/search/search.module48
1 files changed, 36 insertions, 12 deletions
diff --git a/modules/search/search.module b/modules/search/search.module
index 5c07acb31..4f13ec030 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -659,19 +659,43 @@ function search_nodeapi_update($node) {
}
/**
- * Implementation of hook_comment().
+ * Implementation of hook_comment_insert().
*/
-function search_comment($a1, $op) {
- switch ($op) {
- // Reindex the node when comments are added or changed
- case 'insert':
- case 'update':
- case 'delete':
- case 'publish':
- case 'unpublish':
- search_touch_node(is_array($a1) ? $a1['nid'] : $a1->nid);
- break;
- }
+function search_comment_insert($form_values) {
+ // Reindex the node when comments are added.
+ search_touch_node($form_values['nid']);
+}
+
+/**
+ * Implementation of hook_comment_update().
+ */
+function search_comment_update($form_values) {
+ // Reindex the node when comments are changed.
+ search_touch_node($form_values['nid']);
+}
+
+/**
+ * Implementation of hook_comment_delete().
+ */
+function search_comment_delete($comment) {
+ // Reindex the node when comments are deleted.
+ search_touch_node($comment->nid);
+}
+
+/**
+ * Implementation of hook_comment_publish().
+ */
+function search_comment_publish($form_values) {
+ // Reindex the node when comments are published.
+ search_touch_node($form_values['nid']);
+}
+
+/**
+ * Implementation of hook_comment_unpublish().
+ */
+function search_comment_unpublish($comment) {
+ // Reindex the node when comments are unpublished.
+ search_touch_node($comment->nid);
}
/**