May 10, 2004, 8:47 AM
Post #1 of 1
I'm using wei's ImageManager plugin for v3, and I noticed the files and directories weren't sorting properly in the "Insert Image" popup. The first time it opened, it sorted correctly, but after using it to upload some images, I noticed that the new images were ALWAYS placed at the end. After looking into it some more, I found that even the original sorting was slightly off. This made finding the proper
fix for wei's ImageManager directory/file sorting
I dug around in the code and found the following fix:
in "classes\ImageManager.php" on-or-about line 182-183 you will find the following code:
This SHOULD sort them correctly (alphabetically, though not case-insensitive), but it wasn't. I changed it to the following:
and the files and directories began sorting properly (alphabetically, case-insensitive). Hope this helps someone out there.