Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 5ce11ce

Browse files
author
the-djmaze
committed
Nextcloud prevent confusion by using /run/ instead of /app/ in routes #96
1 parent cf8cdc2 commit 5ce11ce

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

integrations/nextcloud/snappymail/appinfo/routes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
],
1010
[
1111
'name' => 'page#appGet',
12-
'url' => '/app/',
12+
'url' => '/run/',
1313
'verb' => 'GET'
1414
],
1515
[
1616
'name' => 'page#appPost',
17-
'url' => '/app/',
17+
'url' => '/run/',
1818
'verb' => 'POST'
1919
],
2020
[

integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,7 @@ public static function startApp(bool $api = false)
8686
*/
8787
public static function getAppUrl()
8888
{
89-
$sRequestUri = \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet');
90-
if ($sRequestUri) {
91-
return $sRequestUri;
92-
}
93-
$sRequestUri = empty($_SERVER['REQUEST_URI']) ? '': \trim($_SERVER['REQUEST_URI']);
94-
$sRequestUri = \preg_replace('/index.php\/.+$/', 'index.php/', $sRequestUri);
95-
$sRequestUri = $sRequestUri.'apps/snappymail/app/';
96-
return '/'.\ltrim($sRequestUri, '/\\');
89+
return \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet');
9790
}
9891

9992
/**

0 commit comments

Comments
 (0)