Fix: Sort files on name
This commit is contained in:
parent
0f14bb64e7
commit
ed96de8f8b
@ -512,17 +512,17 @@ if ($step == 3 && $datatoimport)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Search available imports
|
// Search available imports
|
||||||
$dir = $conf->import->dir_temp;
|
$filearray=dol_dir_list($conf->import->dir_temp,'files',0,'','','name',SORT_DESC);
|
||||||
$handle=@opendir(dol_osencode($dir));
|
if (count($filearray) > 0)
|
||||||
if (is_resource($handle))
|
|
||||||
{
|
{
|
||||||
//print '<tr><td colspan="4">';
|
$dir=$conf->import->dir_temp;
|
||||||
//print '<table class="noborder" width="100%">';
|
|
||||||
|
|
||||||
// Search available files to import
|
// Search available files to import
|
||||||
$i=0;
|
$i=0;
|
||||||
while (($file = readdir($handle))!==false)
|
foreach ($filearray as $key => $val)
|
||||||
{
|
{
|
||||||
|
$file=$val['name'];
|
||||||
|
|
||||||
// readdir return value in ISO and we want UTF8 in memory
|
// readdir return value in ISO and we want UTF8 in memory
|
||||||
if (! utf8_check($file)) $file=utf8_encode($file);
|
if (! utf8_check($file)) $file=utf8_encode($file);
|
||||||
|
|
||||||
@ -555,7 +555,6 @@ if ($step == 3 && $datatoimport)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
//print '</table></td></tr>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table></form>';
|
print '</table></form>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user