X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinkFilter.php;h=28379c77c4fd131f863a0fc428cab486f7e94d4d;hb=81428046c0d14b84b27a00733258bf008d2e8088;hp=b19f6c4de2dce9952a21c54c6d20c3299efdc9b4;hpb=dc102a6b425ea2ca864a2c313d3b13bd641505ef;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index b19f6c4de2..28379c77c4 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -23,7 +23,7 @@ /** * Some functions to help implement an external link filter for spam control. - * + * * @todo implement the filter. Currently these are just some functions to help * maintenance/cleanupSpam.php remove links to a single specified domain. The * next thing is to implement functions for checking a given page against a big @@ -89,7 +89,7 @@ class LinkFilter { * @param $prot String: protocol * @return Array to be passed to DatabaseBase::buildLike() or false on error */ - public static function makeLikeArray( $filterEntry , $prot = 'http://' ) { + public static function makeLikeArray( $filterEntry, $prot = 'http://' ) { $db = wfGetDB( DB_MASTER ); if ( substr( $filterEntry, 0, 2 ) == '*.' ) { $subdomains = true; @@ -118,18 +118,18 @@ class LinkFilter { } // Reverse the labels in the hostname, convert to lower case // For emails reverse domainpart only - if ( $prot == 'mailto:' && strpos($host, '@') ) { - // complete email adress + if ( $prot == 'mailto:' && strpos( $host, '@' ) ) { + // complete email adress $mailparts = explode( '@', $host ); $domainpart = strtolower( implode( '.', array_reverse( explode( '.', $mailparts[1] ) ) ) ); $host = $domainpart . '@' . $mailparts[0]; $like = array( "$prot$host", $db->anyString() ); } elseif ( $prot == 'mailto:' ) { // domainpart of email adress only. do not add '.' - $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) ); - $like = array( "$prot$host", $db->anyString() ); + $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) ); + $like = array( "$prot$host", $db->anyString() ); } else { - $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) ); + $host = strtolower( implode( '.', array_reverse( explode( '.', $host ) ) ) ); if ( substr( $host, -1, 1 ) !== '.' ) { $host .= '.'; }