diff options
author | Brian McBee | 2007-12-15 04:57:14 +0000 |
---|---|---|
committer | Brian McBee | 2007-12-15 04:57:14 +0000 |
commit | 8a8c89a0f32b528bd588715bdbfc875c852e7187 (patch) | |
tree | b46cb20d03dfdb21a5cbdfa514a8e745070a3713 /OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |
parent | Set svn:eol-style. Cleaned up set-eol-style.sh a bit. (diff) | |
download | opensim-SC_OLD-8a8c89a0f32b528bd588715bdbfc875c852e7187.zip opensim-SC_OLD-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.gz opensim-SC_OLD-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.bz2 opensim-SC_OLD-8a8c89a0f32b528bd588715bdbfc875c852e7187.tar.xz |
Grid Inventory feature upgrade: renaming folders should now be correct, subfolders work, moving folders works.
Tested only in MYSQL, but may work in MSSQL and sqlite.
Probably not working in standalone mode.
Diffstat (limited to 'OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index edf7c43..6828f66 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -529,6 +529,28 @@ namespace OpenSim.Framework.Data.MySQL | |||
529 | addInventoryFolder(folder); | 529 | addInventoryFolder(folder); |
530 | } | 530 | } |
531 | 531 | ||
532 | /// Creates a new inventory folder | ||
533 | /// </summary> | ||
534 | /// <param name="folder">Folder to create</param> | ||
535 | public void moveInventoryFolder(InventoryFolderBase folder) | ||
536 | { | ||
537 | string sql = | ||
538 | "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; | ||
539 | |||
540 | MySqlCommand cmd = new MySqlCommand(sql, database.Connection); | ||
541 | cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToStringHyphenated()); | ||
542 | cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToStringHyphenated()); | ||
543 | |||
544 | |||
545 | try | ||
546 | { | ||
547 | cmd.ExecuteNonQuery(); | ||
548 | } | ||
549 | catch (Exception e) | ||
550 | { | ||
551 | MainLog.Instance.Error(e.ToString()); | ||
552 | } | ||
553 | } | ||
532 | 554 | ||
533 | /// <summary> | 555 | /// <summary> |
534 | /// Append a list of all the child folders of a parent folder | 556 | /// Append a list of all the child folders of a parent folder |