Bug #4480: always show mailbox list, even on ACL list error
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Oct 2010 06:04:33 +0000 (00:04 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Oct 2010 06:04:33 +0000 (00:04 -0600)
imp/lib/Prefs/Ui.php
imp/templates/prefs/acl.html

index 1ee767d..6307925 100644 (file)
@@ -701,10 +701,9 @@ class IMP_Prefs_Ui
             $curr_acl = $acl->getACL($folder);
         } catch (IMP_Exception $e) {
             $GLOBALS['notification']->push($e);
-            return '';
+            $curr_acl = array();
         }
         $canEdit = $acl->canEdit($folder, $GLOBALS['registry']->getAuth());
-
         $canEdit = false;
 
         if (!$canEdit) {
@@ -722,9 +721,8 @@ class IMP_Prefs_Ui
         $t->set('current', sprintf(_("Current access to %s"), IMP::displayFolder($folder)));
         $t->set('folder', IMP::formMbox($folder, true));
         $t->set('hasacl', count($curr_acl));
-        $t->set('maxrule', 1);
 
-        if (!$t->get('noacl')) {
+        if (!$t->get('hasacl')) {
             $i = 0;
             $cval = array();
             $protected = $acl->getProtected();
@@ -750,10 +748,6 @@ class IMP_Prefs_Ui
              }
 
              $t->set('curr_acl', $cval);
-             $t->set('maxval', count($curr_acl));
-
-             /* Number of individual ACL options, for table rendering. */
-             $t->set('maxrule', count($rights));
         }
 
         $t->set('canedit', $canEdit);
index 5e6bb30..c1cc15c 100644 (file)
@@ -1,11 +1,11 @@
 <input type="hidden" name="acl_folder" value="<tag:folder />" />
 
+<if:hasacl>
 <div>
  <h3><tag:current /></h3>
 </div>
 
 <table class="prefsAclTable">
-<if:hasacl>
 <tr>
  <th class="item" width="<tag:width />">
   <h4><strong><gettext>User</gettext></strong></h4>
@@ -50,8 +50,8 @@
 </loop:rights>
 </tr>
 </if:canedit>
-</if:hasacl>
 </table>
+</if:hasacl>
 
 <div>
  <span class="folderImg"></span>