Skip to content

Commit d58ce07

Browse files
authored
Merge branch 'master' into cuppett/migrate-appconfig-keys-to-bool
2 parents ab9a644 + faa78c8 commit d58ce07

804 files changed

Lines changed: 3288 additions & 4418 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/appstore/appinfo/info.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,21 @@
1919
<dependencies>
2020
<nextcloud min-version="35" max-version="35"/>
2121
</dependencies>
22+
23+
<navigations>
24+
<navigation role="admin">
25+
<name>Appstore</name>
26+
<route>appstore.page.viewApps</route>
27+
<icon>app.svg</icon>
28+
<order>99</order>
29+
</navigation>
30+
31+
<navigation role="admin">
32+
<name>Apps</name>
33+
<route>appstore.page.viewApps</route>
34+
<icon>app.svg</icon>
35+
<order>5</order>
36+
<type>settings</type>
37+
</navigation>
38+
</navigations>
2239
</info>

apps/appstore/lib/Controller/PageController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use OCP\AppFramework\Services\IInitialState;
2424
use OCP\IConfig;
2525
use OCP\IL10N;
26-
use OCP\INavigationManager;
2726
use OCP\IRequest;
2827
use OCP\IURLGenerator;
2928
use OCP\Server;
@@ -41,7 +40,6 @@ public function __construct(
4140
private readonly IURLGenerator $urlGenerator,
4241
private readonly IInitialState $initialState,
4342
private readonly BundleFetcher $bundleFetcher,
44-
private readonly INavigationManager $navigationManager,
4543
) {
4644
parent::__construct(Application::APP_ID, $request);
4745
}
@@ -51,8 +49,6 @@ public function __construct(
5149
#[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}', defaults: ['category' => ''], root: '')]
5250
#[FrontpageRoute(verb: 'GET', url: '/settings/apps/{category}/{id}', defaults: ['category' => '', 'id' => ''], root: '')]
5351
public function viewApps(): TemplateResponse {
54-
$this->navigationManager->setActiveEntry('core_apps');
55-
5652
$this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true));
5753
$this->initialState->provideInitialState('appstoreBundles', $this->getBundles());
5854
$this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual'));

apps/appstore/tests/Controller/PageControllerTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use OCP\AppFramework\Services\IInitialState;
1818
use OCP\IConfig;
1919
use OCP\IL10N;
20-
use OCP\INavigationManager;
2120
use OCP\IRequest;
2221
use OCP\IURLGenerator;
2322
use PHPUnit\Framework\MockObject\MockObject;
@@ -31,8 +30,6 @@ final class PageControllerTest extends TestCase {
3130

3231
private IConfig&MockObject $config;
3332

34-
private INavigationManager&MockObject $navigationManager;
35-
3633
private IAppManager&MockObject $appManager;
3734

3835
private BundleFetcher&MockObject $bundleFetcher;
@@ -55,7 +52,6 @@ protected function setUp(): void {
5552
->method('t')
5653
->willReturnArgument(0);
5754
$this->config = $this->createMock(IConfig::class);
58-
$this->navigationManager = $this->createMock(INavigationManager::class);
5955
$this->appManager = $this->createMock(IAppManager::class);
6056
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
6157
$this->installer = $this->createMock(Installer::class);
@@ -71,7 +67,6 @@ protected function setUp(): void {
7167
$this->urlGenerator,
7268
$this->initialState,
7369
$this->bundleFetcher,
74-
$this->navigationManager,
7570
);
7671
}
7772

@@ -85,10 +80,6 @@ public function testViewApps(): void {
8580
->method('getSystemValueBool')
8681
->with('appstoreenabled', true)
8782
->willReturn(true);
88-
$this->navigationManager
89-
->expects($this->once())
90-
->method('setActiveEntry')
91-
->with('core_apps');
9283

9384
$this->initialState
9485
->expects($this->exactly(4))
@@ -118,10 +109,6 @@ public function testViewAppsAppstoreNotEnabled(): void {
118109
->method('getSystemValueBool')
119110
->with('appstoreenabled', true)
120111
->willReturn(false);
121-
$this->navigationManager
122-
->expects($this->once())
123-
->method('setActiveEntry')
124-
->with('core_apps');
125112

126113
$this->initialState
127114
->expects($this->exactly(4))

0 commit comments

Comments
 (0)