Skip to content

Commit

Permalink
Fix variabable override in file view
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Jul 28, 2021
1 parent 9d163ec commit a7ea396
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/files/lib/Controller/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,17 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal

$navBarPositionPosition = 6;
$currentCount = 0;
foreach ($favElements['folders'] as $dir) {
$link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $dir, 'view' => 'files']);
foreach ($favElements['folders'] as $favElement) {
$link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $favElement, 'view' => 'files']);
$sortingValue = ++$currentCount;
$element = [
'id' => str_replace('/', '-', $dir),
'id' => str_replace('/', '-', $favElement),
'view' => 'files',
'href' => $link,
'dir' => $dir,
'dir' => $favElement,
'order' => $navBarPositionPosition,
'folderPosition' => $sortingValue,
'name' => basename($dir),
'name' => basename($favElement),
'icon' => 'files',
'quickaccesselement' => 'true'
];
Expand Down

0 comments on commit a7ea396

Please sign in to comment.