diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-03 16:50:39 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-08-04 20:56:22 +0200 |
commit | 6eced42b7a40f5b0ea0489244583219d0ee2e7af (patch) | |
tree | c7244e50328a27c28579f9812a8cc2808f64e13a /core/src | |
parent | 72b45f9546208c82e76ddb2ad7995f0485d99b18 (diff) | |
download | nextcloud-server-6eced42b7a40f5b0ea0489244583219d0ee2e7af.tar.gz nextcloud-server-6eced42b7a40f5b0ea0489244583219d0ee2e7af.zip |
Remove outdated legacy search scripts
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/index.js | 2 | ||||
-rw-r--r-- | core/src/OC/search.js | 41 | ||||
-rw-r--r-- | core/src/unified-search.js | 12 |
3 files changed, 12 insertions, 43 deletions
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 <christoph@winzerhof-wurst.at> - * - * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> - * - * @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 <http://www.gnu.org/licenses/>. - */ - -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, |