Search: Fix app prefix in search redirect

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
This commit is contained in:
Sean Molenaar 2021-04-24 14:20:26 +02:00 коммит произвёл Benjamin Brahmer
Родитель 91db7113a8
Коммит 7c124dc288
4 изменённых файлов: 10 добавлений и 18 удалений

Просмотреть файл

@ -2,28 +2,23 @@
* [Bernhard Posselt](mailto:dev@bernhard-posselt.com)
* [Alessandro Cosentino](mailto:cosenal@gmail.com)
* [Benjamin Brahmer](mailto:info@b-brahmer.de)
* [Marco Nassabain](mailto:marco.nassabain@hotmail.com)
* [Robin Appelman](mailto:icewind@owncloud.com)
* [Sean Molenaar](mailto:sean@seanmolenaar.eu)
* [Gregor Tätzner](mailto:gregor@freenet.de)
* [Sean Molenaar](mailto:SMillerDev@users.noreply.github.com)
* [Morris Jobke](mailto:hey@morrisjobke.de)
* [anoy](mailto:anoymouserver+github@mailbox.org)
* [Jimmy Huynh](mailto:jimmy.huynh@etu.unistra.fr)
* [Aurélien](mailto:dav.aurelien@gmail.com)
* [Jan-Christoph Borchardt](mailto:hey@jancborchardt.net)
* [Paul Tirk](mailto:paultirk@paultirk.com)
* [Daniel Schaal](mailto:daniel@schaal.email)
* [Davide Saurino](mailto:davide.saurino@alcacoop.it)
* [raghunayyar](mailto:me@iraghu.com)
* [WENDLING NICOLAS](mailto:nicolas.wendling2@etu.unistra.fr)
* [bastei](mailto:bastei@users.noreply.github.com)
* [Bernhard Posselt](mailto:bep@foryouandyourcustomers.com)
* [Thomas Müller](mailto:thomas.mueller@tmit.eu)
* [Hoàng Đức Hiếu](mailto:hdhoang@zahe.me)
* [Marco Nassabain](mailto:marco.nassabain@etu.unistra.fr)
* [rakekniven](mailto:mark.ziegler@rakekniven.de)
* [Daniel Opitz](mailto:git@copynpaste.de)
* [Marco Nassabain](mailto:marco.nassabain@hotmail.com)
* [Sean Molenaar](mailto:sean@m2mobi.com)
* [David-Development](mailto:david-dev@live.de)
* [IBBoard](mailto:dev@ibboard.co.uk)
@ -31,7 +26,7 @@
* [Lukas Reschke](mailto:lukas@owncloud.com)
* [Bart Visscher](mailto:bartv@thisnet.nl)
* [Christian Elmer](mailto:christian@keinkurt.de)
* [Nicolas Wendling](mailto:nicolas.wendling1011@gmail.com)
* [Jimmy Huynh](mailto:jimmy.huynh@etu.unistra.fr)
* [Thomas Tanghus](mailto:thomas@tanghus.net)
* [Volkan Gezer](mailto:volkangezer@gmail.com)
* [Xéfir Destiny](mailto:xefir@crystalyx.net)
@ -44,13 +39,11 @@
* [Brice Maron](mailto:brice@bmaron.net)
* [Christoph Stenglein](mailto:christoph@christophstenglein.com)
* [Daniel Kesselberg](mailto:mail@danielkesselberg.de)
* [ELHADDAD Hamza](mailto:elhaddadhamza49@gmail.com)
* [Jakob Sack](mailto:mail@jakobsack.de)
* [Qingping Hou](mailto:dave2008713@gmail.com)
* [Roman](mailto:reverse@jamm.me)
* [b_b](mailto:bruno@eliaz.fr)
* [heyarne](mailto:arne@schlueter.is)
* [marco.nassabain@etu.unistra.fr](mailto:marco.nassabain@hotmail.com)
* [Andreas Fischer](mailto:bantu@owncloud.com)
* [David Guillot](mailto:david@guillot.me)
* [Gioele Falcetti](mailto:thegio.f@gmail.com)
@ -80,8 +73,6 @@
* [Andrea Boero](mailto:mail@tsumi.it)
* [Andreas Demmelbauer](mailto:git@notice.at)
* [Arthur Schiwon](mailto:blizzz@arthur-schiwon.de)
* [Aurelien DAVID](mailto:aurelien.david@etu.unistra.fr)
* [Aurelien DAVID](mailto:dav.aurelien@gmail.com)
* [Benedikt Geißler](mailto:benedikt@g5r.eu)
* [Bernhard Posselt](mailto:bernhard@desktop.localdomain)
* [Candid Dauth](mailto:cdauth@cdauth.eu)
@ -141,7 +132,6 @@
* [Tilo Spannagel](mailto:development@tilosp.de)
* [Timo Schmidt](mailto:timo@xinterchange.net)
* [Tucker McKnight](mailto:tucker.mcknight@gmail.com)
* [WENDLING NICOLAS](mailto:nicolas.wendling1011@gmail.com)
* [Welling Guzmán](mailto:WellingGuzman@users.noreply.github.com)
* [Xaver Maierhofer](mailto:xaver.maierhofer@xwissen.info)
* [Xemle](mailto:xemle@phtagr.org)
@ -151,7 +141,6 @@
* [b_b](mailto:brunobergot@gmail.com)
* [bjoerns1983](mailto:bjoern@sengotta.net)
* [blackcrack](mailto:blackcrack@blackysgate.de)
* [cherguimalih](mailto:ilyes.chergui-malih@etu.unistra.fr)
* [comradekingu](mailto:epost@anotheragency.no)
* [derritter88](mailto:derritter88@users.noreply.github.com)
* [e-alfred](mailto:e-alfred@users.noreply.github.com)
@ -160,7 +149,6 @@
* [kesselb](mailto:mail@danielkesselberg.de)
* [kondou](mailto:kondou@ts.unde.re)
* [markusj](mailto:markusj@users.noreply.github.com)
* [mnassabain](mailto:34754819+mnassabain@users.noreply.github.com)
* [nexus-uw](mailto:you@example.com)
* [repat](mailto:repat@repat.de)
* [ritchiewilson](mailto:rawilson52@gmail.com)

