-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Move OC_Defaults to OCP\Defaults #4256
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,11 +138,13 @@ public function getLogo() { | |
| $logoExists = false; | ||
| } | ||
|
|
||
| $cacheBusterCounter = $this->config->getAppValue('theming', 'cachebuster', '0'); | ||
|
|
||
| if(!$logo || !$logoExists) { | ||
| return $this->urlGenerator->imagePath('core','logo.svg'); | ||
| return $this->urlGenerator->imagePath('core','logo.svg') . '?v=' . $cacheBusterCounter; | ||
| } | ||
|
|
||
| return $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); | ||
| return $this->urlGenerator->linkToRoute('theming.Theming.getLogo') . '?v=' . $cacheBusterCounter; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @juliushaertl I would like to have your feedback on this. I think this is the cleaner way to handle this cache buster, because then the |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -190,15 +192,6 @@ public function shouldReplaceIcons() { | |
| return $value; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the current cache buster count | ||
| * | ||
| * @return string | ||
| */ | ||
| public function getCacheBusterCounter() { | ||
| return $this->config->getAppValue('theming', 'cachebuster', '0'); | ||
| } | ||
|
|
||
| /** | ||
| * Increases the cache buster key | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,11 +30,8 @@ | |
|
|
||
| namespace OC\Core; | ||
|
|
||
| use OC\AppFramework\Utility\SimpleContainer; | ||
| use OC\Core\Controller\JsController; | ||
| use OC\Core\Controller\OCJSController; | ||
| use OC\Security\IdentityProof\Manager; | ||
| use OC\Server; | ||
| use OCP\AppFramework\App; | ||
| use OC\Core\Controller\CssController; | ||
| use OCP\AppFramework\Utility\ITimeFactory; | ||
|
|
@@ -70,25 +67,6 @@ public function __construct() { | |
| $container->query(ITimeFactory::class) | ||
| ); | ||
| }); | ||
| $container->registerService(OCJSController::class, function () use ($container) { | ||
| /** @var Server $server */ | ||
| $server = $container->getServer(); | ||
| return new OCJSController( | ||
| $container->query('appName'), | ||
| $server->getRequest(), | ||
| $server->getL10N('core'), | ||
| // This is required for the theming to overwrite the `OC_Defaults`, see | ||
| // https://github.com/nextcloud/server/issues/3148 | ||
| $server->getThemingDefaults(), | ||
| $server->getAppManager(), | ||
| $server->getSession(), | ||
| $server->getUserSession(), | ||
| $server->getConfig(), | ||
| $server->getGroupManager(), | ||
| $server->getIniWrapper(), | ||
| $server->getURLGenerator() | ||
| ); | ||
| }); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reverts basically #3163, because it is now properly injected as |
||
| $container->registerService(JsController::class, function () use ($container) { | ||
| return new JsController( | ||
| $container->query('AppName'), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cant we make the method return the same thing? Sounds much better to me, or whats the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could but all those wrapper things are so weird to me. Quering the right class directly seems so much nicer to me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it's public API and therefor the method needs to return the correct item anyway?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pfff well still...
but fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods are slightly different -.- and one is public and the other is private namespace :/