mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Draft code to run SnappyMail inside Nextcloud without iframe for
This commit is contained in:
parent
dcf4983a7d
commit
d52f2adb2b
4 changed files with 82 additions and 12 deletions
|
|
@ -17,15 +17,7 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
$this->addHook('filter.app-data', 'FilterAppData');
|
||||
$this->addHook('json.attachments', 'SaveAttachments');
|
||||
|
||||
$sAppPath = \rtrim(\trim(\OC::$server->getAppManager()->getAppWebPath()), '\\/').'/app/';
|
||||
if (!$sAppPath) {
|
||||
$sUrl = \MailSo\Base\Http::SingletonInstance()->GetUrl();
|
||||
if (\str_contains($sUrl, '/index.php/apps/snappymail/')) {
|
||||
$sAppPath = \preg_replace('/\/index\.php\/apps\/snappymail.+$/',
|
||||
'/apps/snappymail/app/', $sUrl);
|
||||
}
|
||||
}
|
||||
$_SERVER['SCRIPT_NAME'] = $sAppPath;
|
||||
$this->addJs('js/attachments.js');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue