mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Fixed ownCloud integration (Closes #378)
This commit is contained in:
parent
2d287f0b8d
commit
bfafe95975
9 changed files with 71 additions and 23 deletions
|
|
@ -6,6 +6,8 @@ if (!\defined('RAINLOOP_APP_LIBRARIES_PATH'))
|
|||
\define('RAINLOOP_APP_LIBRARIES_PATH', RAINLOOP_APP_PATH.'libraries/');
|
||||
\define('RAINLOOP_MB_SUPPORTED', \function_exists('mb_strtoupper'));
|
||||
|
||||
\define('RAINLOOP_INCLUDE_AS_API_DEF', isset($_ENV['RAINLOOP_INCLUDE_AS_API']) && $_ENV['RAINLOOP_INCLUDE_AS_API']);
|
||||
|
||||
if (!defined('RL_BACKWARD_CAPABILITY'))
|
||||
{
|
||||
\define('RL_BACKWARD_CAPABILITY', true);
|
||||
|
|
@ -23,23 +25,26 @@ if (!\defined('RAINLOOP_APP_LIBRARIES_PATH'))
|
|||
{
|
||||
return include RAINLOOP_APP_PATH.'src/RainLoop/'.\str_replace('\\', '/', \substr($sClassName, 9)).'.php';
|
||||
}
|
||||
else if (0 === \strpos($sClassName, 'Facebook') && false !== \strpos($sClassName, '\\'))
|
||||
else if (!RAINLOOP_INCLUDE_AS_API_DEF)
|
||||
{
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'Facebook/'.\str_replace('\\', '/', \substr($sClassName, 9)).'.php';
|
||||
}
|
||||
else if (0 === \strpos($sClassName, 'GuzzleHttp') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'GuzzleHttp/'.\str_replace('\\', '/', \substr($sClassName, 11)).'.php';
|
||||
}
|
||||
else if (0 === \strpos($sClassName, 'Sabre') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
if (!RAINLOOP_MB_SUPPORTED && !defined('RL_MB_FIXED'))
|
||||
if (0 === \strpos($sClassName, 'Facebook') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
\define('RL_MB_FIXED', true);
|
||||
include_once RAINLOOP_APP_PATH.'src/RainLoop/Common/MbStringFix.php';
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'Facebook/'.\str_replace('\\', '/', \substr($sClassName, 9)).'.php';
|
||||
}
|
||||
else if (0 === \strpos($sClassName, 'GuzzleHttp') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'GuzzleHttp/'.\str_replace('\\', '/', \substr($sClassName, 11)).'.php';
|
||||
}
|
||||
else if (0 === \strpos($sClassName, 'Sabre') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
if (!RAINLOOP_MB_SUPPORTED && !defined('RL_MB_FIXED'))
|
||||
{
|
||||
\define('RL_MB_FIXED', true);
|
||||
include_once RAINLOOP_APP_PATH.'src/RainLoop/Common/MbStringFix.php';
|
||||
}
|
||||
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'Sabre/'.\str_replace('\\', '/', \substr($sClassName, 6)).'.php';
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'Sabre/'.\str_replace('\\', '/', \substr($sClassName, 6)).'.php';
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -57,16 +62,23 @@ if (\class_exists('RainLoop\Service'))
|
|||
|
||||
if (\class_exists('MailSo\Version'))
|
||||
{
|
||||
if (isset($_ENV['RAINLOOP_INCLUDE_AS_API']) && $_ENV['RAINLOOP_INCLUDE_AS_API'] && !\defined('APP_API_STARTED'))
|
||||
if (RAINLOOP_INCLUDE_AS_API_DEF)
|
||||
{
|
||||
\define('APP_API_STARTED', true);
|
||||
\RainLoop\Api::Handle();
|
||||
if (!\defined('APP_API_STARTED'))
|
||||
{
|
||||
\define('APP_API_STARTED', true);
|
||||
|
||||
\RainLoop\Api::Handle();
|
||||
}
|
||||
}
|
||||
else if (!\defined('APP_STARTED'))
|
||||
{
|
||||
\define('APP_STARTED', true);
|
||||
|
||||
\RainLoop\Api::Handle();
|
||||
\RainLoop\Service::Handle();
|
||||
|
||||
\RainLoop\Api::ExitOnEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue