mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix(appstore): do not set wrong app as active
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
e5297a1d04
commit
c81e949524
2 changed files with 0 additions and 17 deletions
|
|
@ -23,7 +23,6 @@ use OCP\AppFramework\Http\TemplateResponse;
|
|||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\INavigationManager;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\Server;
|
||||
|
|
@ -41,7 +40,6 @@ final class PageController extends Controller {
|
|||
private readonly IURLGenerator $urlGenerator,
|
||||
private readonly IInitialState $initialState,
|
||||
private readonly BundleFetcher $bundleFetcher,
|
||||
private readonly INavigationManager $navigationManager,
|
||||
) {
|
||||
parent::__construct(Application::APP_ID, $request);
|
||||
}
|
||||
|
|
@ -51,8 +49,6 @@ final class PageController extends Controller {
|
|||
#[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}', defaults: ['category' => ''], root: '')]
|
||||
#[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}/{id}', defaults: ['category' => '', 'id' => ''], root: '')]
|
||||
public function viewApps(): TemplateResponse {
|
||||
$this->navigationManager->setActiveEntry('core_apps');
|
||||
|
||||
$this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true));
|
||||
$this->initialState->provideInitialState('appstoreBundles', $this->getBundles());
|
||||
$this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual'));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use OCP\AppFramework\Http\TemplateResponse;
|
|||
use OCP\AppFramework\Services\IInitialState;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\INavigationManager;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
|
@ -30,8 +29,6 @@ final class PageControllerTest extends TestCase {
|
|||
|
||||
private IConfig&MockObject $config;
|
||||
|
||||
private INavigationManager&MockObject $navigationManager;
|
||||
|
||||
private IAppManager&MockObject $appManager;
|
||||
|
||||
private BundleFetcher&MockObject $bundleFetcher;
|
||||
|
|
@ -54,7 +51,6 @@ final class PageControllerTest extends TestCase {
|
|||
->method('t')
|
||||
->willReturnArgument(0);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->navigationManager = $this->createMock(INavigationManager::class);
|
||||
$this->appManager = $this->createMock(IAppManager::class);
|
||||
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
|
||||
$this->installer = $this->createMock(Installer::class);
|
||||
|
|
@ -70,7 +66,6 @@ final class PageControllerTest extends TestCase {
|
|||
$this->urlGenerator,
|
||||
$this->initialState,
|
||||
$this->bundleFetcher,
|
||||
$this->navigationManager,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -84,10 +79,6 @@ final class PageControllerTest extends TestCase {
|
|||
->method('getSystemValueBool')
|
||||
->with('appstoreenabled', true)
|
||||
->willReturn(true);
|
||||
$this->navigationManager
|
||||
->expects($this->once())
|
||||
->method('setActiveEntry')
|
||||
->with('core_apps');
|
||||
|
||||
$this->initialState
|
||||
->expects($this->exactly(4))
|
||||
|
|
@ -117,10 +108,6 @@ final class PageControllerTest extends TestCase {
|
|||
->method('getSystemValueBool')
|
||||
->with('appstoreenabled', true)
|
||||
->willReturn(false);
|
||||
$this->navigationManager
|
||||
->expects($this->once())
|
||||
->method('setActiveEntry')
|
||||
->with('core_apps');
|
||||
|
||||
$this->initialState
|
||||
->expects($this->exactly(4))
|
||||
|
|
|
|||
Loading…
Reference in a new issue