[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/modules class.module_download.inc.php,N
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/modules class.module_download.inc.php,NONE,1.1.2.1 class.module_sitetree.inc.php,1.1,1.1.2.1 |
Date: |
Fri, 11 Apr 2003 11:30:45 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/modules
In directory subversions:/tmp/cvs-serv13750
Modified Files:
Tag: Version-0_9_16-branch
class.module_sitetree.inc.php
Added Files:
Tag: Version-0_9_16-branch
class.module_download.inc.php
Log Message:
module_download: new module for downloading/viewing files from the VFS
module_sitetree: remove redundant call to getcatlinks
--- NEW FILE ---
<?php
class module_download extends Module
{
function module_download()
{
$this->arguments = array(
'path' => array(
'type' => 'textfield',
'label' => 'The path to the file to be
downloaded'
),
'file' => array(
'type' => 'textfield',
'label' => 'The file to be downloaded'
),
'text' => array(
'type' => 'textfield',
'label' => 'The text for the link, if empty the
filename is used'
),
'op' => array(
'type' => 'select',
'label' => 'Should the file be viewed in the
browser or downloaded',
'options' => array(1 => 'viewed', 2 =>
'downloaded')
)
);
$this->post = array('name' => array('type' => 'textfield'));
$this->session = array('name');
$this->title = "File download";
$this->description = "This module create a link for downloading
a file from the VFS";
}
function get_content(&$arguments,$properties)
{
$linkdata['path'] =
rawurlencode(base64_encode($arguments['path']));
if ($arguments['op'] == 2)
{
$linkdata['download'] = 1;
$linkdata['fileman[0]'] =
rawurlencode(base64_encode($arguments['file']));
}
else
{
$linkdata['op'] = rawurlencode(base64_encode('view'));
$linkdata['file'] =
rawurlencode(base64_encode($arguments['file']));
}
return '<a href="' .
phpgw_link('/phpwebhosting/index.php',$linkdata) .
'">' .
($arguments['text'] ? $arguments['text'] :
$arguments['file']) .
'</a>';
}
}
Index: class.module_sitetree.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/modules/class.module_sitetree.inc.php,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -C2 -r1.1 -r1.1.2.1
*** class.module_sitetree.inc.php 4 Mar 2003 17:57:00 -0000 1.1
--- class.module_sitetree.inc.php 11 Apr 2003 15:30:43 -0000 1.1.2.1
***************
*** 58,62 ****
if ($subcats)
{
! $tree .=
$this->showcat($GLOBALS['objbo']->getCatLinks($cat_id,False));
}
--- 58,62 ----
if ($subcats)
{
! $tree .= $this->showcat($subcats);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/modules class.module_download.inc.php,NONE,1.1.2.1 class.module_sitetree.inc.php,1.1,1.1.2.1,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/doc design.pdf,1.1.1.1,NONE requirements.pdf,1.1.1.1,NONE testplan.pdf,1.1.1.1,NONE
- Next by Date:
[Phpgroupware-cvs] CVS: developer_tools/setup phpgw_en.lang,1.5.2.1.2.2,1.5.2.1.2.3
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/doc design.pdf,1.1.1.1,NONE requirements.pdf,1.1.1.1,NONE testplan.pdf,1.1.1.1,NONE
- Next by thread:
[Phpgroupware-cvs] CVS: developer_tools/setup phpgw_en.lang,1.5.2.1.2.2,1.5.2.1.2.3
- Index(es):