Cool, big many thanx
worked like a charm :) - Daniel
Put it here:
http://www.mediawiki.org/wiki/Manual_talk:$wgHashedUploadDirectory
Platonides wrote:
It's not hard to write. Run this on the image
folder:
moveToHashed.php
<?php
$hashLevels = 2;
$dir = opendir(".");
while (($file = readdir($dir)) !== false) {
if (!is_file($file)) continue;
echo "$file\n";
$md5 = md5($file);
$hexString = substr($md5, 0, $hashLevels );
$folder = "";
while (strlen($hexString) > 0) {
$folder = "$hexString/$folder";
$hexString = substr($hexString, 0, - 1);
}
mkdir($folder, 0777, true);
rename($file, "$folder$file");
}
closedir($dir);