google-code-export / editease

Automatically exported from code.google.com/p/editease
1 stars 0 forks source link

Image selector does not list any images when the directory contains periods (.) #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install editease in a folder that contains at least one period (e.g. 
http://www.example.com/sample.folder/_ee)
2. Edit a text area and try to add an image. Click the Browse Server button.
3. The window pops up that lists the image files, but no files are listed.

What is the expected output? What do you see instead?
The window pops up that lists the image files, but no files are listed.

What version of the product are you using? On what operating system?
editease 1.5.1 on a Windows Server

Please provide any additional information below.
I figured out how to fix it. In _ee/cfk_image_list.php, change line 39 from:
        if( in_array($valC[1], $validExtensions) ){ /* remove non image files */
to:
        if( in_array($valC[count($valC)-1], $validExtensions) ){ /* remove non image files */
This will get the last element in the period-separated string (which should be 
the extension). See attached [fixed] file.

Original issue reported on code.google.com by noahz...@gmail.com on 13 Jul 2011 at 2:47

Attachments: