Quote:
Originally Posted by Jay...
i never used to have this problem, i just installed the latest version of your hack
|
beats me! But, if you want to ensure the files on the mass import screen are in A - Z order, do this:
in admincp/downloadadmin.php around line 292
FIND:
PHP Code:
while (false !== ($file = readdir($handle)))
{
if (is_file($_POST['dir'].$file) AND strstr("|".str_replace(" ","|",$dl->ext)."|",strtolower(substr($file, strrpos($file, '.')+1))))
{
$file = str_replace(array("[","]"),array("(openbracket)","(closebracket)"),$file);
$class = fetch_row_bgclass();
echo '<tr><td class="'.$class.'">'.$file.'</td><td class="'.$class.'"><input type="text" size="20" name="dname['.$file.']" /></td><td class="'.$class.'"><input type="text" size="20" name="author['.$file.']" /></td><td class="'.$class.'"><input type="text" size="20" name="desc['.$file.']" /></td><td class="'.$class.'"><select name="category['.$file.']">'.$category_select.'</select></td><td class="'.$class.'"><select name="pinned['.$file.']"><option value="-1">-----</option><option value="0">No</option><option value="1">Yes</option></select></td><td class="'.$class.'"><input type="checkbox" name="import['.$file.']" value="1" /></td></tr>';
}
}
closedir($handle);
REPLACE with
PHP Code:
$files = array();
while (false !== ($file = readdir($handle)))
{
if (is_file($_POST['dir'].$file) AND strstr("|".str_replace(" ","|",$dl->ext)."|",strtolower(substr($file, strrpos($file, '.')+1))))
{
array_push($files, $file);
}
}
closedir($handle);
sort($files);
foreach ($files as $file) {
$file = str_replace(array("[","]"),array("(openbracket)","(closebracket)"),$file);
$class = fetch_row_bgclass();
echo '<tr><td class="'.$class.'">'.$file.'</td><td class="'.$class.'"><input type="text" size="20" name="dname['.$file.']" /></td><td class="'.$class.'"><input type="text" size="20" name="author['.$file.']" /></td><td class="'.$class.'"><input type="text" size="20" name="desc['.$file.']" /></td><td class="'.$class.'"><select name="category['.$file.']">'.$category_select.'</select></td><td class="'.$class.'"><select name="pinned['.$file.']"><option value="-1">-----</option><option value="0">No</option><option value="1">Yes</option></select></td><td class="'.$class.'"><input type="checkbox" name="import['.$file.']" value="1" /></td></tr>';
}