Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 46def53..3747c23 100644 (file)
@@ -28,7 +28,6 @@ use Liuggio\StatsdClient\Sender\SocketSender;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\Session\SessionManager;
 use Wikimedia\ScopedCallback;
-use Wikimedia\Rdbms\LBFactory;
 
 // Hide compatibility functions from Doxygen
 /// @cond
@@ -223,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
@@ -1788,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>' .
@@ -2573,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 = [] ) {
@@ -3085,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 ) {
@@ -3101,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();