jpstrikesback/proximity — pull request #5 by FeyP (2012-03-30 00:23:58+00:00)
Title: Basic support for other entities, especially user entity

I wanted proximity search for user objects, so I created this patch to add basic support for other entities. Please note that this is a very quick patch. I only did some basic testing for the user and node entities. As far as I can see, everything should work, but it probably needs some more testing.

My goal here was to add support for the user entity. To support other entities, someone has to add insert, update and delete hooks, modify the views_data hook and maybe make some changes on how the data from entity_get_info is used. For example, one would need to use more data from entity_get_info to support the taxonomy entity, I guess.

Also, there is probably room for some code simplification or performance improvements. I tried to reuse existing code as much as possible. I also tried to maintain compatibility with existing hook implementations where possible.

I had to change the database schema in the install file, however I did not add any update routines or change the existing routine.

Having said all this, I thought this might be a good start for general entity support and maybe useful for others in the community.