6.0.0-beta1
9/23/25

[#6222] Check view existence before image load
Summary Check view existence before image load
Queue Ansel
Type Enhancement
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester duck (at) obala (dot) net
Created 02/06/2008 (6439 days ago)
Due
Updated 02/09/2008 (6436 days ago)
Assigned 02/06/2008 (6439 days ago)
Resolved 02/09/2008 (6436 days ago)
Milestone
Patch No

History
02/09/2008 07:01:40 PM Michael Rubinsky Comment #5
State ⇒ Resolved
Reply to this comment
Ok. Made some small adjustments and made sure that the vfs image name 
was being appended to the path when we actually have to generate the 
image, and committed.

Thanks
02/07/2008 02:52:41 PM Michael Rubinsky Comment #4
State ⇒ Accepted
Reply to this comment
I'll have to look at it again, then.  I could have sworn that I was 
defaulting to the globally configured style from the prefs if nothing 
was passed.
02/07/2008 08:44:23 AM Duck Comment #3 Reply to this comment
Not passing the $style information was done intentionally so we can
control what style is actually shown on the view regardless of the
image's gallery's style. In other words, take the blocks for
instance, we don't want 3 different styled thumbnails appearing on
the Browse page or on Horde's portal page, for example.  The style is
only explicitly passed when we want to force the use of that style.
Hmm... in the current code if the style is not passed you cannot 
control the style show, because it goes in the DB to get the image 
style. Yes you can pass the style and force it, but if don't, you can 
get many different styles. And in practice is the same, if you pass 
the style from previews retrieved data. So with just little more 
strict usage you economize a lot of queries and be still able to force 
a style in portal blocks.
It looks like the Ansel_Image::viewExists method you added could
still work without those changes though?
Of course not, as you must know the style to calculate the view hash.






02/06/2008 11:15:14 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Not passing the $style information was done intentionally so we can 
control what style is actually shown on the view regardless of the 
image's gallery's style. In other words, take the blocks for instance, 
we don't want 3 different styled thumbnails appearing on the Browse 
page or on Horde's portal page, for example.  The style is only 
explicitly passed when we want to force the use of that style.



It looks like the Ansel_Image::viewExists method you added could still 
work without those changes though?
02/06/2008 05:33:21 PM Chuck Hagenbuch Assigned to Michael Rubinsky
State ⇒ Assigned
 
02/06/2008 05:20:20 PM Duck Comment #1
State ⇒ New
New Attachment: ansel-viewExists.diff Download
Queue ⇒ Ansel
Summary ⇒ Check view existence before image load
Type ⇒ Enhancement
Priority ⇒ 1. Low
Reply to this comment
Currently for every getImageUrl call, even with vfs direct, we always 
go to the DB to get all image data and create an image object. This is 
wastfull, as we need this only, the first time if the view does not 
exists. And style data are nearly always already available, we just 
not passing using it. So I add a viewExist method to just ask VFS if 
the view exists. With this we remove all queries and object creations 
( 9 with default prefs ), when the views already exists. The patch 
even fix passing style parameter to getImageUrl.

Saved Queries