Allow modules to act when a relationship ends

colan - July 7, 2008 - 23:39
Project:Node Relativity
Version:5.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

It would be great if other modules could implement the functions hook_relativity_detach() and hook_relativity_attach() so that they could act when relationships are destroyed or created. I really just need the former of the two, but both would be good.

If anyone's willing to work on this, I'd really appreciate it.

#1

colan - July 10, 2008 - 01:14
Status:active» needs review

This patch runs through any implementations of hook_relativity_detach() in the relativity_unparent_node() function just after the relationship is destroyed. Now any modules can do whatever they need to do whenever a relationship ends.

AttachmentSize
diff.patch 688 bytes

#2

colan - July 10, 2008 - 01:17
Title:Support for hook_relativity_detach()» Allow modules to act when a relationship ends

#3

scrambled - October 17, 2008 - 18:32

Hi,
I am trying to use this patch for the competition module but am recieving this error:
using 5.11 drupal all updated modules

[root@host public_html]# patch -p0 < diff_9.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: relativity.module
|===================================================================
|--- relativity.module (revision 557)
|+++ relativity.module (working copy)
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
1 out of 1 hunk ignored
[root@host public_html]# patch -p0 < diff_9.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: relativity.module
|===================================================================
|--- relativity.module (revision 557)
|+++ relativity.module (working copy)
--------------------------
File to patch:

should I place this patch in the relativity module folder?

#4

antoniotorres - October 29, 2008 - 16:21

@scrambled
Yes, and run the same command inside the folder as well.

 
 

Drupal is a registered trademark of Dries Buytaert.