mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
There we go, we have a working login screen in Nextcloud #96
This commit is contained in:
parent
32059330dd
commit
b3476818ee
2 changed files with 11 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
************************************************************************
|
************************************************************************
|
||||||
|
|
||||||
REQUIREMENTS:
|
REQUIREMENTS:
|
||||||
- Nextcloud version 14 and above
|
- Nextcloud version 18 and above
|
||||||
|
|
||||||
INSTALL & CONFIGURATION:
|
INSTALL & CONFIGURATION:
|
||||||
Start within Nextcloud, and click on the "+ Apps" button in the upper-left corner dropdown menu:
|
Start within Nextcloud, and click on the "+ Apps" button in the upper-left corner dropdown menu:
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,21 @@ class SnappyMailHelper
|
||||||
if (!\class_exists('RainLoop\\Api')) {
|
if (!\class_exists('RainLoop\\Api')) {
|
||||||
if ($api) {
|
if ($api) {
|
||||||
$_ENV['SNAPPYMAIL_INCLUDE_AS_API'] = true;
|
$_ENV['SNAPPYMAIL_INCLUDE_AS_API'] = true;
|
||||||
|
} else {
|
||||||
|
$_SERVER['SCRIPT_NAME'] = \OC::$server->getAppManager()->getAppWebPath('snappymail') . '/app/index.php';
|
||||||
}
|
}
|
||||||
$_ENV['SNAPPYMAIL_NEXTCLOUD'] = true;
|
$_ENV['SNAPPYMAIL_NEXTCLOUD'] = true;
|
||||||
$sData = \rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/').'/';
|
$sData = \rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/').'/snappymail/';
|
||||||
if (\is_dir($sData)) {
|
if (\is_dir($sData)) {
|
||||||
\define('APP_DATA_FOLDER_PATH', $sData);
|
\define('APP_DATA_FOLDER_PATH', $sData);
|
||||||
}
|
}
|
||||||
|
// Nextcloud the default spl_autoload_register() not working
|
||||||
|
\spl_autoload_register(function($sClassName){
|
||||||
|
$file = RAINLOOP_APP_LIBRARIES_PATH . \strtolower(\strtr($sClassName, '\\', DIRECTORY_SEPARATOR)) . '.php';
|
||||||
|
if (is_file($file)) {
|
||||||
|
include_once $file;
|
||||||
|
}
|
||||||
|
});
|
||||||
require_once \OC::$server->getAppManager()->getAppPath('snappymail') . '/app/index.php';
|
require_once \OC::$server->getAppManager()->getAppPath('snappymail') . '/app/index.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue