summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/lib/Controller/ViewController.php5
-rw-r--r--apps/files/templates/index.php4
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index fc59622af89..bfeb2cafcf6 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -41,6 +41,7 @@ use OCP\IUserSession;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use OCP\Files\Folder;
use OCP\App\IAppManager;
+use Symfony\Component\EventDispatcher\GenericEvent;
/**
* Class ViewController
@@ -199,7 +200,8 @@ class ViewController extends Controller {
$contentItems[] = $contentItem;
}
- $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts');
+ $event = new GenericEvent(null, ['hiddenFields' => []]);
+ $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts', $event);
$params = [];
$params['usedSpacePercent'] = (int)$storageInfo['relative'];
@@ -215,6 +217,7 @@ class ViewController extends Controller {
$params['fileNotFound'] = $fileNotFound ? 1 : 0;
$params['appNavigation'] = $nav;
$params['appContents'] = $contentItems;
+ $params['hiddenFields'] = $event->getArgument('hiddenFields');
$response = new TemplateResponse(
$this->appName,
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 1670ccfd138..b49684643bb 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -21,3 +21,7 @@
<input type="hidden" name="defaultFileSortingDirection" id="defaultFileSortingDirection" value="<?php p($_['defaultFileSortingDirection']) ?>" />
<input type="hidden" name="showHiddenFiles" id="showHiddenFiles" value="<?php p($_['showHiddenFiles']); ?>" />
<?php endif;
+
+foreach ($_['hiddenFields'] as $name => $value) {?>
+<input type="hidden" name="<?php p($name) ?>" id="<?php p($name) ?>" value="<?php p($value) ?>" />
+<?php }