In the add preset form you can enter in any name for a preset, and even enter a namespace that has already been used. It appears this is because incorrect usage of '#validate' in imagecache_ui_preset_add_form(), and incorrect usage of in_array (in_array does not recursively search for needle) in the validation function.

Comments

StatusFileSize
new1.72 KB

Oh, I guess we should make the namespace element required as well. Otherwise you can actually leave the field empty and still pass validation.

StatusFileSize
new2.45 KB

Same problems in preset edit form.

Status:Needs review» Fixed

good catches, thanks. committed to HEAD.

Status:Fixed» Active

Status:Active» Needs review
StatusFileSize
new984 bytes

As far as I can tell, there's really no reason for anyone to be able to edit the namespace after it's been created. I don't see anything in there handling the move of the imagecache directory that's been created. So, I just removed the textfield for the presetname and the validation call for the edit form.

that seems reasonable to me. follows the views and cck pattern. and once #255421: Patch for imagecache preset exporting lands you could export it and import with a new name

Status:Needs review» Fixed

committed to HEAD.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.