mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Merge branch 'master' into careminster
Conflicts: .gitignore OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs prebuild.xml runprebuild.bat
This commit is contained in:
@@ -128,7 +128,31 @@ namespace OpenSim.Framework
|
||||
/// <summary>
|
||||
/// Viewer's version string as reported by the viewer at login
|
||||
/// </summary>
|
||||
public string Viewer;
|
||||
private string m_viewerInternal;
|
||||
|
||||
/// <summary>
|
||||
/// Viewer's version string
|
||||
/// </summary>
|
||||
public string Viewer
|
||||
{
|
||||
set { m_viewerInternal = value; }
|
||||
|
||||
// Try to return consistent viewer string taking into account
|
||||
// that viewers have chaagned how version is reported
|
||||
// See http://opensimulator.org/mantis/view.php?id=6851
|
||||
get
|
||||
{
|
||||
// Old style version string contains viewer name followed by a space followed by a version number
|
||||
if (m_viewerInternal == null || m_viewerInternal.Contains(" "))
|
||||
{
|
||||
return m_viewerInternal;
|
||||
}
|
||||
else // New style version contains no spaces, just version number
|
||||
{
|
||||
return Channel + " " + m_viewerInternal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The channel strinf sent by the viewer at login
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Configuration.XML
|
||||
|
||||
public void Commit()
|
||||
{
|
||||
if (fileName == null || fileName == String.Empty)
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
return;
|
||||
|
||||
if (!Directory.Exists(Util.configDir()))
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenSim.Framework
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_creatorData != null && m_creatorData != string.Empty)
|
||||
if (!string.IsNullOrEmpty(m_creatorData))
|
||||
return m_creatorId + ';' + m_creatorData;
|
||||
else
|
||||
return m_creatorId;
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Monitoring
|
||||
Container,
|
||||
ShortName,
|
||||
Value,
|
||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName));
|
||||
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
|
||||
|
||||
AppendMeasuresOfInterest(sb);
|
||||
|
||||
@@ -316,9 +316,9 @@ namespace OpenSim.Framework.Monitoring
|
||||
sb.AppendFormat(
|
||||
", {0:0.##}{1}/s, {2:0.##}{3}/s",
|
||||
lastChangeOverTime,
|
||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName),
|
||||
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName),
|
||||
averageChangeOverTime,
|
||||
UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName));
|
||||
string.IsNullOrEmpty(UnitName) ? "" : string.Format(" {0}", UnitName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||
writer.WriteStartElement("GroupOwned");
|
||||
writer.WriteString(inventoryItem.GroupOwned.ToString());
|
||||
writer.WriteEndElement();
|
||||
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
|
||||
if (options.ContainsKey("creators") && !string.IsNullOrEmpty(inventoryItem.CreatorData))
|
||||
writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
|
||||
else if (options.ContainsKey("home"))
|
||||
{
|
||||
|
||||
@@ -786,7 +786,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
"[BASE HTTP SERVER]: HTTP IN {0} :{1} {2} content type handler {3} {4} from {5}",
|
||||
RequestNumber,
|
||||
Port,
|
||||
(request.ContentType == null || request.ContentType == "") ? "not set" : request.ContentType,
|
||||
string.IsNullOrEmpty(request.ContentType) ? "not set" : request.ContentType,
|
||||
request.HttpMethod,
|
||||
request.Url.PathAndQuery,
|
||||
request.RemoteIPEndPoint);
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace OpenSim.Framework
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_creatorData != null && _creatorData != string.Empty)
|
||||
if (!string.IsNullOrEmpty(_creatorData))
|
||||
return _creatorID.ToString() + ';' + _creatorData;
|
||||
else
|
||||
return _creatorID.ToString();
|
||||
|
||||
@@ -721,7 +721,7 @@ namespace OpenSim.Framework
|
||||
/// <returns></returns>
|
||||
public static string[] GetPreferredImageTypes(string accept)
|
||||
{
|
||||
if (accept == null || accept == string.Empty)
|
||||
if (string.IsNullOrEmpty(accept))
|
||||
return new string[0];
|
||||
|
||||
string[] types = accept.Split(new char[] { ',' });
|
||||
|
||||
Reference in New Issue
Block a user