ownCloud new package (with built-in RainLoop Webmail)

Remove VERSION file dependence.
Small fixes
This commit is contained in:
RainLoop Team 2014-05-30 05:42:22 +04:00
parent 169bd45f31
commit fb18e4e799
145 changed files with 500 additions and 5462 deletions

View file

@ -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 '';