Closed (outdated)
Project:
Event
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2008 at 14:02 UTC
Updated:
13 Apr 2018 at 21:01 UTC
Jump to comment: Most recent
$result = db_query("SELECT * FROM {variable} WHERE name like 'event_nodeapi_%'");
while ($type = db_fetch_object($result)) {
$types[unserialize($type->value)][] = substr($type->name, 14);
}
in this part of the function event_get_types a query is done on the variable table. This is completely unneeded because variables are loaded every page load. I understand why you query though, you don't wanna run through all the array keys to check for event_ x. However it would be much nicer if you would just save all the stuff in one variable as an array.
By doing that is saves you a query because you already have the data and you don't need to unserialize and substr....
Unfortunatly I don't have time to make a patch right now so I hope you do. If not I might check in later to do so.
Comments
Comment #1
gerhard killesreiter commentedI agree, but I have no time to patch this since there's an upgrade path involved...
Comment #2
japerryEvent for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.