Posted by 20th on November 8, 2009 at 11:44am
Jump to:
| Project: | Teaser Thumbnail |
| Version: | 6.x-1.5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | 20th |
| Status: | closed (fixed) |
Issue Summary
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 |
Comments
#1
up
#2
I reviewed your solution v_20q: thanks a lot for that. I added the Views support quite a while ago and hadn't then a complete understanding of the Views 2 API. I just removed the query and used
$values->{$this->field_alias}instead, but your patch was wiping out the handling of the option "Display original".Thanks again.
#3
Ported in the 6.x-1.6 version.