diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-12 09:56:46 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-12 16:49:39 +0200 |
commit | ae86845062e6bf303799c8ff52fd997db6cd22ab (patch) | |
tree | 5ac103df2b7eb4e5087886790c3a75469c58f627 /apps/files/lib/Controller | |
parent | 5bac9693511ca0e9e5f0553ecc8791cccf05c935 (diff) | |
download | nextcloud-server-ae86845062e6bf303799c8ff52fd997db6cd22ab.tar.gz nextcloud-server-ae86845062e6bf303799c8ff52fd997db6cd22ab.zip |
Fixed favorite folder view display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 4035837459a..2e91c83ee83 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -181,15 +181,16 @@ class ViewController extends Controller { $navBarPositionPosition = 6; $currentCount = 0; - foreach ($favElements['folders'] as $elem) { + foreach ($favElements['folders'] as $dir) { - $id = substr($elem, strrpos($elem, '/') + 1, strlen($elem)); - $link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $elem, 'view' => 'files']); + $id = substr($dir, strrpos($dir, '/') + 1, strlen($dir)); + $link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $dir, 'view' => 'files']); $sortingValue = ++$currentCount; - $element = [ - 'id' => $id, + 'id' => str_replace('/', '-', $dir), + 'view' => 'files', 'href' => $link, + 'dir' => $dir, 'order' => $navBarPositionPosition, 'folderPosition' => $sortingValue, 'name' => $id, |