Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3374,8 +3374,8 @@ |
3375 | 3375 | } |
3376 | 3376 | |
3377 | 3377 | /** |
3378 | | - * Output some plain text in command-line mode or in the installer (updaters.inc). |
3379 | | - * Do not use it in any other context, its behaviour is subject to change. |
| 3378 | + * Used to be used for outputting text in the installer/updater |
| 3379 | + * @deprecated Warnings in 1.19, removal in 1.20 |
3380 | 3380 | */ |
3381 | 3381 | function wfOut( $s ) { |
3382 | 3382 | global $wgCommandLineMode; |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -91,8 +91,7 @@ |
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | | - * Output some text. Right now this is a wrapper for wfOut, but hopefully |
96 | | - * that function can go away some day :) |
| 95 | + * Output some text. If we're running from web, escape the text first. |
97 | 96 | * |
98 | 97 | * @param $str String: Text to output |
99 | 98 | */ |
— | — | @@ -100,7 +99,12 @@ |
101 | 100 | if ( $this->maintenance->isQuiet() ) { |
102 | 101 | return; |
103 | 102 | } |
104 | | - wfOut( $str ); |
| 103 | + global $wgCommandLineMode; |
| 104 | + if( !$wgCommandLineMode ) { |
| 105 | + $str = htmlspecialchars( $str ); |
| 106 | + } |
| 107 | + echo $str; |
| 108 | + flush(); |
105 | 109 | } |
106 | 110 | |
107 | 111 | /** |