[commits] [Wiki] created: ImpH4SentMboxNotSpecial

Wiki Guest wikiguest at horde.org
Fri May 3 09:40:01 UTC 2013


guest [80.12.85.61]  Fri, 03 May 2013 09:40:01 +0000

Created page: http://wiki.horde.org/ImpH4SentMboxNotSpecial

If you have a lot of identities with different sent mailboxes, IMP's  
left panel might not be as convenient as it's been designed for.

This quick hack will move sent folders into the tree in the lower part  
of the panel.

Search for this method in your horde/imp/lib/Mailbox.php

<code type="php">
     /**
      */
     public function __get($key)
     {
         global $injector;
</code>

Inside that method, search for this snippet of code :

<code type="php">
         case 'special':
             $special = $this->getSpecialMailboxes();

             switch ($this->_mbox) {
             case $special[self::SPECIAL_COMPOSETEMPLATES]:
             case $special[self::SPECIAL_DRAFTS]:
             case $special[self::SPECIAL_SPAM]:
             case $special[self::SPECIAL_TRASH]:
                 return true;
             }

             return in_array($this->_mbox, array_merge(
                 $special[self::SPECIAL_SENT],
                 $special[self::SPECIAL_USERHOOK]
             ));
</code>

Simply comment the line about SPECIAL_SENT like this :
<code type="php">
         case 'special':
             $special = $this->getSpecialMailboxes();

             switch ($this->_mbox) {
             case $special[self::SPECIAL_COMPOSETEMPLATES]:
             case $special[self::SPECIAL_DRAFTS]:
             case $special[self::SPECIAL_SPAM]:
             case $special[self::SPECIAL_TRASH]:
                 return true;
             }

             return in_array($this->_mbox, array_merge(
//              $special[self::SPECIAL_SENT],
                 $special[self::SPECIAL_USERHOOK]
             ));
</code>

And voilà !



More information about the commits mailing list