From: Jonathan A. <ja...@ce...> - 2002-11-17 19:36:20
|
Hello Rui, On Sunday, November 17, 2002, Rui Lopes wrote... > I've installed sm 1.2.9 (i'm using php 4.2.3) but the attach-file > functionality was not working, after diving into the code i managed > to fix it by replacing the code of file src/compose.php, [snip] > with the code, > function saveAttachedFiles($session) { > . . . > if (!move_uploaded_file($_FILES['attachfile']['tmp_name'], > $full_localfilename)) > return true; > . . . > } I think the reason it might have been there to be compatible with 4.0.3 version of PHP or lower, which is a little odd, as I think the minimum requirements are now set at 4.0.4. I'll make the adjustments later, thanks for the pointer. > I have found another "problem", when I'm using mozilla/phoenix > browser and I try to download an attachment, the browser suggest's a > file that has a '.php' extension. http://bugzilla.mozilla.org/show_bug.cgi?id=120327 Or something like that. It's actually a bug in Mozilla/Netscape/Phoenix. If the changes below work okay, I'll try implementing them, and giving them a good test. If I remember correctly, the browser is ignoring the extension of the filename being passed in the headers, and is reading the filename of the item launching the download (ie .php). This would be why your idea seems to be working as it's forcing download.php to be a 'directory' instead of a script, so the browser is reading the output slightly differently. > I have a fix for this, simple append a trailing '/' before the '?', > for example, replace the "download" link, I'll give it a shot, and see if this makes any difference at this end. -- Jonathan Angliss (ja...@ce...) |