Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 6549fdd..3747c23 100644 (file)
@@ -222,18 +222,18 @@ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
 /**
  * Merge arrays in the style of getUserPermissionsErrors, with duplicate removal
  * e.g.
- *     wfMergeErrorArrays(
- *             [ [ 'x' ] ],
- *             [ [ 'x', '2' ] ],
- *             [ [ 'x' ] ],
- *             [ [ 'y' ] ]
- *     );
+ *     wfMergeErrorArrays(
+ *       [ [ 'x' ] ],
+ *       [ [ 'x', '2' ] ],
+ *       [ [ 'x' ] ],
+ *       [ [ 'y' ] ]
+ *     );
  * returns:
- *             [
- *             [ 'x', '2' ],
- *             [ 'x' ],
- *             [ 'y' ]
- *     ]
+ *     [
+ *       [ 'x', '2' ],
+ *       [ 'x' ],
+ *       [ 'y' ]
+ *     ]
  *
  * @param array $array1,...
  * @return array
@@ -1787,6 +1787,7 @@ function wfHttpError( $code, $label, $desc ) {
                $wgOut->sendCacheControl();
        }
 
+       MediaWiki\HeaderCallback::warnIfHeadersSent();
        header( 'Content-type: text/html; charset=utf-8' );
        print '<!DOCTYPE html>' .
                '<html><head><title>' .
@@ -1999,10 +2000,6 @@ function wfRestoreWarnings() {
        MediaWiki\suppressWarnings( true );
 }
 
-# Autodetect, convert and provide timestamps of various types
-
-require_once __DIR__ . '/libs/time/defines.php';
-
 /**
  * Get a timestamp string in one of various formats
  *
@@ -2576,8 +2573,8 @@ function wfInitShellLocale() {
  * @param string $script MediaWiki cli script path
  * @param array $parameters Arguments and options to the script
  * @param array $options Associative array of options:
- *             'php': The path to the php executable
- *             'wrapper': Path to a PHP wrapper to handle the maintenance script
+ *     'php': The path to the php executable
+ *     'wrapper': Path to a PHP wrapper to handle the maintenance script
  * @return string
  */
 function wfShellWikiCmd( $script, array $parameters = [], array $options = [] ) {
@@ -3088,7 +3085,7 @@ function wfGetDB( $db, $groups = [], $wiki = false ) {
  *              or MediaWikiServices::getDBLoadBalancerFactory() instead.
  *
  * @param string|bool $wiki Wiki ID, or false for the current wiki
- * @return LoadBalancer
+ * @return \Wikimedia\Rdbms\LoadBalancer
  */
 function wfGetLB( $wiki = false ) {
        if ( $wiki === false ) {
@@ -3104,7 +3101,7 @@ function wfGetLB( $wiki = false ) {
  *
  * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead.
  *
- * @return LBFactory
+ * @return \Wikimedia\Rdbms\LBFactory
  */
 function wfGetLBFactory() {
        return \MediaWiki\MediaWikiServices::getInstance()->getDBLoadBalancerFactory();