Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 373... Línea 373...
373
            $element = preg_quote(self::SEPARATOR_ELEMENT, '/');
373
            $element = preg_quote(self::SEPARATOR_ELEMENT, '/');
374
            $item    = preg_quote(self::SEPARATOR_ITEM, '/') . '[0-9]+' . preg_quote(self::SEPARATOR_LEVEL, '/') .'?';
374
            $item    = preg_quote(self::SEPARATOR_ITEM, '/') . '[0-9]+' . preg_quote(self::SEPARATOR_LEVEL, '/') .'?';
375
            $regexp  = '(' . $element . '|' . $item . ')';
375
            $regexp  = '(' . $element . '|' . $item . ')';
Línea 376... Línea 376...
376
 
376
 
377
            if (isset($this->meta['pos'][$index])) {
377
            if (isset($this->meta['pos'][$index])) {
378
                if (preg_match('/([0-9]+)/', $this->raw_data, $m, null, $this->meta['pos'][$index])) {
378
                if (preg_match('/([0-9]+)/', $this->raw_data, $m, 0, $this->meta['pos'][$index])) {
379
                    $result = $m[1];
379
                    $result = $m[1];
380
                }
380
                }
381
            }
381
            }
382
            else if (isset($this->meta['pos'][$index-1])) {
382
            else if (isset($this->meta['pos'][$index-1])) {
Línea 585... Línea 585...
585
     * IMAP THREAD response parser
585
     * IMAP THREAD response parser
586
     */
586
     */
587
    protected function parse_thread($str, $begin = 0, $end = 0, $depth = 0)
587
    protected function parse_thread($str, $begin = 0, $end = 0, $depth = 0)
588
    {
588
    {
589
        // Don't be tempted to change $str to pass by reference to speed this up - it will slow it down by about
589
        // Don't be tempted to change $str to pass by reference to speed this up - it will slow it down by about
590
        // 7 times instead :-) See comments on http://uk2.php.net/references and this article:
590
        // 7 times instead :-) See comments on https://www.php.net/references and this article:
591
        // http://derickrethans.nl/files/phparch-php-variables-article.pdf
591
        // https://derickrethans.nl/files/phparch-php-variables-article.pdf
592
        $node = '';
592
        $node = '';
593
        if (!$end) {
593
        if (!$end) {
594
            $end = strlen($str);
594
            $end = strlen($str);
595
        }
595
        }