Project:Event
Version:6.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

    $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

#1

I agree, but I have no time to patch this since there's an upgrade path involved...