Enable special char and disable "_" replacement in filenames Enable special char and disable "_" replacement in filenames
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Enable special char and disable "_" replacement in filenames

Started by RubySN4, August 16, 2012, 02:49:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RubySN4

Hello,

I've had a problem with filenames since I've upgraded to cpg 1.5, and I would really like to get it fix if possible. I have files named this way: Vancouver Food Truck Festival (Vancouver) - 29 July 2012.jpg and it used to be fine with cpg 1.4 but now if I upload a file with a similar name it transforms it to: Vancouver20Food20Truck20Festival2028Vancouver2920-202920July202012.jpg. Is there a way to allow these "(), ' ' " back in the filenames?

FYI: these are the characters that aren't allowed in my settings: $/\\:*?"'<>|`&#@

I know that this question has been asked several times but I couldn't find a solution this time.

Thanks in advance for the help you can provide.

Stephanie

ΑndrĂ©

Open include/functions.inc.php, find
    $condition = array (
        'transliteration' => true,
        'special_chars' => true
    );

and replace with
    $condition = array (
        'transliteration' => true,
        'special_chars' => false
    );


Mind, that it only affects newly uploaded files. If it works as expected you can use the plugin hook replace_forbidden_conditions to adjust the above array, so you don't need to apply that change after each Coppermine update.