mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
ownCloud new package (with built-in RainLoop Webmail)
Remove VERSION file dependence. Small fixes
This commit is contained in:
parent
169bd45f31
commit
fb18e4e799
145 changed files with 500 additions and 5462 deletions
|
|
@ -1,14 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace RainLoop;
|
||||
|
||||
if (!\defined('RAINLOOP_APP_ROOT_PATH'))
|
||||
if (!\defined('RAINLOOP_APP_LIBRARIES_PATH'))
|
||||
{
|
||||
\define('RAINLOOP_APP_LIBRARIES_PATH', \rtrim(\realpath(__DIR__), '\\/').'/libraries/');
|
||||
\define('RAINLOOP_MB_SUPPORTED', \function_exists('mb_strtoupper'));
|
||||
|
||||
\spl_autoload_register(function ($sClassName) {
|
||||
|
||||
|
||||
if (0 === \strpos($sClassName, 'RainLoop') && false !== \strpos($sClassName, '\\'))
|
||||
{
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'RainLoop/'.\str_replace('\\', '/', \substr($sClassName, 9)).'.php';
|
||||
|
|
@ -20,32 +18,39 @@ if (!\defined('RAINLOOP_APP_ROOT_PATH'))
|
|||
\define('RL_MB_FIXED', true);
|
||||
include_once RAINLOOP_APP_LIBRARIES_PATH.'RainLoop/Common/MbStringFix.php';
|
||||
}
|
||||
|
||||
|
||||
return include RAINLOOP_APP_LIBRARIES_PATH.'Sabre/'.\str_replace('\\', '/', \substr($sClassName, 6)).'.php';
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if (\class_exists('RainLoop\Service'))
|
||||
if (\class_exists('RainLoop\Service'))
|
||||
{
|
||||
$oException = null;
|
||||
if (!\class_exists('MailSo\Version'))
|
||||
{
|
||||
$oException = null;
|
||||
try
|
||||
{
|
||||
include APP_VERSION_ROOT_PATH.'app/libraries/MailSo/MailSo.php';
|
||||
}
|
||||
catch (\Exception $oException) {}
|
||||
}
|
||||
|
||||
if (!$oException)
|
||||
if (!$oException)
|
||||
{
|
||||
if (isset($_ENV['RAINLOOP_INCLUDE_AS_API']) && $_ENV['RAINLOOP_INCLUDE_AS_API'])
|
||||
{
|
||||
if (defined('RAINLOOP_INCLUDE_AS_API') && RAINLOOP_INCLUDE_AS_API)
|
||||
{
|
||||
\RainLoop\Api::Handle();
|
||||
}
|
||||
else
|
||||
{
|
||||
\RainLoop\Service::NewInstance()->Handle();
|
||||
}
|
||||
$_ENV['RAINLOOP_INCLUDE_AS_API'] = false;
|
||||
\RainLoop\Api::Handle();
|
||||
}
|
||||
else if (!\defined('APP_STARTED'))
|
||||
{
|
||||
\define('APP_STARTED', true);
|
||||
\RainLoop\Service::NewInstance()->Handle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
Loading…
Add table
Add a link
Reference in a new issue