PDA

View Full Version : upper to lower case bug


MarkAbraham
01-16-2007, 09:50 PM
When submitting images JA Submit changes upper case letters to lower case letter which in turn causes them to not show up in the article later that references them with the upper case letters in the URL. Ok that it changes the case, it just needs also change upper case to lower case in the URL it provides to Joomla.

BrianFinnie
03-04-2007, 07:55 PM
Two possible solutions to this. These have had limited testing but have worked for me to deal with the immediate problem. I do not know if side effects have still to show up.

1. To change the database entries to lower case do the following:

In ja-submit.php find around line 90

//introtext image

$Nameimage1 = $_FILES['image1']['name'];

$Nameimage2 = $_FILES['image2']['name'];



and add after this

$Nameimage1= strtolower($Nameimage1);
$Nameimage2= strtolower($Nameimage2);


2. To keep the same filename with case preserved throughout do this:

In resize.php find around line 61

//CREATES THE NAME OF THE SAVED FILE

$file = $newfilename . strtolower($filename);


and replace the line of code by

$file = $newfilename . $filename;


Either of these mods avoids the problem and the correct cross reference is maintained between the database and the file system. Which you use may depend on your server setup.

I hope this helps someone. It makes JASubmit useable again.