Elgg / community_plugins

Elgg community plugin repository
17 stars 16 forks source link

Plugin ownership transfer doesn't transfer dataroot files #75

Closed beck24 closed 10 years ago

beck24 commented 10 years ago

Old releases aren't downloadable as the files in the old user data directory are not copied/moved to the new owner

ewinslow commented 10 years ago

Maybe we should be storing them in the data directory under the plugin project ID instead of the owner ID?

beck24 commented 10 years ago

Yes I like that approach much better

ewinslow commented 10 years ago

Or, to push things further, under the guid of the release entity itself

beck24 commented 10 years ago

ok what's the best way to do that using ElggFile? The directory is determined by the owner_guid, but you can't have an entity own itself. I'm mid way through having the release owned by the project and it's working fine, but if there's a better way lets just get to the best way right now

ewinslow commented 10 years ago

You would have to do it outside the ElggFile API. I'd say just use that API for now since ultimately we don't want to maintain custom code.

Changing the owner of a file should do these file migrations automatically. Same thing has happened for groups.

And in any case, I think Elgg should migrate files to be stored with their entity, not with the entity's owner. Hopefully we'd be able to get that for free if you just use the file API for now...