From bbdb44aa63e32461127788be89a8dfd1eddd67e5 Mon Sep 17 00:00:00 2001 From: wlx Date: Sun, 4 Jul 2010 08:54:29 +0000 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E6=95=B0=E6=8D=AE=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E4=B8=BAMB=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/WatermdController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/admin/controllers/WatermdController.php b/application/admin/controllers/WatermdController.php index 9a9d186d..c8ff1dc4 100644 --- a/application/admin/controllers/WatermdController.php +++ b/application/admin/controllers/WatermdController.php @@ -175,7 +175,12 @@ class Admin_WatermdController extends Zend_Controller_Action $sql="select sum(file_size) as fsize from westdc_fileinfo where meta_uuid = ?"; $this->db->setFetchMode(Zend_Db::FETCH_OBJ); $row=$this->db->fetchRow($sql,array($uuid)); - $transize_path->item(0)->nodeValue=$row->fsize; + //转换单位为MB + $msize=round($row->fsize/(1024*1024),2); + if($msize>10){ + $msize=round($size/(1024*1024),1); + } + $transize_path->item(0)->nodeValue=msize; $new_data = $dom->saveXML($root->item(0)); //防止错误 if (!empty($new_data))