Просмотреть файл

@ -7,6 +7,7 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1
- v2 API implementation (folder part)
### Fixed
- Fix search results not redirecting to the news app
## [15.x.x]
### Changed
@ -15,6 +16,9 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1
## [15.4.0-rc1] - 2021-04-16
### Changed
### Fixed
- Check category label for null (#1282)
- Do not return non-matching search items

Просмотреть файл

@ -49,7 +49,7 @@ class FolderSearchProvider implements IProvider
public function getOrder(string $route, array $routeParameters): int
{
if ($route === 'news.view.index') {
if ($route === 'news.page.index') {
// Active app, prefer my results
return -1;
}
@ -71,7 +71,7 @@ class FolderSearchProvider implements IProvider
$this->urlGenerator->imagePath('core', 'filetypes/folder.svg'),
$folder->getName(),
'',
$this->urlGenerator->linkToRoute('news.view.index') . '#/items/folders/' . $folder->getId()
$this->urlGenerator->linkToRoute('news.page.index') . '#/items/folders/' . $folder->getId()
);
}

Просмотреть файл

@ -77,7 +77,7 @@ class FolderSearchProviderTest extends TestCase
public function testGetOrderInternal()
{
$this->assertSame(-1, $this->class->getOrder('news.view.index', []));
$this->assertSame(-1, $this->class->getOrder('news.page.index', []));
}
public function testSearch()
@ -117,7 +117,7 @@ class FolderSearchProviderTest extends TestCase
$this->generator->expects($this->once())
->method('linkToRoute')
->with('news.view.index')
->with('news.page.index')
->willReturn('/news');