From 6eced42b7a40f5b0ea0489244583219d0ee2e7af Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Mon, 3 Aug 2020 16:50:39 +0200 Subject: Remove outdated legacy search scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- core/src/OC/index.js | 2 -- core/src/OC/search.js | 41 ----------------------------------------- core/src/unified-search.js | 12 ++++++++++++ 3 files changed, 12 insertions(+), 43 deletions(-) delete mode 100644 core/src/OC/search.js (limited to 'core/src') diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 61de15516c8..036e640be39 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -103,7 +103,6 @@ import msg from './msg' import Notification from './notification' import PasswordConfirmation from './password-confirmation' import Plugins from './plugins' -import search from './search' import { theme } from './theme' import Util from './util' import { debug } from './debug' @@ -249,7 +248,6 @@ export default { Notification, PasswordConfirmation, Plugins, - search, theme, Util, debug, diff --git a/core/src/OC/search.js b/core/src/OC/search.js deleted file mode 100644 index 281907a06a7..00000000000 --- a/core/src/OC/search.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @copyright 2019 Christoph Wurst - * - * @author 2019 Christoph Wurst - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -import OC from './index' - -/** - * Do a search query and display the results - * @param {string} query the search query - */ -const search = function(query) { - OC.Search.search(query, null, 0, 30) -} - -/** - * @namespace OC.search - */ -search.customResults = {} -/** - * @deprecated use get/setFormatter() instead - */ -search.resultTypes = {} - -export default search diff --git a/core/src/unified-search.js b/core/src/unified-search.js index ba975d78564..c6d835836bb 100644 --- a/core/src/unified-search.js +++ b/core/src/unified-search.js @@ -32,6 +32,18 @@ __webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-next-line camelcase __webpack_public_path__ = generateFilePath('core', '', 'js/') +// TODO: remove with nc22 +if (!OCA.Search) { + class Search { + + constructor() { + console.warn('OCA.Search is deprecated. Please use the unified search API instead') + } + + } + OCA.Search = Search +} + Vue.mixin({ methods: { t, -- cgit v1.2.3