[imp] creating/deleting folders with dots
Michael Cochrane
mike@graftonhall.co.nz
Tue, 25 Jun 2002 11:17:18 +0100
Here's a patch to make the javascript check for the presence of the delimiter in
the folder name. In my case it's a '/' character.
Index: imp/templates/folders/javascript.inc
===================================================================
RCS file: /httpd/horde/imp/templates/folders/javascript.inc,v
retrieving revision 1.13
diff -I$Horde -I$Revision -I$Date -r1.13 javascript.inc
9a10
> var containsDelimiter = '<?php echo addslashes(_(sprintf("You can not create
folder containing the '%s' character.",
IMP_Folder::getDelimiter($imp['stream'])))) ?>';
104,106c105,112
< document.fmanager.new_mailbox.value = mbox;
< document.fmanager.actionID.value = <?php echo CREATE_FOLDER ?>;
< document.fmanager.submit();
---
> if (mbox.indexOf('<?php echo
addslashes(IMP_Folder::getDelimiter($imp['stream'])) ?>') == -1) {
> document.fmanager.new_mailbox.value = mbox;
> document.fmanager.actionID.value = <?php echo CREATE_FOLDER ?>;
> document.fmanager.submit();
> } else {
> window.alert(containsDelimiter);
> return;
> }
- Mike :-)
Quoting Oliver Kuhl <okuhl@netcologne.de>:
> Hi!
>
> In the foldes-view I created a folder called "Dr.Web". Then a folder "Dr" was
>
> created and a folder "Web" beneath. That's not what I expected.
>
> What do you think, is it a bug? Or is there an option to prevent users
> creating
> folders with dots? I think the problem is in my case the courier-imap-server
> with maildir, which doesn't allow dots in the folders because they're
> interpreted as another folder. Maybe there is a possibility to replace the
> dot
> with any kind of entity.
> The other Problem is that you can't easily delete the folder "Dr". You have
> to
> delete the folder "Web" and cannot delete "Dr", but if you log out and in
> again
> the folder "Dr" is gone. Seems to be cache by IMP.
>
> In my opinion two behaviours of IMP would be fine:
> 1. Folders with dots cannot be created and the user gets an error-message.
> 2. Folders with dots can be created and the created folder really has the
> name
> the user wants (i.e. "Dr.Web")
>
> What do you think?
>
> Regards,
> Oliver.
>
>
> --
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/