Disallow modification of system folders. Prevent changing the type of folders
and prevent resetting the version number0.6.9-post-fixes
parent
2b4af70db0
commit
d7086a776a
|
@ -270,13 +270,28 @@ namespace OpenSim.Services.InventoryService
|
|||
|
||||
public bool AddFolder(InventoryFolderBase folder)
|
||||
{
|
||||
InventoryFolderBase check = GetFolder(folder);
|
||||
if (check != null)
|
||||
return false;
|
||||
|
||||
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||
return m_Database.StoreFolder(xFolder);
|
||||
}
|
||||
|
||||
public bool UpdateFolder(InventoryFolderBase folder)
|
||||
{
|
||||
return AddFolder(folder);
|
||||
XInventoryFolder xFolder = ConvertFromOpenSim(folder);
|
||||
InventoryFolderBase check = GetFolder(folder);
|
||||
if (check == null)
|
||||
return AddFolder(folder);
|
||||
|
||||
if (check.Type != -1 || xFolder.type != -1)
|
||||
return false;
|
||||
|
||||
xFolder.version = check.Version;
|
||||
xFolder.folderID = check.ID;
|
||||
|
||||
return m_Database.StoreFolder(xFolder);
|
||||
}
|
||||
|
||||
public bool MoveFolder(InventoryFolderBase folder)
|
||||
|
|
Loading…
Reference in New Issue