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

Fix usage of deprecated OC.webroot #11691

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

ChristophWurst
Copy link
Member

Ref

server/core/js/js.js

Lines 53 to 62 in d07c5db

/**
* Relative path to Nextcloud root.
* For example: "/nextcloud"
*
* @type string
*
* @deprecated since 8.2, use OC.getRootPath() instead
* @see OC#getRootPath
*/
webroot:oc_webroot,

This is a big one. I deem it's a bad idea to remove this now (even though from a deprecation time line it would be okay) because it's used so much. However, I search-and-replace'd all usages I could find locally.

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Good stuff

@MorrisJobke
Copy link
Member

Please add to #11045

It's also in:

  • bookmarks
  • gallery
  • passman
  • richdocuments
  • folderplayer

@ChristophWurst
Copy link
Member Author

ChristophWurst commented Oct 9, 2018

* folderplayer

Done, except for that one. Where can I find the repo?

Please add to #11045

API not removed, so not adding this to the ticket.

@MorrisJobke
Copy link
Member

Done, except for that one. Where can I find the repo?

https://github.com/biosonic/folderplayer

@MorrisJobke
Copy link
Member

  • breaks install page:

bildschirmfoto 2018-10-09 um 09 38 59

@ChristophWurst
Copy link
Member Author

* breaks install page:

Mind sharing where that infinite recursion starts?

@MorrisJobke
Copy link
Member

Mind sharing where that infinite recursion starts?

bildschirmfoto 2018-10-09 um 10 52 32

@ChristophWurst
Copy link
Member Author

I'm not gonna comment on my latest commit.

core/js/js.js Outdated
@@ -293,7 +293,7 @@ var OCP = {},
* @since 8.2
*/
getRootPath: function() {
return OC.getRootPath();
return OC.webroot;
Copy link
Member

Choose a reason for hiding this comment

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

🤣

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 9, 2018
@MorrisJobke
Copy link
Member

JSUnit fails ...

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Oct 9, 2018
Signed-off-by: Christoph Wurst <[email protected]>
@ChristophWurst ChristophWurst force-pushed the refactor/fix-usage-deprecated-oc-webroot branch from b84b9fe to 9af69ca Compare October 9, 2018 11:54
@ChristophWurst
Copy link
Member Author

Fixed the tests, squashed and rebased.

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 9, 2018
@ChristophWurst
Copy link
Member Author

@MorrisJobke MorrisJobke added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 9, 2018
@MorrisJobke MorrisJobke merged commit dcf5a57 into master Oct 9, 2018
@MorrisJobke MorrisJobke deleted the refactor/fix-usage-deprecated-oc-webroot branch October 9, 2018 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants