refactor data structure so core tables are not altered and move towards PostgreSQL compliance

jauzah - March 10, 2008 - 22:17
Project:Comment Notify
Version:5.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:greggles
Status:closed
Description

You should think about few general changes in your module. Altering of the 'comments' table is a very dangerous solution. You should create your own database table with nid, uid and email fields. The second thing is the sending of emails. In my opinion, it should be processed by cron. Consider my advices please.

#1

greggles - March 17, 2008 - 18:03
Title:Bad conception» refactor data structure so core tables are not altered

I'm renaming this to a more descriptive title that contains just one problem. Please create a new issue regarding sending mail on cron.

Also, while I generally agree with the sentiment that core tables should not be modified I don't plan to fix this directly but instead have some ideas on other ways to change the module to handle your advice.

#2

greggles - May 17, 2008 - 16:54

One more thought about this...currently the module uses some database specific concat/md5 functions to create a hash for unsubscribing users. If this were in its own table then it could have four columns:

cid|notification_hash|active

That way we can create the hash in php and create the link and the unsubscribe function in a more database agnostic manner (and probably a faster manner, since it is only calculated once).

#3

greggles - July 23, 2008 - 17:06
Title:refactor data structure so core tables are not altered» refactor data structure so core tables are not altered and PostgreSQL compliance
Version:5.x-1.5» 5.x-1.x-dev
Assigned to:Anonymous» greggles
Status:active» needs review

Here is a patch which attempts to do this. I'd love your help in reviewing/testing.

AttachmentSize
232564_comment_notify_refactor_for_own_table_and_postgres.patch 10.94 KB

#4

greggles - July 23, 2008 - 19:02

Minus the debug statements...

AttachmentSize
232564_comment_notify_refactor_for_own_table_and_postgres_4.patch 11.03 KB

#5

greggles - July 29, 2008 - 20:06
Title:refactor data structure so core tables are not altered and PostgreSQL compliance» refactor data structure so core tables are not altered and move towards PostgreSQL compliance
Version:5.x-1.x-dev» 5.x-2.x-dev
Status:needs review» fixed

This is now fixed - http://drupal.org/cvs?commit=130452

#6

Anonymous (not verified) - August 12, 2008 - 20:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.