[weps-devel] Re: [weps-users] Uploaded files don't exist
Status: Beta
Brought to you by:
aleix
|
From: Anders B. O. <an...@br...> - 2002-11-21 15:18:11
|
Moved from weps-users to weps-devel On Thu, Nov 21, 2002 at 12:17:03AM +0100, Aleix Conchillo Flaque wrote: > > I actually have one more thing.. when I check files in a package and > > choose to download as a tarball the tarball is defect .. tar doesn't > > extract anything when I try to.. > mmmmm... i have the same problem in FreeBSD. that's because when you > choose to download the tarball i need that the "tar" outputs its output > to stdout but in FreeBSD "tar" command differs from the one i have in > Debian... . one possibility is to create the tarball to disk. the > problem doing it this way is that it's impossible to know when to delete > the file. i guess i check if some of the files in tha package has > changed an recreate the tarball when needed. another problem is the > diskspace needed to keep all tarballs... have to think about it. My idea would probably be to create the tarball to a tmp dir and then use php's filepointer feature together with a correct header to send that file to the user .. then just do a check for tarballs in the tmp location that are more than say 2 hours old and remove them .. that check could be triggered when a random number is higher than X in a common header so that the check isn't done everytime a page is loaded.. > > Oh, and I looked into adding a "check all files" javascript function to > > make it easier to check all files in a large package, but the way you > > name the checkboxes prevent that. I realize that the checkboxes need to > > be named differently to be able to use them in PHP. I have thought of > > different solutions to this problem but have yet to find a useable one. > > I thought of using a name like filecheck[] and then having the file ID > > in the value, but it is not possible to reference a name with [] in > > javascript, so even though it would work in PHP (you get a $filecheck > > array with all of the values checked off), it won't make it possible to > > do a check/uncheck all button in javascript. > you can do it in javascript without changing the current name. i do that > two or three years ago in javascript. i think i checked if there were > checkboxes elements in the html form or somethinkg like that... Ahh.. that might be possible.. my javascript skills aren't that good :) > another reason for this "all file checking" feature not being > implemented is that WePS is right now 100% javascript free, that means > it works in all browsers (even lynx). That is a nice thing, but as browsers without javascript capabilities ignore <script> tags (where a function check all boxes would be defined) and the box/button that calls the javascript function is partly ignored, then it won't hurt those browsers, they will still be able to use WePS.. > may be we could add some configuration parameter so you can choose if > you want javascript enabled or not. with javascript enabled lots of > things could be done easier... but it was an initial feature which i > really like ;). That seems to be doing unnecessary work.. the javascript can be "hidden" in the pages so that non-javascript browsers will just ignore it. As long as no core features depend upon javascript it should be alright. However small enhancement features such as the check all button/box is not essential, and is done most easily with javascript (even though I could probably easy whip together a PHP implementation instead). Come to think of it, what would you say to a PHP way of doing an invert selection button?.. if I make it, will you include it? > > Should we move over to the devel list? > sure :) Hereby done (isn't doing things the right way neat? ;) -- Anders -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS/O d--@ s:+ a-- C++ $UL+++ P++ L+++ E- W+ N(+) o K? w O- M-- V PS+ PE@ Y+ PGP+ t 5 X R+ tv+ b+ DI+++ D+ G e- h !r y? ------END GEEK CODE BLOCK------ PGPKey: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8BFECB41 |