Merge branch 'master' into careminster

This commit is contained in:
Melanie
2009-12-05 19:53:54 +00:00
18 changed files with 171 additions and 41 deletions

View File

@@ -413,8 +413,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController
ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
if (null == terrainModule) throw new Exception("terrain module not available");
terrainModule.LoadFromFile(file);
if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
{
m_log.Info("[RADMIN]: Terrain path is URL");
Uri result;
if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
{
// the url is valid
string fileType = file.Substring(file.LastIndexOf('/') + 1);
terrainModule.LoadFromStream(fileType, result);
}
}
else
{
terrainModule.LoadFromFile(file);
}
responseData["success"] = false;
response.Value = responseData;