r13836 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13835‎ | r13836 | r13837 >
Date:08:47, 24 April 2006
Author:tstarling
Status:old
Tags:
Comment:
Read revision ID
Modified paths:
  • /trunk/phase3/includes/SpecialImport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialImport.php
@@ -122,6 +122,7 @@
123123 */
124124 class WikiRevision {
125125 var $title = NULL;
 126+ var $id = 0;
126127 var $timestamp = "20010115000000";
127128 var $user = 0;
128129 var $user_text = "";
@@ -133,6 +134,10 @@
134135 $this->title = Title::newFromText( $text );
135136 }
136137
 138+ function setID( $id ) {
 139+ $this->id = $id;
 140+ }
 141+
137142 function setTimestamp( $ts ) {
138143 # 2003-08-05T18:30:02Z
139144 $this->timestamp = wfTimestamp( TS_MW, $ts );
@@ -162,6 +167,10 @@
163168 return $this->title;
164169 }
165170
 171+ function getID() {
 172+ return $this->id;
 173+ }
 174+
166175 function getTimestamp() {
167176 return $this->timestamp;
168177 }
@@ -468,6 +477,11 @@
469478 $this->workTitle = $this->appenddata;
470479 $this->pageCallback( $this->workTitle );
471480 break;
 481+ case "id":
 482+ if ( $this->parenttag == 'revision' ) {
 483+ $this->workRevision->setID( $this->appenddata );
 484+ }
 485+ break;
472486 case "text":
473487 $this->workRevision->setText( $this->appenddata );
474488 break;

Status & tagging log