Changed the maximum asset name and description lengths to constants. Also, pre-truncate the description of dynamic textures.

This commit is contained in:
Oren Hurvitz
2014-04-22 12:04:06 +03:00
parent 4cac87d9f4
commit 93a9ed2a6d
7 changed files with 25 additions and 20 deletions

View File

@@ -514,6 +514,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
scene.RegionInfo.RegionID.ToString());
asset.Data = assetData;
asset.Description = String.Format("URL image : {0}", Url);
if (asset.Description.Length > AssetBase.MAX_ASSET_DESC)
asset.Description = asset.Description.Substring(0, AssetBase.MAX_ASSET_DESC);
asset.Local = false;
asset.Temporary = ((Disp & DISP_TEMP) != 0);
scene.AssetService.Store(asset);