From: Antoine Musso Date: Fri, 13 Apr 2007 00:20:43 +0000 (+0000) Subject: make some methods public, static and private. Fix strict standards in cleanupSpam.php X-Git-Tag: 1.31.0-rc.0~53409 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=894d10e075e3a5a26eaef229c0db1f8793c313fe;p=lhc%2Fweb%2Fwiklou.git make some methods public, static and private. Fix strict standards in cleanupSpam.php --- diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 85bafcaef6..39341d5de4 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -14,7 +14,7 @@ class LinkFilter { /** * @static */ - function matchEntry( $text, $filterEntry ) { + static function matchEntry( $text, $filterEntry ) { $regex = LinkFilter::makeRegex( $filterEntry ); return preg_match( $regex, $text ); } @@ -22,10 +22,10 @@ class LinkFilter { /** * @static */ - function makeRegex( $filterEntry ) { + private static function makeRegex( $filterEntry ) { $regex = '!http://'; if ( substr( $filterEntry, 0, 2 ) == '*.' ) { - $regex .= '([A-Za-z0-9.-]+\.|)'; + $regex .= '(?:[A-Za-z0-9.-]+\.|)'; $filterEntry = substr( $filterEntry, 2 ); } $regex .= preg_quote( $filterEntry, '!' ) . '!Si'; @@ -50,7 +50,7 @@ class LinkFilter { * @param $filterEntry String: domainparts * @param $prot String: protocol */ - function makeLike( $filterEntry , $prot = 'http://' ) { + public static function makeLike( $filterEntry , $prot = 'http://' ) { if ( substr( $filterEntry, 0, 2 ) == '*.' ) { $subdomains = true; $filterEntry = substr( $filterEntry, 2 );