Quote:
Originally Posted by BadgerDog
Thanks BirdOPrey5 ....
My download of the latest version 1.0.5.iei4.zip showing the cron.php as Feb 14, 2011, already shows your changes above as being incorporated in that file?
Am I missing something?
Regards,
Doug
|
It appears it wasn't the "first function" in that file but it's still there...
The relevant function included in that file is:
Code:
function iei_get_file_index_name($path, $extension, $oldfilename)
{
// Get only the file name (no directory info)
$oldfilename = basename($oldfilename, $extension);
// Strip out non alpha-numeric characters
$oldfilename = preg_replace('#[^A-Za-z0-9_]#', '', $oldfilename);
// Set max file name length to 40 characters
$oldfilename = substr($oldfilename, 0, 40);
//Increment number if file exists
for($i = 1;; $i++)
{
$filename = "$path/$oldfilename-$i.$extension";
if(!file_exists($filename))
{
return $filename;
}
}
}
My change to this function is as follows (in red):
Code:
function iei_get_file_index_name($path, $extension, $oldfilename)
{
// Get only the file name (no directory info)
$oldfilename = basename($oldfilename, $extension);
// Strip out non alpha-numeric characters
$oldfilename = preg_replace('#[^A-Za-z0-9_]#', '', $oldfilename);
// Set max file name length to 40 characters
$oldfilename = substr($oldfilename, 0, 40);
// Force extension to 3 characters only
$extension = substr($extension, 0, 3);
//Increment number if file exists
for($i = 1;; $i++)
{
$filename = "$path/$oldfilename-$i.$extension";
if(!file_exists($filename))
{
return $filename;
}
}
}
Just add those lines in red to your existing file.