diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-06-02 14:00:55 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-06-02 14:24:55 +0200 |
commit | 3bca70999ad6af86d465865eac903f5489130cdd (patch) | |
tree | 80c5688a54ba3c1e3b6060691919458aacd82871 /core/src | |
parent | 1c7d089434f32c8efdb836ab289e85ef897031c4 (diff) | |
download | nextcloud-server-3bca70999ad6af86d465865eac903f5489130cdd.tar.gz nextcloud-server-3bca70999ad6af86d465865eac903f5489130cdd.zip |
Fix some linter warning
Part of my ongoing battle against deprecation messages.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/l10n.js | 3 | ||||
-rw-r--r-- | core/src/OC/legacy-loader.js | 5 | ||||
-rw-r--r-- | core/src/OC/password-confirmation.js | 3 | ||||
-rw-r--r-- | core/src/OC/query-string.js | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/core/src/OC/l10n.js b/core/src/OC/l10n.js index 6495f514c7d..a4920e9d271 100644 --- a/core/src/OC/l10n.js +++ b/core/src/OC/l10n.js @@ -14,6 +14,7 @@ import DOMPurify from 'dompurify' import Handlebars from 'handlebars' import identity from 'lodash/fp/identity' import escapeHTML from 'escape-html' +import { generateFilePath } from '@nextcloud/router' import OC from './index' import { @@ -49,7 +50,7 @@ const L10n = { } const self = this - const url = OC.filePath(appName, 'l10n', OC.getLocale() + '.json') + const url = generateFilePath(appName, 'l10n', OC.getLocale() + '.json') // load JSON translation bundle per AJAX return $.get(url) diff --git a/core/src/OC/legacy-loader.js b/core/src/OC/legacy-loader.js index ece9f3c3fc1..273ba3e359f 100644 --- a/core/src/OC/legacy-loader.js +++ b/core/src/OC/legacy-loader.js @@ -20,6 +20,7 @@ */ import $ from 'jquery' +import { generateFilePath } from '@nextcloud/router' const loadedScripts = {} const loadedStyles = [] @@ -37,7 +38,7 @@ export const addScript = (app, script, ready) => { console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead') let deferred - const path = OC.filePath(app, 'js', script + '.js') + const path = generateFilePath(app, 'js', script + '.js') if (!loadedScripts[path]) { deferred = $.Deferred() $.getScript(path, () => deferred.resolve()) @@ -59,7 +60,7 @@ export const addScript = (app, script, ready) => { export const addStyle = (app, style) => { console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead') - const path = OC.filePath(app, 'css', style + '.css') + const path = generateFilePath(app, 'css', style + '.css') if (loadedStyles.indexOf(path) === -1) { loadedStyles.push(path) if (document.createStyleSheet) { diff --git a/core/src/OC/password-confirmation.js b/core/src/OC/password-confirmation.js index f708217fc84..c74a8df9e97 100644 --- a/core/src/OC/password-confirmation.js +++ b/core/src/OC/password-confirmation.js @@ -22,6 +22,7 @@ import _ from 'underscore' import $ from 'jquery' import moment from 'moment' +import { generateUrl } from '@nextcloud/router' import OC from './index' @@ -105,7 +106,7 @@ export default { const self = this $.ajax({ - url: OC.generateUrl('/login/confirm'), + url: generateUrl('/login/confirm'), data: { password: password, }, diff --git a/core/src/OC/query-string.js b/core/src/OC/query-string.js index 502fa15e474..33a51505ae8 100644 --- a/core/src/OC/query-string.js +++ b/core/src/OC/query-string.js @@ -19,6 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +import $ from 'jquery' + /** * Parses a URL query string into a JS map * @param {string} queryString query string in the format param1=1234¶m2=abcde¶m3=xyz |