slightly simplify oar control file loading code

viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-10-22 18:47:38 +01:00 committed by Jonathan Freedman
parent 460b9fffe5
commit 772dbf59f3
1 changed files with 3 additions and 10 deletions

View File

@ -483,15 +483,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// <param name="data"></param>
private void LoadControlFile(string path, byte[] data)
{
//Create the XmlNamespaceManager.
NameTable nt = new NameTable();
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt);
// Create the XmlParserContext.
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
XmlTextReader xtr
= new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
@ -530,10 +524,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
currentRegionSettings.LoadedCreationID = xtr.ReadElementContentAsString();
}
}
}
currentRegionSettings.Save();
}
}
}
}