Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pierre-alain-b/rainloop-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Alain Bandinelli <pa@bandinelli.net>2022-04-20 17:09:22 +0300
committerPierre-Alain Bandinelli <pa@bandinelli.net>2022-04-20 17:09:22 +0300
commit03cde4abe9221c171aba6dba67714d4cfa00e7df (patch)
tree8b33cff5f92d938d581d6adef0c2c5bd84bc42c4
parentafe07856a65ec73414c1277f6698daa4cbd08d32 (diff)
Fixing #274
-rw-r--r--app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php b/app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php
index 33e87cb..da4242e 100644
--- a/app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php
+++ b/app/rainloop/v/1.16.0/app/libraries/RainLoop/Utils.php
@@ -562,10 +562,10 @@ class Utils
$sAppPath = '';
if (\RainLoop\Utils::IsOwnCloud())
{
- $sAppPath = \OC::$server->getURLGenerator()->linkToRoute('rainloop.page.appGet');
- // TODO: Fix this ugly hack. Is there a "modern" way to return
- // a URL that doesn't include index.php, which breaks things?
- $sAppPath = preg_replace('/index\.php\//', '', $sAppPath);
+ if (\class_exists('OC_App'))
+ {
+ $sAppPath = \rtrim(\trim(\OC_App::getAppWebPath('rainloop')), '\\/').'/app/';
+ }
if (empty($sAppPath))
{
@@ -577,16 +577,7 @@ class Utils
}
}
}
- /*Now trying to detect the apps folder to give the right URL for assets */
- $re = '/\/([a-zA-Z0-9-_\.]*)\/rainloop\/app\//m';
- $str = __FILE__;
- preg_match($re, $str, $matches);
-
- if ($matches[1] == "apps") {
- return $sAppPath;
- } else {
- return str_replace("/apps/rainloop/app", "/".$matches[1]."/rainloop/app", $sAppPath);
- }
+ return $sAppPath;
}
/**