summaryrefslogtreecommitdiff
path: root/includes/GlobalFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/GlobalFunctions.php')
-rw-r--r--includes/GlobalFunctions.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 26401bb4..d1336d47 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2769,6 +2769,21 @@ function wfWaitForSlaves( $maxLag ) {
}
}
+/**
+ * Output some plain text in command-line mode or in the installer (updaters.inc).
+ * Do not use it in any other context, its behaviour is subject to change.
+ */
+function wfOut( $s ) {
+ static $lineStarted = false;
+ global $wgCommandLineMode;
+ if ( $wgCommandLineMode && !defined( 'MEDIAWIKI_INSTALL' ) ) {
+ echo $s;
+ } else {
+ echo htmlspecialchars( $s );
+ }
+ flush();
+}
+
/** Generate a random 32-character hexadecimal token.
* @param mixed $salt Some sort of salt, if necessary, to add to random characters before hashing.
*/