roundcubemail/program/lib/Roundcube/rcube_storage.php
protected function parse_uids($uids)
    {
        if ($uids === '*' || $uids === '1:*') {
            if (empty($this->search_set)) {
                $uids = '1:*';
                $all = true;
            }
            // get UIDs from current search set
            else {
                $uids = join(',', $this->search_set->get());
            }
        }
        else {
            if (is_array($uids)) {
                $uids = join(',', $uids);
            }
            else if (strpos($uids, ':')) {
                $uids = join(',', rcube_imap_generic::uncompressMessageSet($uids));
            }

            if (preg_match('/[^0-9,]/', $uids)) {
                $uids = '';
            }
        }

        return array($uids, (bool) $all);
    }
protected function parse_uids($uids)
    {
        if ($uids === '*' || $uids === '1:*') {
            if (empty($this->search_set)) {
                $uids = '1:*';
                $all = true;
            }
            // get UIDs from current search set
            else {
                $uids = join(',', $this->search_set->get());
            }
        }
        else {
            if (is_array($uids)) {
                $uids = join(',', $uids);
            }
            else if (strpos($uids, ':')) {
                $uids = join(',', rcube_imap_generic::uncompressMessageSet($uids));
            }

            if (preg_match('/[^0-9,]/', $uids)) {
                $uids = '';
            }
        }

        return array($uids, (bool) $all);
    }
protected function parse_uids ( $ uids ) { if ( $ uids === '*' || $ uids === '1:*' ) { if ( empty ( $ this -> search_set ) ) { $ uids = '1:*' ; $ all = true ; } // get UIDs from current search set else { $ uids = join ( ',' , $ this -> search_set -> get ( ) ) ; } } else { if ( is_array ( $ uids ) ) { $ uids = join ( ',' , $ uids ) ; } else if ( strpos ( $ uids , ':' ) ) { $ uids = join ( ',' , rcube_imap_generic :: uncompressMessageSet ( $ uids ) ) ; } if ( preg_match ( '/[^0-9,]/' , $ uids ) ) { $ uids = '' ; } } return array ( $ uids , ( bool ) $ all ) ; }
Parse message UIDs input

@param mixed $uids UIDs array or comma-separated list or '*' or '1:*'

@return array Two elements array with UIDs converted to list and ALL flag
Parse message UIDs input