Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -452,7 +452,7 @@ |
453 | 453 | * @param string $key |
454 | 454 | * @param bool $useDB |
455 | 455 | * @param string $langcode Code of the language to get the message for, or |
456 | | - * behaves as a content language switch if it is a |
| 456 | + * behaves as a content language switch if it is a |
457 | 457 | * boolean. |
458 | 458 | * @return string |
459 | 459 | * @private |
— | — | @@ -1732,7 +1732,7 @@ |
1733 | 1733 | $currentDir = substr( $currentDir, 0, $p ); |
1734 | 1734 | } |
1735 | 1735 | } |
1736 | | - |
| 1736 | + |
1737 | 1737 | if ( count( $createList ) == 0 ) { |
1738 | 1738 | # Directory specified already exists |
1739 | 1739 | return true; |
— | — | @@ -1752,7 +1752,7 @@ |
1753 | 1753 | wfDebugLog( 'mkdir', "Not writable: $currentDir\n" ); |
1754 | 1754 | return false; |
1755 | 1755 | } |
1756 | | - |
| 1756 | + |
1757 | 1757 | foreach ( $createList as $dir ) { |
1758 | 1758 | # use chmod to override the umask, as suggested by the PHP manual |
1759 | 1759 | if ( !mkdir( $dir, $mode ) || !chmod( $dir, $mode ) ) { |
— | — | @@ -1812,7 +1812,7 @@ |
1813 | 1813 | function wfEncryptPassword( $userid, $password ) { |
1814 | 1814 | wfDeprecated(__FUNCTION__); |
1815 | 1815 | # Just wrap around User::oldCrypt() |
1816 | | - return User::oldCrypt($password, $userid); |
| 1816 | + return User::oldCrypt($password, $userid); |
1817 | 1817 | } |
1818 | 1818 | |
1819 | 1819 | /** |
— | — | @@ -2294,12 +2294,20 @@ |
2295 | 2295 | } |
2296 | 2296 | |
2297 | 2297 | /** |
2298 | | - * Aliases for modularized functions |
| 2298 | + * Alias for modularized function |
| 2299 | + * @deprecated Use Http::get() instead |
2299 | 2300 | */ |
2300 | 2301 | function wfGetHTTP( $url, $timeout = 'default' ) { |
| 2302 | + wfDeprecated(__FUNCTION__); |
2301 | 2303 | return Http::get( $url, $timeout ); |
2302 | 2304 | } |
| 2305 | + |
| 2306 | +/** |
| 2307 | + * Alias for modularized function |
| 2308 | + * @deprecated Use Http::isLocalURL() instead |
| 2309 | + */ |
2303 | 2310 | function wfIsLocalURL( $url ) { |
| 2311 | + wfDeprecated(__FUNCTION__); |
2304 | 2312 | return Http::isLocalURL( $url ); |
2305 | 2313 | } |
2306 | 2314 | |
— | — | @@ -2307,7 +2315,7 @@ |
2308 | 2316 | global $wgHttpOnlyBlacklist; |
2309 | 2317 | if( !version_compare("5.2", PHP_VERSION, "<") ) |
2310 | 2318 | return false; |
2311 | | - |
| 2319 | + |
2312 | 2320 | if( isset( $_SERVER['HTTP_USER_AGENT'] ) ) { |
2313 | 2321 | foreach( $wgHttpOnlyBlacklist as $regex ) { |
2314 | 2322 | if( preg_match( $regex, $_SERVER['HTTP_USER_AGENT'] ) ) { |
— | — | @@ -2315,7 +2323,7 @@ |
2316 | 2324 | } |
2317 | 2325 | } |
2318 | 2326 | } |
2319 | | - |
| 2327 | + |
2320 | 2328 | return true; |
2321 | 2329 | } |
2322 | 2330 | |
— | — | @@ -2454,9 +2462,9 @@ |
2455 | 2463 | * |
2456 | 2464 | * @param string $wiki The wiki ID, or false for the current wiki |
2457 | 2465 | * |
2458 | | - * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request |
2459 | | - * will always return the same object, unless the underlying connection or load |
2460 | | - * balancer is manually destroyed. |
| 2466 | + * Note: multiple calls to wfGetDB(DB_SLAVE) during the course of one request |
| 2467 | + * will always return the same object, unless the underlying connection or load |
| 2468 | + * balancer is manually destroyed. |
2461 | 2469 | */ |
2462 | 2470 | function &wfGetDB( $db = DB_LAST, $groups = array(), $wiki = false ) { |
2463 | 2471 | return wfGetLB( $wiki )->getConnection( $db, $groups, $wiki ); |
— | — | @@ -2674,4 +2682,4 @@ |
2675 | 2683 | $salt = serialize($salt); |
2676 | 2684 | |
2677 | 2685 | return md5( mt_rand( 0, 0x7fffffff ) . $salt ); |
2678 | | -} |
\ No newline at end of file |
| 2686 | +} |