diff --git a/integrations/nextcloud/snappymail/appinfo/routes.php b/integrations/nextcloud/snappymail/appinfo/routes.php index a502b39e9..ce0e24721 100755 --- a/integrations/nextcloud/snappymail/appinfo/routes.php +++ b/integrations/nextcloud/snappymail/appinfo/routes.php @@ -9,12 +9,12 @@ return [ ], [ 'name' => 'page#appGet', - 'url' => '/app/', + 'url' => '/run/', 'verb' => 'GET' ], [ 'name' => 'page#appPost', - 'url' => '/app/', + 'url' => '/run/', 'verb' => 'POST' ], [ diff --git a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php index 627b3674a..081d08ec0 100644 --- a/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php +++ b/integrations/nextcloud/snappymail/lib/Util/SnappyMailHelper.php @@ -86,14 +86,7 @@ class SnappyMailHelper */ public static function getAppUrl() { - $sRequestUri = \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet'); - if ($sRequestUri) { - return $sRequestUri; - } - $sRequestUri = empty($_SERVER['REQUEST_URI']) ? '': \trim($_SERVER['REQUEST_URI']); - $sRequestUri = \preg_replace('/index.php\/.+$/', 'index.php/', $sRequestUri); - $sRequestUri = $sRequestUri.'apps/snappymail/app/'; - return '/'.\ltrim($sRequestUri, '/\\'); + return \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet'); } /**