You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2009-11-06 17:51:16

aNoble
Member
Registered: 2009-11-06
Posts: 2

Fix for Associated Documents file case-sensitivity issue

We ran into some problems when adding multiple documents to a ticket when the only difference between the filenames was the case. Linux would store the two files because it's case-sensitive but MySQL would find both and not download either because the query didn't return 1 row.

Our fix was to change the SQL query in the getFromDBbyFilename function of the inc/document.class.php file to

SELECT ID FROM glpi_docs WHERE BINARY filename = '$filename'

Adding BINARY mean's that it will do a case sensitive search, which seemed to fix everything in our case anyway.

Offline

#2 2009-11-06 18:53:19

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Fix for Associated Documents file case-sensitivity issue

Which version.
AFAIK this is fixed in latest 0.72.3

And in next 0.80, filename doesn't have to be unique anymore

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2009-11-06 20:31:42

aNoble
Member
Registered: 2009-11-06
Posts: 2

Re: Fix for Associated Documents file case-sensitivity issue

We're running 0.72.3 right now. And I'm pretty sure the most recent ticket was created in 0.72.3, however the older ticket with the first file was created on an older version.

I'm glad to hear that duplicate filenames will be allowed in 0.80. That's definitely the way it should work.

Offline

Board footer

Powered by FluxBB