Changeset 1554

Show
Ignore:
Timestamp:
04/16/08 14:42:05 (4 weeks ago)
Author:
richi
Message:

peer: better readability for stubURL condition

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/peer/stubURL.php

    r1496 r1554  
    100100         
    101101        // if host is set and seems to comply with host character rules or host is localhost syntax is ok 
    102         if (isset($this->url['host']) === true && (eregi('([a-z0-9-]*)\.([a-z]{2,4})', $this->url['host']) == true || eregi('([0-9-]{1,3})\.([0-9-]{1,3})\.([0-9-]{1,3})\.([0-9-]{1,3})', $this->url['host']) == true || 'localhost' == $this->url['host'])) { 
     102        if (isset($this->url['host']) === true 
     103                && (eregi('([a-z0-9-]*)\.([a-z]{2,4})', $this->url['host']) == true 
     104                        || eregi('([0-9-]{1,3})\.([0-9-]{1,3})\.([0-9-]{1,3})\.([0-9-]{1,3})', $this->url['host']) == true 
     105                                || 'localhost' == $this->url['host'])) { 
    103106            return true; 
    104107        } elseif (isset($this->url['host']) === false || strlen($this->url['host']) === 0) {