IMP_Ftree::loadUnsubscribed PHP Method

loadUnsubscribed() public method

Load unsubscribed mailboxes.
public loadUnsubscribed ( )
    public function loadUnsubscribed()
    {
        /* If we are switching from unsubscribed to subscribed, no need
         * to do anything (we just ignore unsubscribed stuff). */
        if ($this->unsubscribed_loaded) {
            return;
        }
        $this->_changed = true;
        /* The BASE_ELT having the SUBSCRIBED mask indicates the unsubscribed
         * mailboxes have been loaded into the object. */
        $this->setAttribute('subscribed', self::BASE_ELT, true);
        /* If we are switching from subscribed to unsubscribed, we need
         * to add all unsubscribed elements that live in currently
         * discovered items. */
        $old_track = $this->eltdiff->track;
        $this->eltdiff->track = false;
        foreach ($this->_accounts as $val) {
            array_map(array($this, '_insertElt'), $val->getList(array(), $val::UNSUB));
        }
        $this->eltdiff->track = $old_track;
    }