Skip to content

Commit

Permalink
Setting the active navigation entry to 'files_index' is so wrong ...
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed May 9, 2017
1 parent b69736a commit e0b6caa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 1 addition & 2 deletions apps/files/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
namespace OCA\Files\AppInfo;

use OCA\Files\Controller\ApiController;
use OCA\Files\Controller\ViewController;
use OCP\AppFramework\App;
use \OCA\Files\Service\TagService;
use \OCP\IContainer;
use OCA\Files\Controller\ViewController;

class Application extends App {
public function __construct(array $urlParams= []) {
Expand Down Expand Up @@ -56,7 +56,6 @@ public function __construct(array $urlParams= []) {
$c->query('AppName'),
$c->query('Request'),
$server->getURLGenerator(),
$server->getNavigationManager(),
$c->query('L10N'),
$server->getConfig(),
$server->getEventDispatcher(),
Expand Down
4 changes: 0 additions & 4 deletions apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class ViewController extends Controller {
* @param string $appName
* @param IRequest $request
* @param IURLGenerator $urlGenerator
* @param INavigationManager $navigationManager
* @param IL10N $l10n
* @param IConfig $config
* @param EventDispatcherInterface $eventDispatcherInterface
Expand All @@ -84,7 +83,6 @@ class ViewController extends Controller {
public function __construct($appName,
IRequest $request,
IURLGenerator $urlGenerator,
INavigationManager $navigationManager,
IL10N $l10n,
IConfig $config,
EventDispatcherInterface $eventDispatcherInterface,
Expand All @@ -96,7 +94,6 @@ public function __construct($appName,
$this->appName = $appName;
$this->request = $request;
$this->urlGenerator = $urlGenerator;
$this->navigationManager = $navigationManager;
$this->l10n = $l10n;
$this->config = $config;
$this->eventDispatcher = $eventDispatcherInterface;
Expand Down Expand Up @@ -254,7 +251,6 @@ public function index($dir = '', $view = '', $fileid = null) {
$params['fileNotFound'] = $fileNotFound ? 1 : 0;
$params['appNavigation'] = $nav;
$params['appContents'] = $contentItems;
$this->navigationManager->setActiveEntry('files_index');

$response = new TemplateResponse(
$this->appName,
Expand Down
5 changes: 0 additions & 5 deletions apps/files/tests/Controller/ViewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\INavigationManager;
use OCP\IL10N;
use OCP\IConfig;
use OCP\IUserSession;
Expand All @@ -51,8 +50,6 @@ class ViewControllerTest extends TestCase {
private $request;
/** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator;
/** @var INavigationManager */
private $navigationManager;
/** @var IL10N */
private $l10n;
/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
Expand All @@ -74,7 +71,6 @@ public function setUp() {
parent::setUp();
$this->request = $this->createMock('\OCP\IRequest');
$this->urlGenerator = $this->createMock('\OCP\IURLGenerator');
$this->navigationManager = $this->createMock('\OCP\INavigationManager');
$this->l10n = $this->createMock('\OCP\IL10N');
$this->config = $this->createMock('\OCP\IConfig');
$this->eventDispatcher = $this->createMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
Expand All @@ -93,7 +89,6 @@ public function setUp() {
'files',
$this->request,
$this->urlGenerator,
$this->navigationManager,
$this->l10n,
$this->config,
$this->eventDispatcher,
Expand Down

0 comments on commit e0b6caa

Please sign in to comment.