[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. debian/4.0.0debian-1-4-g0068753
Thomas Mueller
thomas.mueller at tmit.eu
Fri May 25 09:51:55 UTC 2012
The following commit has been merged in the master branch:
commit 0068753de0246c0ec96c7b8b5a323603e4ff232c
Author: Thomas Mueller <thomas.mueller at tmit.eu>
Date: Fri May 25 11:51:51 2012 +0200
06_add_head_support_for_download.diff added to fix the odfviewer
diff --git a/debian/changelog b/debian/changelog
index 952a88b..d6f3322 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,15 @@
owncloud (4.0.0debian-2) UNRELEASED; urgency=low
+ [ Paul van Tilburg ]
* debian/control:
- Set the team as maintainer.
- Added a depend on php5-curl; this is needed by the bookmarks app,
which is an internal app.
+ [ Thomas Mueller ]
+ * debian/patches:
+ - 06_add_head_support_for_download.diff added
+
-- Paul van Tilburg <paulvt at debian.org> Fri, 25 May 2012 11:08:23 +0200
owncloud (4.0.0debian-1) experimental; urgency=low
diff --git a/debian/patches/06_add_head_support_for_download.diff b/debian/patches/06_add_head_support_for_download.diff
new file mode 100644
index 0000000..53152f9
--- /dev/null
+++ b/debian/patches/06_add_head_support_for_download.diff
@@ -0,0 +1,34 @@
+--- a/apps/files/ajax/download.php
++++ b/apps/files/ajax/download.php
+@@ -33,5 +33,5 @@
+ $files = $_GET["files"];
+ $dir = $_GET["dir"];
+
+-OC_Files::get($dir,$files);
++OC_Files::get($dir, $files, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
+ ?>
+--- a/lib/files.php
++++ b/lib/files.php
+@@ -52,8 +52,9 @@
+ *
+ * @param dir $dir
+ * @param file $file ; seperated list of files to download
++ * @param boolean $only_header ; boolean to only send header of the request
+ */
+- public static function get($dir,$files){
++ public static function get($dir,$files, $only_header = false){
+ if(strpos($files,';')){
+ $files=explode(';',$files);
+ }
+@@ -118,6 +119,11 @@
+ }else{
+ header("HTTP/1.0 403 Forbidden");
+ die('403 Forbidden');
++ }
++ if($only_header){
++ if(!$zip)
++ header("Content-Length: ".OC_Filesystem::filesize($filename));
++ return ;
+ }
+ if($zip){
+ $handle=fopen($filename,'r');
diff --git a/debian/patches/series b/debian/patches/series
index fff38c2..ad01016 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
03_fix_phpmailer.diff
04_fix_odfviewer.diff
05_no_app_store.diff
+06_add_head_support_for_download.diff
--
owncloud.git
More information about the Pkg-owncloud-commits
mailing list