mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
Nextcloud prevent confusion by using /run/ instead of /app/ in routes #96
This commit is contained in:
parent
cf8cdc25c3
commit
5ce11ce3dd
2 changed files with 3 additions and 10 deletions
|
@ -9,12 +9,12 @@ return [
|
|||
],
|
||||
[
|
||||
'name' => 'page#appGet',
|
||||
'url' => '/app/',
|
||||
'url' => '/run/',
|
||||
'verb' => 'GET'
|
||||
],
|
||||
[
|
||||
'name' => 'page#appPost',
|
||||
'url' => '/app/',
|
||||
'url' => '/run/',
|
||||
'verb' => 'POST'
|
||||
],
|
||||
[
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue