Page MenuHomePhabricator

invalid.contibutor.patch

Authored By
bzimport
Nov 21 2014, 10:34 PM
Size
1 KB
Referenced Files
None
Subscribers
None

invalid.contibutor.patch

Index: org/mediawiki/importer/XmlDumpReader.java
===================================================================
--- org/mediawiki/importer/XmlDumpReader.java (Revision 52836)
+++ org/mediawiki/importer/XmlDumpReader.java (Arbeitskopie)
@@ -149,7 +149,7 @@
return;
// frequent tags:
if (qName == "revision") openRevision();
- else if (qName == "contributor") openContributor();
+ else if (qName == "contributor") openContributor(attributes);
else if (qName == "page") openPage();
// rare tags:
else if (qName == "mediawiki") openMediaWiki();
@@ -330,13 +330,20 @@
}
// -----------
- void openContributor() {
- contrib = null;
+ void openContributor(Attributes attribs) {
+ String deleted = attribs.getValue("deleted");
+ if( deleted !=null && deleted.equals("deleted")){
+ contrib = new Contributor("127.0.0.1");
+ }else{
+ contrib = null;
+ }
}
void closeContributor() {
- if (contrib == null)
+
+ if (contrib == null){
throw new IllegalArgumentException("Invalid contributor");
+ }
rev.Contributor = contrib;
contrib = null;

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5164
Default Alt Text
invalid.contibutor.patch (1 KB)

Event Timeline