Index: trunk/phase3/includes/SpecialImport.php |
— | — | @@ -122,6 +122,7 @@ |
123 | 123 | */ |
124 | 124 | class WikiRevision { |
125 | 125 | var $title = NULL; |
| 126 | + var $id = 0; |
126 | 127 | var $timestamp = "20010115000000"; |
127 | 128 | var $user = 0; |
128 | 129 | var $user_text = ""; |
— | — | @@ -133,6 +134,10 @@ |
134 | 135 | $this->title = Title::newFromText( $text ); |
135 | 136 | } |
136 | 137 | |
| 138 | + function setID( $id ) { |
| 139 | + $this->id = $id; |
| 140 | + } |
| 141 | + |
137 | 142 | function setTimestamp( $ts ) { |
138 | 143 | # 2003-08-05T18:30:02Z |
139 | 144 | $this->timestamp = wfTimestamp( TS_MW, $ts ); |
— | — | @@ -162,6 +167,10 @@ |
163 | 168 | return $this->title; |
164 | 169 | } |
165 | 170 | |
| 171 | + function getID() { |
| 172 | + return $this->id; |
| 173 | + } |
| 174 | + |
166 | 175 | function getTimestamp() { |
167 | 176 | return $this->timestamp; |
168 | 177 | } |
— | — | @@ -468,6 +477,11 @@ |
469 | 478 | $this->workTitle = $this->appenddata; |
470 | 479 | $this->pageCallback( $this->workTitle ); |
471 | 480 | break; |
| 481 | + case "id": |
| 482 | + if ( $this->parenttag == 'revision' ) { |
| 483 | + $this->workRevision->setID( $this->appenddata ); |
| 484 | + } |
| 485 | + break; |
472 | 486 | case "text": |
473 | 487 | $this->workRevision->setText( $this->appenddata ); |
474 | 488 | break; |