Index: trunk/extensions/DataTransfer/includes/DT_ImportJob.php |
— | — | @@ -30,6 +30,10 @@ |
31 | 31 | wfProfileOut( __METHOD__ ); |
32 | 32 | return false; |
33 | 33 | } |
| 34 | + $for_pages_that_exist = $this->params['for_pages_that_exist']; |
| 35 | + if ( $for_pages_that_exist == 'skip' && $this->title->exists() ) { |
| 36 | + return true; |
| 37 | + } |
34 | 38 | |
35 | 39 | // change global $wgUser variable to the one specified by |
36 | 40 | // the job only for the extent of this import |
— | — | @@ -37,6 +41,9 @@ |
38 | 42 | $actual_user = $wgUser; |
39 | 43 | $wgUser = User::newFromId( $this->params['user_id'] ); |
40 | 44 | $text = $this->params['text']; |
| 45 | + if ( $for_pages_that_exist == 'append' ) { |
| 46 | + $text = $article->getContent() . "\n" . $text; |
| 47 | + } |
41 | 48 | $edit_summary = $this->params['edit_summary']; |
42 | 49 | $article->doEdit( $text, $edit_summary ); |
43 | 50 | $wgUser = $actual_user; |
— | — | @@ -44,4 +51,3 @@ |
45 | 52 | return true; |
46 | 53 | } |
47 | 54 | } |
48 | | - |