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

We need to ensure that the app holding the objectstore implementation is loaded #26299

Merged
merged 1 commit into from Oct 28, 2016

Conversation

DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Oct 7, 2016

Description

In some cases the app is not yet loaded before loading the objectstore class.
This fixes this issue.

Related Issue

fixes owncloud/objectstore#38

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mention-bot
Copy link

@DeepDiver1975, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @PVince81 and @icewind1991 to be potential reviewers.

@DeepDiver1975
Copy link
Member Author

@butonic @felixboehm

@DeepDiver1975
Copy link
Member Author

@michaelstingl

@felixboehm
Copy link
Contributor

Code makes sense, can't test right now, missing infrastructure.
@butonic

$name = $config['class'];
if (strpos($name, 'OCA\\') === 0 && substr_count($name, '\\') >= 2) {
$segments = explode('\\', $name);
OC_App::loadApp(strtolower($segments[1]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this happen automatically already ? Maybe load all apps of type "filesystem" here instead ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(side note: we might want to introduce a new app type "storage" or "storage provider" to accomodate for future separate files_external storage apps and maybe home storage providers)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially during installation and upgrade apps are not loaded

Copy link
Contributor

@PVince81 PVince81 Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. And is this kind of app name finding magic based on class name copied from somewhere else ? Is it reliable ? (I guess it is for the few implementations we know)

@butonic
Copy link
Member

butonic commented Oct 27, 2016

finally got to test this, nice! 👍

@PVince81
Copy link
Contributor

if #26299 (comment) is reliable and isn't a newly invented concept then I'm fine

@butonic
Copy link
Member

butonic commented Oct 27, 2016

#26299 (diff) is a workaround for the objectstore app. when we finally implement an explicit way of setting up storages (like an fstab) we can get rid of it.

@PVince81 PVince81 merged commit 20fd465 into master Oct 28, 2016
@PVince81 PVince81 deleted the load-primary-storage-apps branch October 28, 2016 07:31
@DeepDiver1975
Copy link
Member Author

backporting ...

@PVince81
Copy link
Contributor

PVince81 commented Dec 7, 2016

Backports were merged, removing label

@butonic
Copy link
Member

butonic commented Dec 16, 2016

There might be a problem when the objectstore version increases: https://github.com/owncloud/core/blob/master/lib/private/legacy/app.php#L151 self updating doesnt work then ...

@lock
Copy link

lock bot commented Aug 4, 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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants