Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup sharing code, next round #11296

Closed
4 tasks
schiessle opened this issue Sep 25, 2014 · 5 comments
Closed
4 tasks

cleanup sharing code, next round #11296

schiessle opened this issue Sep 25, 2014 · 5 comments

Comments

@schiessle
Copy link
Contributor

Some tasks for the next round of clean up for the sharing API

  • The sharing table distinguish between "file_source"/"file_target" and "item_source"/"item_target". This shouldn't exists. From the share API point of view it should always be a item, for files we store file IDs and paths in the column, other shares store their identifier. This way we can get rid of a lot of if ($item_type === 'file' || $item_type === 'folder') { ... } else { ... } code. The share API should be a general API and shouldn't make such distinctions.
  • while creating a share target, the share API shouldn't create a exclude list. Let the generateTarget() method from each backend handle it. E.g. the file backend checks the filesystem directly with file_exists(). Will remove a lot of overhead and complexity
  • unused parameters in lib/private/share/helper.php (see FIXME's)
  • check the uses of getChildren() at the sharing back-end. For performance reasons files already has a workaround in lib/private/share/share.php calling getParents() instead . Probably the whole logic to detect if the share is part of a already shared collection should be moved to the back-end. Only there we can implement performant solutions for every use case.
@MorrisJobke
Copy link
Contributor

Isn't all of this fixed with share 2.0 - #19331 cc @rullzer

@rullzer
Copy link
Contributor

rullzer commented Jan 25, 2016

@MorrisJobke well some of the stuff is still valid. Since right now we don't want to break anything. And the db cleanup can't be done yet since the calendar and contacts still use it.

@MorrisJobke
Copy link
Contributor

@MorrisJobke well some of the stuff is still valid. Since right now we don't want to break anything. And the db cleanup can't be done yet since the calendar and contacts still use it.

Thanks for the update :)

@rullzer
Copy link
Contributor

rullzer commented Mar 3, 2016

Lets continue this in #22209

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants