mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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',
|
'name' => 'page#appGet',
|
||||||
'url' => '/app/',
|
'url' => '/run/',
|
||||||
'verb' => 'GET'
|
'verb' => 'GET'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'page#appPost',
|
'name' => 'page#appPost',
|
||||||
'url' => '/app/',
|
'url' => '/run/',
|
||||||
'verb' => 'POST'
|
'verb' => 'POST'
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -86,14 +86,7 @@ class SnappyMailHelper
|
||||||
*/
|
*/
|
||||||
public static function getAppUrl()
|
public static function getAppUrl()
|
||||||
{
|
{
|
||||||
$sRequestUri = \OC::$server->getURLGenerator()->linkToRoute('snappymail.page.appGet');
|
return \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, '/\\');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue