[JobQueue] Made the maximum number of job attempts configurable.
[lhc/web/wiklou.git] / includes / LinkFilter.php
index b19f6c4..28379c7 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
@@ -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 .= '.';
                        }