Monday 13 July 2009 8:11:52 am
First thing to do is backup the files that will be altered just to be safe. So look in the inline.diff and see the files that it works on. In this case they are:
kernel/classes/binaryhandlers/ezfilepassthrough/ezfilepassthroughhandler.php
settings/file.ini
As this is a small diff file you could always make the changes by hand. This way at least you are aware of everything that goes on. The diff file contains lines beginning with + or -, a + means the line is added and a - means that the line is removed. Using the numbers on the lines beginning @ and lines that don't have either a + or - at the start, find where the code is to change. For example:
@@ -86,7 +86,10 @@
header( "Content-Length: $contentLength" );
header( "Content-Type: $mimeType" );
header( "X-Powered-By: eZ Publish" );
Means that line 86 should be:
header( "Content-Length: $contentLength" );
Once you are in the right part of the file use the + and - lines. For example:
- header( "Content-disposition: attachment; filename=\"$originalFileName\"" );
+
+ $dispositionType = self::dispositionType( $mimeType );
+ header( "Content-disposition: $dispositionType; filename=\"$originalFileName\"" );
Means to remove the line:
header( "Content-disposition: attachment; filename=\"$originalFileName\"" );
and in its place put:
$dispositionType = self::dispositionType( $mimeType );
header( "Content-disposition: $dispositionType; filename=\"$originalFileName\"" );
The alternative (quicker) method is to use the patch command on a Linux/Unix system. For this you could put the inline.diff file in the eZ Publish root directory and run:
patch -Np0 -i inline.diff
This should do the changes for you.
|