Skip to content

Commit 5f3da98

Browse files
committed
Redirect public link to phoenix
1 parent b66be9c commit 5f3da98

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/routes.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@
9292
});
9393

9494
// Sharing routes
95-
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(function ($urlParams) {
95+
$this->create('files_sharing.sharecontroller.showShare', '/s/{token}')->action(static function ($urlParams) {
96+
$phoenixBaseUrl = \OC::$server->getConfig()->getSystemValue('phoenix.baseUrl', null);
97+
if ($phoenixBaseUrl) {
98+
$token = $urlParams['token'];
99+
\OC_Response::redirect("$phoenixBaseUrl/index.html#/s/$token");
100+
return;
101+
}
96102
$app = new \OCA\Files_Sharing\AppInfo\Application($urlParams);
97103
$app->dispatch('ShareController', 'showShare');
98104
});

0 commit comments

Comments
 (0)