Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -504,7 +504,7 @@ |
505 | 505 | * @public |
506 | 506 | * @static |
507 | 507 | */ |
508 | | - function extractTagsAndParams($elements, $text, &$matches, $uniq_prefix = ''){ |
| 508 | + static function extractTagsAndParams($elements, $text, &$matches, $uniq_prefix = ''){ |
509 | 509 | static $n = 1; |
510 | 510 | $stripped = ''; |
511 | 511 | $matches = array(); |
— | — | @@ -644,7 +644,7 @@ |
645 | 645 | * @public |
646 | 646 | * @static |
647 | 647 | */ |
648 | | - function tidy( $text ) { |
| 648 | + static function tidy( $text ) { |
649 | 649 | global $wgTidyInternal; |
650 | 650 | $wrappedtext = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"'. |
651 | 651 | ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>'. |
— | — | @@ -667,7 +667,7 @@ |
668 | 668 | * @private |
669 | 669 | * @static |
670 | 670 | */ |
671 | | - function externalTidy( $text ) { |
| 671 | + static function externalTidy( $text ) { |
672 | 672 | global $wgTidyConf, $wgTidyBin, $wgTidyOpts; |
673 | 673 | wfProfileIn( __METHOD__ ); |
674 | 674 | |
— | — | @@ -718,7 +718,7 @@ |
719 | 719 | * @private |
720 | 720 | * @static |
721 | 721 | */ |
722 | | - function internalTidy( $text ) { |
| 722 | + static function internalTidy( $text ) { |
723 | 723 | global $wgTidyConf, $IP, $wgDebugTidy; |
724 | 724 | wfProfileIn( __METHOD__ ); |
725 | 725 | |
— | — | @@ -1054,7 +1054,7 @@ |
1055 | 1055 | * |
1056 | 1056 | * @private |
1057 | 1057 | */ |
1058 | | - function doHeadings( $text ) { |
| 1058 | + static function doHeadings( $text ) { |
1059 | 1059 | wfProfileIn( __METHOD__ ); |
1060 | 1060 | for ( $i = 6; $i >= 1; --$i ) { |
1061 | 1061 | $h = str_repeat( '=', $i ); |
— | — | @@ -1070,12 +1070,12 @@ |
1071 | 1071 | * @private |
1072 | 1072 | * @return string the altered text |
1073 | 1073 | */ |
1074 | | - function doAllQuotes( $text ) { |
| 1074 | + static function doAllQuotes( $text ) { |
1075 | 1075 | wfProfileIn( __METHOD__ ); |
1076 | 1076 | $outtext = ''; |
1077 | 1077 | $lines = StringUtils::explode( "\n", $text ); |
1078 | 1078 | foreach ( $lines as $line ) { |
1079 | | - $outtext .= $this->doQuotes( $line ) . "\n"; |
| 1079 | + $outtext .= self::doQuotes( $line ) . "\n"; |
1080 | 1080 | } |
1081 | 1081 | $outtext = substr($outtext, 0,-1); |
1082 | 1082 | wfProfileOut( __METHOD__ ); |
— | — | @@ -1085,7 +1085,7 @@ |
1086 | 1086 | /** |
1087 | 1087 | * Helper function for doAllQuotes() |
1088 | 1088 | */ |
1089 | | - public function doQuotes( $text ) { |
| 1089 | + public static function doQuotes( $text ) { |
1090 | 1090 | $arr = preg_split( "/(''+)/", $text, -1, PREG_SPLIT_DELIM_CAPTURE ); |
1091 | 1091 | if ( count( $arr ) == 1 ) |
1092 | 1092 | return $text; |
— | — | @@ -1955,7 +1955,7 @@ |
1956 | 1956 | # getCommon() returns the length of the longest common substring |
1957 | 1957 | # of both arguments, starting at the beginning of both. |
1958 | 1958 | # |
1959 | | - /* private */ function getCommon( $st1, $st2 ) { |
| 1959 | + /* private */ static function getCommon( $st1, $st2 ) { |
1960 | 1960 | $fl = strlen( $st1 ); |
1961 | 1961 | $shorter = strlen( $st2 ); |
1962 | 1962 | if ( $fl < $shorter ) { $shorter = $fl; } |
— | — | @@ -2194,7 +2194,7 @@ |
2195 | 2195 | * @param string &$after set to everything after the ':' |
2196 | 2196 | * return string the position of the ':', or false if none found |
2197 | 2197 | */ |
2198 | | - function findColonNoLinks($str, &$before, &$after) { |
| 2198 | + static function findColonNoLinks($str, &$before, &$after) { |
2199 | 2199 | wfProfileIn( __METHOD__ ); |
2200 | 2200 | |
2201 | 2201 | $pos = strpos( $str, ':' ); |
— | — | @@ -3143,7 +3143,7 @@ |
3144 | 3144 | return $this->fetchScaryTemplateMaybeFromCache($url); |
3145 | 3145 | } |
3146 | 3146 | |
3147 | | - function fetchScaryTemplateMaybeFromCache($url) { |
| 3147 | + static function fetchScaryTemplateMaybeFromCache($url) { |
3148 | 3148 | global $wgTranscludeCacheExpiry; |
3149 | 3149 | $dbr = wfGetDB(DB_SLAVE); |
3150 | 3150 | $obj = $dbr->selectRow('transcache', array('tc_time', 'tc_contents'), |
— | — | @@ -3798,7 +3798,7 @@ |
3799 | 3799 | * @param string $text |
3800 | 3800 | * @return mixed An expanded string, or false if invalid. |
3801 | 3801 | */ |
3802 | | - function validateSig( $text ) { |
| 3802 | + static function validateSig( $text ) { |
3803 | 3803 | return( wfIsWellFormedXmlFragment( $text ) ? $text : false ); |
3804 | 3804 | } |
3805 | 3805 | |
— | — | @@ -3850,7 +3850,7 @@ |
3851 | 3851 | * @param string $text |
3852 | 3852 | * @return string Signature text with /~{3,5}/ removed |
3853 | 3853 | */ |
3854 | | - function cleanSigInSig( $text ) { |
| 3854 | + static function cleanSigInSig( $text ) { |
3855 | 3855 | $text = preg_replace( '/~{3,5}/', '', $text ); |
3856 | 3856 | return $text; |
3857 | 3857 | } |
— | — | @@ -4042,7 +4042,7 @@ |
4043 | 4043 | /** |
4044 | 4044 | * Tag hook handler for 'pre'. |
4045 | 4045 | */ |
4046 | | - function renderPreTag( $text, $attribs ) { |
| 4046 | + static function renderPreTag( $text, $attribs ) { |
4047 | 4047 | // Backwards-compatibility hack |
4048 | 4048 | $content = StringUtils::delimiterReplace( '<nowiki>', '</nowiki>', '$1', $text, 'i' ); |
4049 | 4049 | |