ownCloud integration improvements

This commit is contained in:
RainLoop Team 2015-02-12 04:48:11 +04:00
parent c0d016293d
commit d30292d500
9 changed files with 170 additions and 59 deletions

View file

@ -7,6 +7,15 @@ class OC_RainLoop_Helper
*/
public static function getAppUrl()
{
if (class_exists('\\OC\\URLGenerator') && isset(\OC::$server))
{
$oUrlGenerator = new \OC\URLGenerator(\OC::$server->getConfig());
if ($oUrlGenerator)
{
return $oUrlGenerator->linkToRoute('rainloop_app');
}
}
$sRequestUri = empty($_SERVER['REQUEST_URI']) ? '': trim($_SERVER['REQUEST_URI']);
$sRequestUri = preg_replace('/index.php\/.+$/', 'index.php/', $sRequestUri);
$sRequestUri = $sRequestUri.'apps/rainloop/app/';