Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002896Piwigootherpublic2013.05.03 13:542013.05.13 18:40
ReporterKaare 
Assigned Toflop25 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.5.1 
Target VersionFixed in Version2.5.2 
Summary0002896: Apply trigger render_element_description for thumbnail title (for picture description) - fix in bug 2552 has been lost
DescriptionI 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.

Steps To ReproduceAdd 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.
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
(0006954)
svn (reporter)
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 (reporter)
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 (developer)
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 (developer)
2013.05.06 23:21

thx rvelices I didn't see the empty() arg has changed
(0006964)
svn (reporter)
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 (reporter)
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 (developer)
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 (developer)
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 (reporter)
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 (developer)
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 (developer)
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 (developer)
2013.05.07 10:23

okay I get it
Thx again
I will merge into 2.5
(0006979)
svn (reporter)
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)

- Issue History
Date Modified Username Field Change
2013.05.03 13:54 Kaare New Issue
2013.05.03 13:54 Kaare browser => any
2013.05.03 13:54 Kaare Web server => Apache 1.3.x
2013.05.03 17:45 flop25 Status new => acknowledged
2013.05.06 18:48 flop25 Status acknowledged => assigned
2013.05.06 18:48 flop25 Assigned To => flop25
2013.05.06 19:01 flop25 Note Added: 0006953
2013.05.06 19:18 flop25 Note Deleted: 0006953
2013.05.06 19:30 svn Checkin
2013.05.06 19:30 svn Note Added: 0006954
2013.05.06 19:35 svn Checkin
2013.05.06 19:35 svn Note Added: 0006955
2013.05.06 19:36 flop25 Status assigned => closed
2013.05.06 19:36 flop25 Resolution open => fixed
2013.05.06 19:36 flop25 Fixed in Version => 2.5.2
2013.05.06 22:28 rvelices Note Added: 0006958
2013.05.06 22:28 rvelices Status closed => feedback
2013.05.06 22:28 rvelices Resolution fixed => reopened
2013.05.06 23:21 flop25 Note Added: 0006963
2013.05.06 23:24 svn Checkin
2013.05.06 23:24 svn Note Added: 0006964
2013.05.06 23:27 svn Checkin
2013.05.06 23:27 svn Note Added: 0006965
2013.05.06 23:34 flop25 Note Added: 0006966
2013.05.07 06:43 rvelices Note Added: 0006968
2013.05.07 06:52 svn Checkin
2013.05.07 06:52 svn Note Added: 0006969
2013.05.07 10:06 flop25 Note Added: 0006970
2013.05.07 10:20 rvelices Note Added: 0006971
2013.05.07 10:23 flop25 Note Added: 0006973
2013.05.13 18:21 svn Checkin
2013.05.13 18:21 svn Note Added: 0006979
2013.05.13 18:40 flop25 Status feedback => closed
2013.05.13 18:40 flop25 Resolution reopened => fixed


Copyright © 2000 - 2018 MantisBT Team
Contact
Powered by Mantis Bugtracker