Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -22,29 +22,33 @@ |
23 | 23 | */ |
24 | 24 | |
25 | 25 | if( !function_exists( 'iconv' ) ) { |
| 26 | + /** @codeCoverageIgnore */ |
26 | 27 | function iconv( $from, $to, $string ) { |
27 | 28 | return Fallback::iconv( $from, $to, $string ); |
28 | 29 | } |
29 | 30 | } |
30 | 31 | |
31 | 32 | if ( !function_exists( 'mb_substr' ) ) { |
| 33 | + /** @codeCoverageIgnore */ |
32 | 34 | function mb_substr( $str, $start, $count='end' ) { |
33 | 35 | return Fallback::mb_substr( $str, $start, $count ); |
34 | 36 | } |
35 | 37 | |
| 38 | + /** @codeCoverageIgnore */ |
36 | 39 | function mb_substr_split_unicode( $str, $splitPos ) { |
37 | 40 | return Fallback::mb_substr_split_unicode( $str, $splitPos ); |
38 | 41 | } |
39 | 42 | } |
40 | 43 | |
41 | 44 | if ( !function_exists( 'mb_strlen' ) ) { |
| 45 | + /** @codeCoverageIgnore */ |
42 | 46 | function mb_strlen( $str, $enc = '' ) { |
43 | 47 | return Fallback::mb_strlen( $str, $enc ); |
44 | 48 | } |
45 | 49 | } |
46 | 50 | |
47 | 51 | if( !function_exists( 'mb_strpos' ) ) { |
48 | | - |
| 52 | + /** @codeCoverageIgnore */ |
49 | 53 | function mb_strpos( $haystack, $needle, $offset = 0, $encoding = '' ) { |
50 | 54 | return Fallback::mb_strpos( $haystack, $needle, $offset, $encoding ); |
51 | 55 | } |
— | — | @@ -52,6 +56,7 @@ |
53 | 57 | } |
54 | 58 | |
55 | 59 | if( !function_exists( 'mb_strrpos' ) ) { |
| 60 | + /** @codeCoverageIgnore */ |
56 | 61 | function mb_strrpos( $haystack, $needle, $offset = 0, $encoding = '' ) { |
57 | 62 | return Fallback::mb_strrpos( $haystack, $needle, $offset, $encoding ); |
58 | 63 | } |
— | — | @@ -60,10 +65,13 @@ |
61 | 66 | |
62 | 67 | // Support for Wietse Venema's taint feature |
63 | 68 | if ( !function_exists( 'istainted' ) ) { |
| 69 | + /** @codeCoverageIgnore */ |
64 | 70 | function istainted( $var ) { |
65 | 71 | return 0; |
66 | 72 | } |
| 73 | + /** @codeCoverageIgnore */ |
67 | 74 | function taint( $var, $level = 0 ) {} |
| 75 | + /** @codeCoverageIgnore */ |
68 | 76 | function untaint( $var, $level = 0 ) {} |
69 | 77 | define( 'TC_HTML', 1 ); |
70 | 78 | define( 'TC_SHELL', 1 ); |
— | — | @@ -73,8 +81,6 @@ |
74 | 82 | } |
75 | 83 | /// @endcond |
76 | 84 | |
77 | | - |
78 | | - |
79 | 85 | /** |
80 | 86 | * Like array_diff( $a, $b ) except that it works with two-dimensional arrays. |
81 | 87 | */ |
— | — | @@ -3067,6 +3073,7 @@ |
3068 | 3074 | * Should low-performance queries be disabled? |
3069 | 3075 | * |
3070 | 3076 | * @return Boolean |
| 3077 | + * @codeCoverageIgnore |
3071 | 3078 | */ |
3072 | 3079 | function wfQueriesMustScale() { |
3073 | 3080 | global $wgMiserMode; |
— | — | @@ -3125,6 +3132,7 @@ |
3126 | 3133 | /** |
3127 | 3134 | * Load an extension messages file |
3128 | 3135 | * @deprecated in 1.16, warnings in 1.18, remove in 1.20 |
| 3136 | + * @codeCoverageIgnore |
3129 | 3137 | */ |
3130 | 3138 | function wfLoadExtensionMessages( $extensionName, $langcode = false ) { |
3131 | 3139 | wfDeprecated( __FUNCTION__ ); |
— | — | @@ -3262,6 +3270,7 @@ |
3263 | 3271 | /** |
3264 | 3272 | * Count down from $n to zero on the terminal, with a one-second pause |
3265 | 3273 | * between showing each number. For use in command-line scripts. |
| 3274 | + * @codeCoverageIgnore |
3266 | 3275 | */ |
3267 | 3276 | function wfCountDown( $n ) { |
3268 | 3277 | for ( $i = $n; $i >= 0; $i-- ) { |
— | — | @@ -3281,6 +3290,7 @@ |
3282 | 3291 | * Generate a random 32-character hexadecimal token. |
3283 | 3292 | * @param $salt Mixed: some sort of salt, if necessary, to add to random |
3284 | 3293 | * characters before hashing. |
| 3294 | + * @codeCoverageIgnore |
3285 | 3295 | */ |
3286 | 3296 | function wfGenerateToken( $salt = '' ) { |
3287 | 3297 | $salt = serialize( $salt ); |