Changeset 137

Show
Ignore:
Timestamp:
12/24/07 21:08:51 (5 years ago)
Author:
d0nut
Message:

fixed empty lines query

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trackback/files/lib/util/TrackbackUtil.class.php

    r136 r137  
    1212 */ 
    1313class TrackbackUtil { 
    14         protected $agent = 'Woltlab Burning Board Trackback Mod'; 
     14        protected static $agent = 'Woltlab Burning Board Trackback Mod'; 
     15        protected static $timeout_bytes = 51200; 
    1516 
    1617        /** 
     
    127128                // merge pingbacks with public pingback services 
    128129                $pingbacks = array_merge($pingbacks, explode("\n", StringUtil::unifyNewlines(MESSAGE_PINGBACK))); 
    129  
     130                $pingbacks = array_filter($pingbacks, create_function('$a','return !empty($a);')); 
     131                 
    130132                // send pingbacks 
    131133                foreach($pingbacks as $pingbackurl) { 
     
    243245                        } 
    244246                        $byte_count += strlen($line); 
    245                         if ( $byte_count > $timeout_bytes ) { 
     247                        if ( $byte_count > self::$timeout_bytes ) { 
    246248                                // It's no use going further, there probably isn't any pingback 
    247249                                // server to find in this file. (Prevents loading large files.)