Teaser Thumbnail makes unnecessary database queries
v_20q - November 8, 2009 - 11:44
| Project: | Teaser Thumbnail |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | v_20q |
| Status: | needs review |
Description
The views_handler_field_teaserthumbnail handler is used in the module to display thumbnail in views. A database query is performed in the render() method of the handler for each row returned by the Views module. This query is used to fetch a file path to the thumbnail from the {teaserthumbnail} table.
The problem is that this file path is already present in the main query and passed to the render() method. There is no need to perform any additional queries, that consume Drupal recourses.
| Attachment | Size |
|---|---|
| teaserthumbnail.patch | 3.39 KB |
