From: Eloy A. P. <elo...@us...> - 2001-12-19 01:37:52
|
Hi Pudge, I spent the whole afternoon debugging a problem and I think I found the problem, but wanted to ask for your opinion. I was trying to get an e-mail notification after a new story was submitted. This functionality is there, through the Messages plugin, the Messaging preferences and code in submit.pl. Now, only one user was getting the e-mail notification. I saw the mysql log and the query was returning all the users so I had no idea why only one of them was receiving the e-mail. After a bit of investigation it turns out that _getMessageUsers() in plugins/Messages/DB/MySQL/MySQL.pm uses sqlSelectArrayRef(), which returns the first row that matches the query. This explains the behavior I was seeing: only the first user returned by sqlSelectArrayRef() was receiving the e-mail. I replaced sqlSelectArrayRef() with sqlColSelectArrayRef() and everything is working now as it is supposed to. The question is: is this a bug or I am missing something here? Cheers! Eloy.- |
From: Chris N. <pu...@po...> - 2001-12-19 01:44:51
|
What version of Slash are you using? -- Chris Nandor pu...@po... http://pudge.net/ Open Source Development Network pu...@os... http://osdn.com/ |
From: Eloy A. P. <elo...@us...> - 2001-12-19 04:45:54
|
Hi Pudge, On Tue, Dec 18, 2001 at 08:40:41PM -0500, Chris Nandor wrote: > What version of Slash are you using? This is code from current CVS trunk. Eloy.- |
From: Chris N. <pu...@po...> - 2001-12-19 17:24:35
|
At 20:37 -0500 2001.12.18, Eloy A. Paris wrote: >After a bit of investigation it turns out that >_getMessageUsers() in plugins/Messages/DB/MySQL/MySQL.pm >uses sqlSelectArrayRef(), which returns the first >row that matches the query. This explains the behavior >I was seeing: only the first user returned by >sqlSelectArrayRef() was receiving the e-mail. > >I replaced sqlSelectArrayRef() with sqlColSelectArrayRef() >and everything is working now as it is supposed to. When you're right, your're right (except that the method name is sqlSelectColArrayref ... I can never remember the names, either :-). That code was never used much until recently. This might explain a slight problem I had with messages just the other day on one of my sites. Thanks, -- Chris Nandor pu...@po... http://pudge.net/ Open Source Development Network pu...@os... http://osdn.com/ |