roundcubemail/program/lib/Roundcube/rcube_imap.php
protected function fetch_thread_headers($folder, $threads, $page, $slice=0)
    {
        // Sort thread structure
        $this->sort_threads($threads);

        $from = ($page-1) * $this->page_size;
        $to   = $from + $this->page_size;

        $threads->slice($from, $to - $from);

        if ($slice) {
            $threads->slice(-$slice, $slice);
        }

        // Get UIDs of all messages in all threads
        $a_index = $threads->get();

        // fetch reqested headers from server
        $a_msg_headers = $this->fetch_headers($folder, $a_index);

        unset($a_index);

        // Set depth, has_children and unread_children fields in headers
        $this->set_thread_flags($a_msg_headers, $threads);

        return array_values($a_msg_headers);
    }
protected function fetch_thread_headers($folder, $threads, $page, $slice=0)
    {
        // Sort thread structure
        $this->sort_threads($threads);

        $from = ($page-1) * $this->page_size;
        $to   = $from + $this->page_size;

        $threads->slice($from, $to - $from);

        if ($slice) {
            $threads->slice(-$slice, $slice);
        }

        // Get UIDs of all messages in all threads
        $a_index = $threads->get();

        // fetch reqested headers from server
        $a_msg_headers = $this->fetch_headers($folder, $a_index);

        unset($a_index);

        // Set depth, has_children and unread_children fields in headers
        $this->set_thread_flags($a_msg_headers, $threads);

        return array_values($a_msg_headers);
    }
protected function fetch_thread_headers ( $ folder , $ threads , $ page , $ slice = 0 ) { // Sort thread structure $ this -> sort_threads ( $ threads ) ; $ from = ( $ page - 1 ) * $ this -> page_size ; $ to = $ from + $ this -> page_size ; $ threads -> slice ( $ from , $ to - $ from ) ; if ( $ slice ) { $ threads -> slice ( - $ slice , $ slice ) ; } // Get UIDs of all messages in all threads $ a_index = $ threads -> get ( ) ; // fetch reqested headers from server $ a_msg_headers = $ this -> fetch_headers ( $ folder , $ a_index ) ; unset ( $ a_index ) ; // Set depth, has_children and unread_children fields in headers $ this -> set_thread_flags ( $ a_msg_headers , $ threads ) ; return array_values ( $ a_msg_headers ) ; }
protected method for fetching threaded messages headers

@param string              $folder     Folder name
@param rcube_result_thread $threads    Threads data object
@param int                 $page       List page number
@param int                 $slice      Number of threads to slice

@return array Messages headers
protected method for fetching threaded messages headers