MantisBT - Piwigo
View Issue Details
0002896Piwigootherpublic2013.05.03 13:542013.05.13 18:40
Kaare 
flop25 
normalminoralways
closedfixed 
2.5.1 
2.5.2 
any
Apache 1.3.x
0002896: Apply trigger render_element_description for thumbnail title (for picture description) - fix in bug 2552 has been lost
I was just hit by the old 2552 bug.

When parts of /include/functions.inc.php were moved to /include/functions_html.inc.php, it appears that the previous fix got lost.

The 2552 bug fixed in the get_thumbnail_title function:

http://piwigo.org/dev/changeset/12870/trunk/include/functions.inc.php [^]

The same function moved to its new location, now without the fix:

http://piwigo.org/dev/changeset/12920/trunk/include/functions_html.inc.php [^]

I have applied the fix locally to include/functions_html.inc.php, and everything is working as expected.

Add tags as per the ExtendedDescription syntax to an image, hover the mouse over the image's thumbnail in the album view. The image's description is displayed as-is in the tooltip.
No tags attached.
Issue History
2013.05.03 13:54KaareNew Issue
2013.05.03 13:54Kaarebrowser => any
2013.05.03 13:54KaareWeb server => Apache 1.3.x
2013.05.03 17:45flop25Statusnew => acknowledged
2013.05.06 18:48flop25Statusacknowledged => assigned
2013.05.06 18:48flop25Assigned To => flop25
2013.05.06 19:01flop25Note Added: 0006953
2013.05.06 19:18flop25Note Deleted: 0006953
2013.05.06 19:30svnCheckin
2013.05.06 19:30svnNote Added: 0006954
2013.05.06 19:35svnCheckin
2013.05.06 19:35svnNote Added: 0006955
2013.05.06 19:36flop25Statusassigned => closed
2013.05.06 19:36flop25Resolutionopen => fixed
2013.05.06 19:36flop25Fixed in Version => 2.5.2
2013.05.06 22:28rvelicesNote Added: 0006958
2013.05.06 22:28rvelicesStatusclosed => feedback
2013.05.06 22:28rvelicesResolutionfixed => reopened
2013.05.06 23:21flop25Note Added: 0006963
2013.05.06 23:24svnCheckin
2013.05.06 23:24svnNote Added: 0006964
2013.05.06 23:27svnCheckin
2013.05.06 23:27svnNote Added: 0006965
2013.05.06 23:34flop25Note Added: 0006966
2013.05.07 06:43rvelicesNote Added: 0006968
2013.05.07 06:52svnCheckin
2013.05.07 06:52svnNote Added: 0006969
2013.05.07 10:06flop25Note Added: 0006970
2013.05.07 10:20rvelicesNote Added: 0006971
2013.05.07 10:23flop25Note Added: 0006973
2013.05.13 18:21svnCheckin
2013.05.13 18:21svnNote Added: 0006979
2013.05.13 18:40flop25Statusfeedback => closed
2013.05.13 18:40flop25Resolutionreopened => fixed

Notes
(0006954)
svn   
2013.05.06 19:30   
[Subversion] r22505 by flop25 on trunk

-----[Subversion commit log]----------------------------------------------------
bug:2896
thx to Kaare
apply render_element_description inside get_thumbnail_title()
(0006955)
svn   
2013.05.06 19:35   
[Subversion] r22506 by flop25 on branch 2.5

-----[Subversion commit log]----------------------------------------------------
merge [Subversion] r22505 into 2.5 branch
bug:2896
thx to Kaare
apply render_element_description inside get_thumbnail_title()
(0006958)
rvelices   
2013.05.06 22:28   
I agree it was bugged, however the correct change would be:

if (!empty($comment))
{
  $title.= ' '.substr($comment, 0, 100).(strlen($comment) > 100 ? '...' : '');
}

Do you agree ?
(0006963)
flop25   
2013.05.06 23:21   
thx rvelices I didn't see the empty() arg has changed
(0006964)
svn   
2013.05.06 23:24   
[Subversion] r22518 by flop25 on trunk

-----[Subversion commit log]----------------------------------------------------
bug:2896
debugg the empty()
adding htmlspecialchars(strip_tags()) before the truncature in order to avoid blanks, if the description has html/ExtendedDescription tags
(0006965)
svn   
2013.05.06 23:27   
[Subversion] r22519 by flop25 on branch 2.5

-----[Subversion commit log]----------------------------------------------------
merge [Subversion] r22518 from trunk to 2.5
bug:2896
debugg the empty()
adding htmlspecialchars(strip_tags()) before the truncature in order to avoid blanks, if the description has html/ExtendedDescription tags
(0006966)
flop25   
2013.05.06 23:34   
the $comment arg for get_thumbnail_title() is now useless and was in fact never really needed, but will be deleted only for 2.6
(0006968)
rvelices   
2013.05.07 06:43   
flop25
- the $comment should be used to avoid unnecessary render events
- you have added and htmlspecialchars too much now ( try the description you&me ...)

let me change the trunk and you can test it ...
(0006969)
svn   
2013.05.07 06:52   
[Subversion] r22520 by rvelices on trunk

-----[Subversion commit log]----------------------------------------------------
bug 2896 - thumbnail title fix (use $comment parameter + no double htmlspecialchars)
(0006970)
flop25   
2013.05.07 10:06   
Thx! I should have gone to bed earlier

About the $comment, my goal was in fact to render inside the function and delete the render before the function, because I don't get why we add a necessary step outside the function
(0006971)
rvelices   
2013.05.07 10:20   
>> because I don't get why we add a necessary step outside the function
for example in category_default, we pass to the template the raw values (lower case keys) as well as rendered description in 'DESCRIPTION' ... calling render 2 times is useless and slow ...
(0006973)
flop25   
2013.05.07 10:23   
okay I get it
Thx again
I will merge into 2.5
(0006979)
svn   
2013.05.13 18:21   
[Subversion] r22634 by flop25 on branch 2.5

-----[Subversion commit log]----------------------------------------------------
merge [Subversion] r22520 from trunk to 2.5
bug:2896
thumbnail title fix (use $comment parameter + no double htmlspecialchars)