Another ldir Update!

Written by

Yes, I know… No updates for nearly 12 months and then two come along in the same week!

ldir version 1.7.9 is now 10% smaller than 1.7.8! As well as saving minimal disk space, it’s also had some speed increaces.

The only downside is that we had to remove error code 3 from the function in order to speed it up; there are more speed increases to be had if I could reliably detect the file type icons with a fail over if there isn’t a type without utilising cURL.

If you want to customise ldir to not do those checks and just ignore unknown file type icons then the following code alterations will make a significant speed increase.

Change: (approx line 160)

$img = "unknown.png";
$type = "Unknown File";
//Remove this check to speed things up.
if(ldir_url_exists($ldir['im'].strtolower($ext).".png",$ldir['v'])) {
    $img = strtolower($ext).".png";
    $type = strtoupper($ext)." File";


$img = strtolower($ext).".png";
$type = strtoupper($ext)." File";