roundcubemail/program/lib/Roundcube/rcube_imap.php
public function thread_index($folder='', $sort_field=NULL, $sort_order=NULL)
    {
        if (!strlen($folder)) {
            $folder = $this->folder;
        }

        // we have a saved search result, get index from there
        if ($this->search_string && $this->search_threads && $folder == $this->folder) {
            $threads = $this->search_set;
        }
        else {
            // get all threads (default sort order)
            $threads = $this->threads($folder);
        }

        $this->set_sort_order($sort_field, $sort_order);
        $this->sort_threads($threads);

        return $threads;
    }
public function thread_index($folder='', $sort_field=NULL, $sort_order=NULL)
    {
        if (!strlen($folder)) {
            $folder = $this->folder;
        }

        // we have a saved search result, get index from there
        if ($this->search_string && $this->search_threads && $folder == $this->folder) {
            $threads = $this->search_set;
        }
        else {
            // get all threads (default sort order)
            $threads = $this->threads($folder);
        }

        $this->set_sort_order($sort_field, $sort_order);
        $this->sort_threads($threads);

        return $threads;
    }
public function thread_index ( $ folder = '' , $ sort_field = NULL , $ sort_order = NULL ) { if ( ! strlen ( $ folder ) ) { $ folder = $ this -> folder ; } // we have a saved search result, get index from there if ( $ this -> search_string && $ this -> search_threads && $ folder == $ this -> folder ) { $ threads = $ this -> search_set ; } else { // get all threads (default sort order) $ threads = $ this -> threads ( $ folder ) ; } $ this -> set_sort_order ( $ sort_field , $ sort_order ) ; $ this -> sort_threads ( $ threads ) ; return $ threads ; }
Return index of threaded message UIDs

@param string $folder     Folder to get index from
@param string $sort_field Sort column
@param string $sort_order Sort order [ASC, DESC]

@return rcube_result_thread Message UIDs
Return index of threaded message UIDs