I do like acidfree a lot, but right now Mass Import isn't working for me at all since it makes call to the system() and exec() functions in PHP which are disabled by my provider in general. Since it's something that's probably an issue for a lot of people it would be sweet to replace this calls with alternative functions.
As far as I've seen it in the code it's used for:
- getting file information (which can easily be done otherwise if I'm not wrong)
- extracting the Archives (which is unfortunate since it's more difficult to replace this code, I know there are library's to unzip and things like that but it's still a good amount of work)
I know that's a rather big request but otherwise I'll probably write an own Image/Album Manager for now since I want to get into writing Modules for Drupal as well and I need some practice/experience.
--Felix
Comments
Comment #1
vhmauery commentedI am currently working on a way to get around most of the system/exec calls. Writing a image toolkit for imagick (library for imagemagick) will help a lot. This leaves the biggest problem of unzipping archives. There are built-in functions for working with gzipped files, but I don't know about zips and bzips. I can try to work on these too, but I do have a lot on my plate right now. I would be more than happy to get some help in this area if you are interested.
Yes, the file info thing can get replaced with function calls. As can the filesystem stuff. So all that is left that I can see is archive management. That is a lot of work. You could write an archive management module if you are interested in modules. The thing I need to do is untar/zip into a temporary directory and copy the files out of that.
Comment #2
vhmauery commentedI have replaced all the exec/system calls that I can. I just don't think it is reasonable to deal with all the various archive files from acidfree. I have looked into some alternative ways to deal with tar.gz files and that alone is a large chunk of code. You can still use the mass import to upload 5 files at a time (and I have considered adding a button to allow you to add more) or you can use the server-side import option. If you have shell access to your server, you can copy the archives there and then unzip them, and then point acidfree at them to import them. I know that takes a few more steps, but frankly, that is what I do half the time.
Or, you can convince your host provider to allow you to have tar, gzip, bzip2, and zip be put into the 'safe-mode' directory for trusted executables. Just because you are in safe mode doesn't mean NOTHING can be executed. All the other system/exec calls have been replaced with other options except the archive handling. So I think you could work around that and still have an acidfree setup that works.
Comment #3
vhmauery commentedFor now, I am calling this a won't fix. I have replaced all the exec calls I can and there are other options for mass upload (server side upload doesn't require any exec calls). Since there is a work around and I can't condone adding php support for unzipping archives to acidfree, I am closing the feature request.