phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: nntp view_attachment.php,1.13,1.14


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: nntp view_attachment.php,1.13,1.14
Date: Sat, 26 Jan 2002 19:34:40 -0500

Update of /cvsroot/phpgroupware/nntp
In directory subversions:/tmp/cvs-serv30696/nntp

Modified Files:
        view_attachment.php 
Log Message:
This will now write/read/delete files to the users .NNTP app directory 
correctly.

Index: view_attachment.php
===================================================================
RCS file: /cvsroot/phpgroupware/nntp/view_attachment.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** view_attachment.php 29 Dec 2001 18:12:55 -0000      1.13
--- view_attachment.php 27 Jan 2002 00:34:37 -0000      1.14
***************
*** 25,37 ****
        include('../header.inc.php');
  
!       $file = urldecode($file);
!       if ($GLOBALS['phpgw']->vfs->file_exists($file,array(RELATIVE_USER_APP)))
        {
!               Header('Content-length: 
'.$GLOBALS['phpgw']->vfs->get_size($file,array(RELATIVE_USER_APP)));
!               Header('Content-type: 
'.$GLOBALS['phpgw']->vfs->file_type($file,array(RELATIVE_USER_APP)));
!               Header('Content-disposition: attachment; filename="'.$file.'"');
!               echo 
$GLOBALS['phpgw']->vfs->read($file,array(RELATIVE_USER_APP));
                flush();
! //            $GLOBALS['phpgw']->vfs->rm($file,array(RELATIVE_USER_APP));
        }
  ?>
--- 25,40 ----
        include('../header.inc.php');
  
!       $vfs_params = Array(
!               'string'        => urldecode($GLOBALS['HTTP_GET_VARS']['file']),
!               'relatives'     => array(RELATIVE_USER_APP)
!       );              
!       if ($GLOBALS['phpgw']->vfs->file_exists($vfs_params))
        {
!               Header('Content-length: 
'.$GLOBALS['phpgw']->vfs->get_size($vfs_params));
!               Header('Content-type: 
'.$GLOBALS['phpgw']->vfs->file_type($vfs_params));
!               Header('Content-disposition: attachment; 
filename="'.$vfs_params['string'].'"');
!               echo $GLOBALS['phpgw']->vfs->read($vfs_params);
                flush();
!               $GLOBALS['phpgw']->vfs->rm($vfs_params);
        }
  ?>




reply via email to

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