Ejemplo n.º 1
0
        public virtual bool DeleteFolders(UUID principalID, List <UUID> folderIDs, bool onlyIfTrash)
        {
            if (!m_AllowDelete)
            {
                return(false);
            }

            // Ignore principal ID, it's bogus at connector level
            //
            foreach (UUID id in folderIDs)
            {
                //if (onlyIfTrash && !ParentIsTrash(id))
                if (onlyIfTrash && !ParentIsTrashOrLost(id))
                {
                    continue;
                }
                //m_log.InfoFormat("[XINVENTORY SERVICE]: Delete folder {0}", id);
                InventoryFolderBase f = new InventoryFolderBase();
                f.ID = id;
                PurgeFolder(f, onlyIfTrash);
                m_Database.DeleteFolders("folderID", id.ToString());
            }

            return(true);
        }
        // We don't check the principal's ID here
        //
        public virtual bool DeleteFolders(UUID principalID, List <UUID> folderIDs)
        {
            if (!m_AllowDelete)
            {
                return(false);
            }

            // Ignore principal ID, it's bogus at connector level
            //
            foreach (UUID id in folderIDs)
            {
                if (!ParentIsTrash(id))
                {
                    continue;
                }
                InventoryFolderBase f = new InventoryFolderBase();
                f.ID = id;
                PurgeFolder(f);
                m_Database.DeleteFolders("folderID", id.ToString());
            }

            return(true);
        }