Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php |
— | — | @@ -153,6 +153,7 @@ |
154 | 154 | static function createNewUserMessage( $user ) { |
155 | 155 | $talk = $user->getTalkPage(); |
156 | 156 | |
| 157 | + // Only leave message if user doesn't have a talk page yet |
157 | 158 | if ( !$talk->exists() ) { |
158 | 159 | $article = new Article( $talk ); |
159 | 160 | $subject = self::fetchSubject(); |
— | — | @@ -223,7 +224,7 @@ |
224 | 225 | $flags = $article->checkFlags( $flags ); |
225 | 226 | |
226 | 227 | if ( $flags & EDIT_UPDATE ) { |
227 | | - $text = $article->getRawText() . $text; |
| 228 | + $text = $article->getRawText() . "\n" . $text; |
228 | 229 | } |
229 | 230 | |
230 | 231 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -255,13 +256,13 @@ |
256 | 257 | * @param $signature String the signature, if provided. |
257 | 258 | */ |
258 | 259 | static protected function formatUserMessage( $subject, $text, $signature ) { |
259 | | - $contents = "\n"; |
| 260 | + $contents = ""; |
260 | 261 | $signature = empty( $signature ) ? "~~~~" : "{$signature} ~~~~~"; |
261 | 262 | |
262 | 263 | if ( $subject ) { |
263 | | - $contents .= "== $subject ==\n"; |
| 264 | + $contents .= "== $subject ==\n\n"; |
264 | 265 | } |
265 | | - $contents .= "\n$text\n\n-- $signature\n"; |
| 266 | + $contents .= "$text\n\n-- $signature\n"; |
266 | 267 | |
267 | 268 | return $contents; |
268 | 269 | } |