I've created a small patch that allows you to limit the list of images to those that are only by the current user. (useful if you have a site with lots and lots of images)
It comes with a admin setting that allows you to enable / disable this feature (default is disabled) - so once you've applied the patch you will need to go to your admin/settings/image_attach page and enable it.
When the limit is activated, it lists both published and non-published images - when the limit is inactive it works as before and just lists published images.
Hope its of use
Ben
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | image_attach.module.combined.patch | 2.23 KB | smoothify |
| image_attach.module.user_.patch | 1.36 KB | smoothify |
Comments
Comment #1
smoothify commentedHere is a combined patch for if you want to use this with my other recent patch that allows detaching images (http://drupal.org/node/124259)
Comment #2
drewish commentedbit better title, use the status not title to indicate a patch.
i'd prefer a different name for the variable
image_attach_limit_user, perhapsimage_attach_limit_to_user?i'm also not too into the way you're building the query. shouldn't status be one in either case? so if the only difference is 'AND n.uid=foo' it seems like that should be all you add to the $where variable.
Comment #3
smoothify commentedThere is also a second difference between the two - when the limit is off n.status=1 is added to the query.
But if you don't like the way it works feel free to improve it....
Comment #4
sunSorry, 5.x-1.x won't see any new features.