Closed (fixed)
Project:
User Relationships
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2008 at 19:52 UTC
Updated:
10 Feb 2009 at 17:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
sprsquish commentedHey Annette, thanks for your work on this.
I hadn't really looked at the cron hook in a good long while. I didn't realize how poorly I had written it.
I've updated it to be compatible with all RDBMSes using standard SQL.
The initial search now loads all the rids we need to delete so the second query can use those. I'm also pulling all the data out and putting it in to an array of objects to be better for general use. Now an array of relationship objects keyed by rid. You'll have to modify your catch code accordingly.
Here's the patch
Comment #2
jaydub commentedThe patch in #1 was never committed as far as I can tell. The updated patches are for both 5.2 and 6.1 branches and address the facts that 1) The code of the cron hook were never actually being called and 2) If they were ever to be called, the queries would have bombed in PostgreSQL due the MySQL-specific method of DELETE on JOINs.
Third patch allows for the user_relationships hook to be called for the delete operation which in 6.1 allows the elaborations plugin to do some cleanup.
Comment #3
jaydub commented