aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Crane <mcrane@pfsense.org>2008-12-26 20:59:24 +0000
committerMark Crane <mcrane@pfsense.org>2008-12-26 20:59:24 +0000
commit7899b28a3c2528ab756ef5790492778c2856b035 (patch)
treea5179cf12601e944f6979f3570ce9309763f3a78
parent0830b551dc10a909f826f8352a1627bcb1136cbe (diff)
downloadpfsense-packages-7899b28a3c2528ab756ef5790492778c2856b035.tar.gz
pfsense-packages-7899b28a3c2528ab756ef5790492778c2856b035.tar.bz2
pfsense-packages-7899b28a3c2528ab756ef5790492778c2856b035.zip
TFTP package fix download and file delete.
-rw-r--r--packages/tftp/tftp.xml2
-rw-r--r--packages/tftp/tftp_files.tmp18
-rw-r--r--pkg_config.7.xml2
3 files changed, 9 insertions, 13 deletions
diff --git a/packages/tftp/tftp.xml b/packages/tftp/tftp.xml
index 8ede05ce..4563cc1c 100644
--- a/packages/tftp/tftp.xml
+++ b/packages/tftp/tftp.xml
@@ -41,7 +41,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>tftp Settings</name>
- <version>0.7.1</version>
+ <version>0.7.2</version>
<title>TFTP: Settings</title>
<include_file>/usr/local/pkg/tftp.inc</include_file>
<menu>
diff --git a/packages/tftp/tftp_files.tmp b/packages/tftp/tftp_files.tmp
index 78f59442..b93e9609 100644
--- a/packages/tftp/tftp_files.tmp
+++ b/packages/tftp/tftp_files.tmp
@@ -43,7 +43,7 @@ if (($_GET['a'] == "download") && file_exists("/tftpboot/".$_GET['filename'])) {
header('Content-Disposition: attachment; filename="'.$_GET['filename'].'"');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
- header("Content-Length: " . filesize($recording_dir.$_GET['filename']));
+ header("Content-Length: " . filesize("/tftpboot/".$_GET['filename']));
fpassthru($fd);
exit;
}
@@ -56,14 +56,10 @@ if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_na
if ($_GET['act'] == "del") {
- if ($_GET['type'] == 'ivr') {
- if ($a_ivr[$_GET['id']]) {
- //unset($a_ivr[$_GET['id']]);
- //write_config();
- sync_package_freeswitch_ivr();
- header("Location: tftp_files.php");
- exit;
- }
+ if ($_GET['type'] == 'tftp') {
+ unlink_if_exists("/tftpboot/".$_GET['filename']);
+ header("Location: tftp_files.php");
+ exit;
}
}
@@ -157,8 +153,8 @@ include("head.inc");
echo " <td valign=\"middle\" nowrap class=\"list\">\n";
echo " <table border=\"0\" cellspacing=\"0\" cellpadding=\"1\">\n";
echo " <tr>\n";
- echo " <td valign=\"middle\"><a href=\"tftp_files_edit.php?id=$i\"><img src=\"/themes/".$g['theme']."/images/icons/icon_e.gif\" width=\"17\" height=\"17\" border=\"0\"></a></td>\n";
- echo " <td><a href=\"tftp_files_edit.php?type=tftp&act=del&id=$i\" onclick=\"return confirm('Do you really want to delete this file?')\"><img src=\"/themes/". $g['theme']."/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\"></a></td>\n";
+ //echo " <td valign=\"middle\"><a href=\"tftp_files_edit.php?id=$i\"><img src=\"/themes/".$g['theme']."/images/icons/icon_e.gif\" width=\"17\" height=\"17\" border=\"0\"></a></td>\n";
+ echo " <td><a href=\"tftp_files.php?type=tftp&act=del&filename=".$file."\" onclick=\"return confirm('Do you really want to delete this file?')\"><img src=\"/themes/". $g['theme']."/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\"></a></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index acebfff7..9635eba5 100644
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -80,7 +80,7 @@
<pkginfolink></pkginfolink>
<config_file>http://www.pfsense.com/packages/config/tftp/tftp.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.7.1</version>
+ <version>0.7.2</version>
<status>Alpha</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>