Assembla home | Assembla project page
 

Changeset 52

Show
Ignore:
Timestamp:
02/11/08 16:59:55 (10 months ago)
Author:
Seldaek
Message:

+ adds Logging
* tweak in the Acronym match to avoid false positives

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Phergie/Event/Handler/Acronym.php

    r50 r52  
    6464            } 
    6565 
    66             if (!preg_match('/(?:^|\s+)((?:[A-Z]\.?){2,})\?/', $event->getArgument(1), $acronym)) { 
     66            if (!preg_match('/^(?:[^\s:]+\s*:?\s*)?((?:[A-Z]\.?){2,})\?$/', $event->getArgument(1), $acronym)) { 
    6767                return; 
    6868            } 
     
    9595                do { 
    9696                    $count = preg_match( 
    97                         '/<td width="65%"[^>]+>([^<]+)</i',  
    98                         $contents,  
    99                         $match,  
     97                        '/<td width="65%"[^>]+>([^<]+)</i', 
     98                        $contents, 
     99                        $match, 
    100100                        PREG_OFFSET_CAPTURE, 
    101101                        $offset 
     
    105105                        $offset = $match[1][1]; 
    106106                    } 
    107                 } while (($this->_limit == 0 || count($matches) < $this->_limit) && $count == 1);  
     107                } while (($this->_limit == 0 || count($matches) < $this->_limit) && $count == 1); 
    108108 
    109109                if (count($matches) == 0) {