Index: trunk/extensions/LiquidThreads/import/import-parsed-discussions.php |
— | — | @@ -6,10 +6,15 @@ |
7 | 7 | |
8 | 8 | # # Imports JSON-encoded discussions from parse-wikitext-discussions.pl |
9 | 9 | |
10 | | -$structure = json_decode( file_get_contents( $argv[1] ), true ); |
| 10 | +//die( var_dump( $argv ) ); |
11 | 11 | |
12 | | -$article = new Article( Title::newFromText( $argv[2] ) ); |
| 12 | +$structure = json_decode( file_get_contents( $argv[0] ), true ); |
13 | 13 | |
| 14 | +$article = new Article( Title::newFromText( $argv[1] ) ); |
| 15 | + |
| 16 | +$wgOut->_unstub(); |
| 17 | +$wgOut->setTitle( $article->getTitle() ); |
| 18 | + |
14 | 19 | $subject = ''; |
15 | 20 | $rootPost = null; |
16 | 21 | |
Index: trunk/extensions/LiquidThreads/import/WikiText/ParseDiscussion.pm |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | $line =~ s/\s*$//g; |
29 | 29 | if (!$line) { return; } |
30 | 30 | |
31 | | - $line =~ s/^:+//g; |
| 31 | + $line =~ s/^:+\s*//g; |
32 | 32 | |
33 | 33 | ## Add to the content. |
34 | 34 | $current_post->{'content'} .= $line; |