Skip to content

Commit

Permalink
Fix: Sort files on name
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 21, 2011
1 parent 0f14bb6 commit ed96de8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions htdocs/imports/import.php
Expand Up @@ -512,17 +512,17 @@
print "</tr>\n";

// Search available imports
$dir = $conf->import->dir_temp;
$handle=@opendir(dol_osencode($dir));
if (is_resource($handle))
$filearray=dol_dir_list($conf->import->dir_temp,'files',0,'','','name',SORT_DESC);
if (count($filearray) > 0)
{
//print '<tr><td colspan="4">';
//print '<table class="noborder" width="100%">';
$dir=$conf->import->dir_temp;

// Search available files to import
$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
if (! utf8_check($file)) $file=utf8_encode($file);

Expand Down Expand Up @@ -555,7 +555,6 @@
print '</td>';
print '</tr>';
}
//print '</table></td></tr>';
}

print '</table></form>';
Expand Down

0 comments on commit ed96de8

Please sign in to comment.