[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] filemanager/inc class.bofilemanager.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] filemanager/inc class.bofilemanager.inc.php |
Date: |
Thu, 17 Aug 2006 14:57:28 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: filemanager
Changes by: Dave Hall <skwashd> 06/08/17 14:57:28
Modified files:
inc : class.bofilemanager.inc.php
Log message:
expose some methods for use in the sitemgr - filebrowser module
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/filemanager/inc/class.bofilemanager.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
Patches:
Index: class.bofilemanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/filemanager/inc/class.bofilemanager.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- class.bofilemanager.inc.php 17 Aug 2006 10:55:32 -0000 1.28
+++ class.bofilemanager.inc.php 17 Aug 2006 14:57:27 -0000 1.29
@@ -8,7 +8,7 @@
* @copyright Portions Copyright (C) 2000-2005 Free Software Foundation,
Inc http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package filemanager
- * @version $Id: class.bofilemanager.inc.php,v 1.28 2006/08/17 10:55:32
skwashd Exp $
+ * @version $Id: class.bofilemanager.inc.php,v 1.29 2006/08/17 14:57:27
skwashd Exp $
* @internal Based on phpWebhosting
*/
@@ -62,6 +62,7 @@
var $public_functions = array
(
+ 'f_download' => true,
'load_files' => true
);
@@ -697,23 +698,28 @@
function f_download()
{
- for($i=0;$i<count($this->fileman);++$i)
+ /* JSON hack around */
+ if ( (!isset($this->fileman) ||
!is_array($this->fileman) || !count($this->fileman) )
+ && (isset($this->file) && strlen($this->file) )
)
{
- if($this->fileman[$i] &&
$GLOBALS['phpgw']->vfs->file_exists(array(
- 'string' =>
$this->bo->path.SEP.$this->bo->fileman[$i],
- 'relatives' => Array(RELATIVE_NONE))))
+ $this->fileman = array($this->file);
+ }
+
+ foreach ( $this->fileman as $file )
+ {
+ if (
$GLOBALS['phpgw']->vfs->file_exists(array('string' =>
"{$this->path}/$file",'relatives' => Array(RELATIVE_NONE) ) ) )
{
execmethod('filemanager.uifilemanager.view_file',
Array(
'path' => $this->path,
- 'file' =>
$this->fileman[$i]
+ 'file' => $file
)
);
- $result[] = lang('file downloaded: %1',
$this->path.SEP.$this->fileman[$i]);
+ $result[] = lang('file downloaded: %1',
"{$this->path}/$file");
}
else
{
- $result[] = lang('file does not exist:
%1', $this->path.SEP.$this->fileman[$i]);
+ $result[] = lang('file does not exist:
%1', "{$this->path}/$file");
}
}
return is_array($result)?$result:True;