[imp] IMAP ACLs [PATCH]

Chris Hastie lists at oak-wood.co.uk
Mon Feb 3 17:38:17 PST 2003


On Mon, 3 Feb 2003, Jan Schneider <jan at horde.org> wrote
>I wasn't able to teste it with non-ascii folder names because I wasn't able
>to change the folder and edit the ACLs for any other folder than INBOX. The
>page just reloaded and nothing happened.

Doh!! I think I see where the problem lies. I forgot to actually get the 
value of the folder from the form! On my set up if nothing else is done 
a form element 'folder' will appear as the variable $folder, so it 
worked OK here. Try this:

--- imp/acl.php,v 1.1
+++ imp/acl.php Mon Feb  3 17:26:08 2003
@@ -26,6 +26,7 @@
     message if not */
  $driverSupported = $ACLDriver->isSupported;
  $protected  = $ACLDriver->protected;
+$folder = '';

  if (!$driverSupported){
      $notification->push(_("This server does not support sharing folders."), 'horde.error');
@@ -98,7 +99,7 @@
          $options = IMP::flistSelect(_("Change Folder"), true);
      }

-    if (empty($folder)) {
+    if (empty($folder) && !($folder = Horde::getFormData('folder'))) {
          $folder = 'INBOX';
      }

and whilst I'm writing, here's a minor cosmetic change elsewhere:

--- imp/templates/acl/list.inc.orig     Mon Feb  3 17:14:58 2003
+++ imp/templates/acl/list.inc  Mon Feb  3 17:15:11 2003
@@ -12,8 +12,8 @@
          <tr>
              <td align="left" class="header" nowrap="nowrap"><b><?php echo _("Current access to ").$folder; ?></b></td>
              <td align="right" nowrap="nowrap">
-                <a class="menuitem" href="" onclick="ACLFolderChange(true); return false;" onmouseover="window.status='Open Folder'; return true;" onmouseout="window.status=''; return true;">
-                <img src="/horde/imp/graphics/folders/folder_open.gif" border="0" alt="<?php echo _("Change Folder") ?>" title="<?php echo _("Change Folder") ?>" /></a>
+                <a class="menuitem" href="" onclick="ACLFolderChange(true); return false;" onmouseover="window.status='<?php echo _("Change Folder") ?>'; return true;" onmouseout="window.status=''; return true;">
+                <img src="/horde/imp/graphics/shared.gif" border="0" alt="<?php echo _("Change Folder") ?>" title="<?php echo _("Change Folder") ?>" /></a>
                  <select name="folder" onchange="ACLFolderChange()"><?php echo $options ?></select>&nbsp;
              </td>
          </tr>


-- 
Chris Hastie


More information about the imp mailing list