phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc class.uientity.inc.php class.uitts...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.uientity.inc.php class.uitts...
Date: Sun, 20 May 2007 12:59:13 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   07/05/20 12:59:13

Modified files:
        inc            : class.uientity.inc.php class.uitts.inc.php 

Log message:
        fix for download file

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uitts.inc.php?cvsroot=phpgroupware&r1=1.57&r2=1.58

Patches:
Index: class.uientity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- class.uientity.inc.php      29 Mar 2007 08:48:58 -0000      1.43
+++ class.uientity.inc.php      20 May 2007 12:59:12 -0000      1.44
@@ -24,7 +24,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.uientity.inc.php,v 1.43 2007/03/29 08:48:58 
sigurdne Exp $
+       * @version $Id: class.uientity.inc.php,v 1.44 2007/05/20 12:59:12 
sigurdne Exp $
        */
 
        /**
@@ -252,22 +252,22 @@
                                'relatives' => Array(RELATIVE_NONE)
                                )))
                        {
-                               $size           = 
$this->bo->vfs->get_size(array(
+                               $ls_array = $this->bo->vfs->ls (array (
                                                        'string' => $file,
                                                        'relatives' => 
Array(RELATIVE_NONE),
-                                                       'checksubdirs' => 
True));
+                                               'checksubdirs'  => False,
+                                               'nofiles'       => True
+                                       )
+                               );
 
                                $document= $this->bo->vfs->read(array(
                                        'string' => $file,
                                        'relatives' => Array(RELATIVE_NONE)));
 
-                               $filename       = 
basename($values['document_name']);
-                               $filetype = array_pop(explode('.', 
basename($file)));
                                $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,$filetype,$size);
+                               
$browser->content_header($ls_array[0]['name'],$ls_array[0]['mime_type'],$ls_array[0]['size']);
 
                                echo $document;
-
                        }
                }
 

Index: class.uitts.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uitts.inc.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- class.uitts.inc.php 19 May 2007 20:52:10 -0000      1.57
+++ class.uitts.inc.php 20 May 2007 12:59:12 -0000      1.58
@@ -24,7 +24,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage helpdesk
-       * @version $Id: class.uitts.inc.php,v 1.57 2007/05/19 20:52:10 sigurdne 
Exp $
+       * @version $Id: class.uitts.inc.php,v 1.58 2007/05/20 12:59:12 sigurdne 
Exp $
        */
 
        /**
@@ -2055,25 +2055,26 @@
 
                        $file = $this->fakebase. SEP . 'fmticket' . SEP . $id . 
SEP . $file_name;
 
-//echo 'file: ' . $file . '<br>';
                        if($this->bo->vfs->file_exists(array(
                                'string' => $file,
                                'relatives' => Array(RELATIVE_NONE)
                                )))
                        {
-                               $size           = 
$this->bo->vfs->get_size(array(
+
+                               $ls_array = $this->bo->vfs->ls (array (
                                                        'string' => $file,
                                                        'relatives' => 
Array(RELATIVE_NONE),
-                                                       'checksubdirs' => 
True));
+                                               'checksubdirs'  => False,
+                                               'nofiles'       => True
+                                       )
+                               );
 
                                $document= $this->bo->vfs->read(array(
                                        'string' => $file,
                                        'relatives' => Array(RELATIVE_NONE)));
 
-                               $filename       = 
basename($values['document_name']);
-                               $filetype = array_pop(explode('.', 
basename($file)));
                                $browser = CreateObject('phpgwapi.browser');
-                               
$browser->content_header($filename,$filetype,$size);
+                               
$browser->content_header($ls_array[0]['name'],$ls_array[0]['mime_type'],$ls_array[0]['size']);
 
                                echo $document;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]