I notice 2 problems :
1/ Typo :
When checking for a repository to upload files, filemanager make a wrong call to variable for the max num of files in a directory :
In filemanager_setting() it defines filemanager_max_filecount and in filemanager_add_file(), it uses filemanager_max_file_count so it didn't take care of the settings made.
2/ $curdir isn't defined so if ($directory->directory > $curdir || $directory->filecount < variable_get('filemanager_max_filecount', '2000')) { is always true...
As I didn't understand the goal of "// If the next directory in the list skips the current directory number use it", I delete it and just keep the number of files check.
Can you help me understand your needs there ?
Comments
Comment #1
ccourtne commentedFixed... and I don't remember what the curdir was supposed to do so I removed it. The algorithm that is in there now is brute force always starting at zero. I think it was originally looking at the max directory in the database and doing something fancy. I suspect the curdir is a remnant of the excess complexity.