Announcement

#1 2017-07-10 22:20:01

TheDoc
Member
Munich / Germany
2015-10-18
173

Issue in functions_metadata.inc. when unsetting allow_html_in_metadata

Hi,

I have received an error in functions_metadata.inc (line 205) when I have GPS values in a picture and allow_html_in_metadata is false.

The reason is that strip_tags($value) doesn't work on an array and the exif values for GPSLatitude and GPSLongitude are arrays. I have made a quick fix by adding

Code:

        $result['GPSLatitude'] = $result['latitude'] . " " . $gps_exif['GPSLatitudeRef'];
        $result['GPSLongitude'] = $result['longitude'] . " " . $gps_exif['GPSLongitudeRef'];

after the calculation of latitude and longitude. But thats surely not the best way to handle this?

Cheers,
Thomas


Piwigo 2.9.1
Operating system: Linux
PHP: 5.6.30 (Show info) [2017-07-10 22:17:29]
MySQL: 5.5.55-0+deb7u1-log [2017-07-10 22:17:29]
Graphics Library: External ImageMagick 6.8.9-9
Piwigo URL: bilder.feuster.com

Offline

 

#2 2017-07-10 22:31:22

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issue in functions_metadata.inc. when unsetting allow_html_in_metadata

Seems like this has already been reported in http://piwigo.org/forum/viewtopic.php?p … 3#p163833? But I can't see any answer there...

Offline

 

#3 2017-07-11 00:46:39

flop25
Piwigo Team
2006-07-06
7037

Re: Issue in functions_metadata.inc. when unsetting allow_html_in_metadata

Hello
are you talking of those lines? [Github] Piwigo file include/functions_metadata.inc.php@L193  You can login on github then click on the Edit icon which will send us your changes for approval


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2017-07-11 12:49:19

TheDoc
Member
Munich / Germany
2015-10-18
173

Re: Issue in functions_metadata.inc. when unsetting allow_html_in_metadata

Fine with me. Then we can discuss there if thats how it should be done.

Last edited by TheDoc (2017-07-11 12:50:43)

Offline

 

#5 2017-07-11 15:31:19

flop25
Piwigo Team
2006-07-06
7037

Re: Issue in functions_metadata.inc. when unsetting allow_html_in_metadata

TheDoc wrote:

Fine with me. Then we can discuss there if thats how it should be done.

at least that's the best way to avoid being forgotten ^^


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact