Changeset 721


Ignore:
Timestamp:
02/22/06 03:08:27 (7 years ago)
Author:
anarcat
Message:

[project @ Removed another "du" usage in browser (NFS issues)]

Original author: lunar@…
Date: 2005-09-03 23:44:39

Location:
bureau
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bureau/admin/bro_main.php

    r398 r721  
    8585<a href="bro_main.php?R=/"><?php echo $mem->user["login"]; ?></a>&nbsp;/&nbsp;<?php echo $bro->PathList($R,"bro_main.php") ?><br /> 
    8686<small> 
    87 <b> 
    88 <?php echo format_size($bro->sizetot); ?>&nbsp;/&nbsp;<?php $s=$quota->getquota("web"); echo format_size($s["u"]*1024); ?> 
    89 (max: <?php echo format_size($s["t"]*1024); ?>) 
    90      </b><br /></small> 
    9187<?php if ($error) echo "<font color=\"red\">$error</font>"; ?> 
    9288</td><td valign="top" align="right"> 
  • bureau/class/m_bro.php

    r718 r721  
    3939class m_bro { 
    4040 
    41   /** Taille totale du dossier après appel à FileList */ 
    42   var $sizetot=0; 
    43  
    4441  /** Mode d'affichage des fichiers en colonne */ 
    4542  var $l_mode=array(0=>"1 column, detailed",1=>"2 columns, short",2=>"3 columns, short"); 
     
    113110   * membre courant 
    114111   * @return array le tableau contenant les fichiers de $dir, et 
    115    * $this->sizetot contient en sortie la taille totale du dossier $dir (en octets). 
    116112   */ 
    117113  function filelist($dir="") { 
     
    119115    $db->query("UPDATE browser SET lastdir='$dir' WHERE uid='$cuid';"); 
    120116    $absolute=$this->convertabsolute($dir,0); 
    121     $this->sizetot=0; 
    122117    if ($dir = @opendir($absolute)) { 
    123118      while (($file = readdir($dir)) !== false) { 
    124119        if ($file!="." && $file!="..") { 
    125           $size=$this->fsize($absolute."/".$file); 
    126           $this->sizetot+=$size; 
    127120          $c[]=array("name"=>$file, "size"=>$size, "date"=>filemtime($absolute."/".$file), "type"=> (!is_dir($absolute."/".$file)) ); 
    128121        } 
Note: See TracChangeset for help on using the changeset viewer.