Closed (works as designed)
Project:
Subscriptions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2013 at 21:01 UTC
Updated:
3 May 2013 at 23:03 UTC
Function subscriptions_get() just does not run cause db_select is missing fields. Should be something like this I guess:
$query = db_select('subscriptions', 's')->fields('s');
Also, I think that function is sort of useful despite the strange way it builds the resulting array. Is there a $php pattern that makes the following construction useful?
foreach ($query->execute() as $s) {
$subscriptions[$s->recipient_uid][$s->module][$s->field][$s->value][$s->author_uid] = 1;
}
Comments
Comment #1
salvisThis was fixed in #1853644: subscriptions_get generates pdo exception, no? Feel free to reopen if necessary.
You could use nested foreach loops to iterate over the result array.
That function is a left-over from the D5 code and not used anywhere in Subscriptions — I'm not sure it's useful. But kimwes apparently used it.