6.0.0-git
2019-11-14

Diff for ImpSentMboxNotSpecial between 2 and 3

+ Moving sent-mail folders out of special folders area

//Known to work with Horde 4/IMP 5//

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à !