Skip to content

Commit

Permalink
take care of core restrictions on the autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
cosenal committed Sep 14, 2015
1 parent 55b1d4b commit e98dd0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
namespace OCA\MailShareNewsPlugin\AppInfo;


if (\OCP\App::isEnabled('news') &&
class_exists('OCA\News\Plugin\Client\Plugin')) {
if (\OCP\App::isEnabled('news')) {

\OC_App::loadApp('news');

if (class_exists('OCA\News\Plugin\Client\Plugin')) {

\OCA\News\Plugin\Client\Plugin::registerScript('mailsharenewsplugin',
'script');
\OCA\News\Plugin\Client\Plugin::registerStyle('mailsharenewsplugin',
'style');
}
}

10 comments on commit e98dd0c

@cosenal
Copy link
Owner Author

Choose a reason for hiding this comment

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

@BernhardPosselt I had to change this to take into account new core restrictions on the autoloader. Does it make sense to you?

@BernhardPosselt
Copy link

Choose a reason for hiding this comment

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

@nickvergessen
Copy link

Choose a reason for hiding this comment

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

Well that is inner-app dependency which is not supported by ownCloud atm 😶

@BernhardPosselt
Copy link

Choose a reason for hiding this comment

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

Shouldn't this just work fine if the app is enabled?

@nickvergessen
Copy link

Choose a reason for hiding this comment

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

Well it depends on the order?

@BernhardPosselt
Copy link

Choose a reason for hiding this comment

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

PS the inter app dependencies also apply to apps that enhance the files app like trashbin and file actions. Let's not pretend that core does not support this. This should not break

@BernhardPosselt
Copy link

Choose a reason for hiding this comment

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

Simple solution then: load the autoloader first then. @cosenal can you open an issue in core?

@nickvergessen
Copy link

Choose a reason for hiding this comment

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

No need to, it boils down to owncloud/core#18710

@BernhardPosselt
Copy link

Choose a reason for hiding this comment

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

Not really. Even with public APIs in core this will break because core needs to load the corresponding classes. Frankly I don't care. Fix the stuff or search a new maintainer

@nickvergessen
Copy link

Choose a reason for hiding this comment

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

well I suggest to just put this discussion into the right spot. Open a new issue in core explaining your problem exactly or use the mailing list

Please sign in to comment.