Changeset 513


Ignore:
Timestamp:
02/22/06 00:26:05 (7 years ago)
Author:
anarcat
Message:

[project @ alternc: changeset 2005-01-20 04:10:59 by anarcat]
sort the entries in the file popup dialog Patch by: Olivier HUET
(thanks!)

Original author: anarcat
Date: 2005-01-20 04:10:59

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bureau/admin/browseforfolder.php

    r150 r513  
    4242        $nextstr=substr($curdir,$pos+1,$next-$pos-1); 
    4343        $c=opendir($root.$rot); 
    44         while ($r=readdir($c)) { 
    45                 if (is_dir($root.$rot."/".$r) && $r!="." && $r!="..") { 
     44        $i=0; 
     45        while ($r=readdir($c)) {  
     46                if (is_dir($root.$rot."/".$r) && $r!="." && $r!="..") { $tmp[$i++]=$r; } 
     47        } 
     48        sort($tmp);      
     49        foreach ($tmp as $r) { 
    4650                        /* Ajout */ 
    4751                        $brlist[]=array("dir"=>$r,"level"=>$level,"put"=> ife($curdir==$rot."/".$r."/","",$rot."/".$r)); 
     
    4953                                _subbrowse($curdir,$next,$level+1); 
    5054                        } 
    51                 } 
    5255        } 
    5356} 
Note: See TracChangeset for help on using the changeset viewer.