roundcubemail/plugins/archive/archive.php
private function _mod_folder_name(&$list, $folder, $new_name)
    {
        foreach ($list as $idx => $item) {
            if ($item['id'] == $folder) {
                $list[$idx]['name'] = $new_name;
                return true;
            }
            else if (!empty($item['folders'])) {
                if ($this->_mod_folder_name($list[$idx]['folders'], $folder, $new_name)) {
                    return true;
                }
            }
        }

        return false;
    }
private function _mod_folder_name(&$list, $folder, $new_name)
    {
        foreach ($list as $idx => $item) {
            if ($item['id'] == $folder) {
                $list[$idx]['name'] = $new_name;
                return true;
            }
            else if (!empty($item['folders'])) {
                if ($this->_mod_folder_name($list[$idx]['folders'], $folder, $new_name)) {
                    return true;
                }
            }
        }

        return false;
    }
private function _mod_folder_name ( & $ list , $ folder , $ new_name ) { foreach ( $ list as $ idx => $ item ) { if ( $ item [ 'id' ] == $ folder ) { $ list [ $ idx ] [ 'name' ] = $ new_name ; return true ; } else if ( ! empty ( $ item [ 'folders' ] ) ) { if ( $ this -> _mod_folder_name ( $ list [ $ idx ] [ 'folders' ] , $ folder , $ new_name ) ) { return true ; } } } return false ; }
Helper method to find the archive folder in the mailbox tree
Helper method to find the archive folder in the mailbox tree