Cleaned up and optimized wfBaseConvert();
[lhc/web/wiklou.git] / includes / LinkFilter.php
index b19f6c4..c2f6b1e 100644 (file)
@@ -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
@@ -119,17 +119,17 @@ 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 
+                       // 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 .= '.';
                        }