summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/js/config.php1
-rw-r--r--core/js/js.js6
2 files changed, 6 insertions, 1 deletions
diff --git a/core/js/config.php b/core/js/config.php
index 953bd2ede45..463e334ef26 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -141,6 +141,7 @@ $array = array(
'version' => implode('.', OC_Util::getVersion()),
'versionstring' => OC_Util::getVersionString(),
'enable_avatars' => \OC::$server->getConfig()->getSystemValue('enable_avatars', true),
+ 'modRewriteWorking' => (getenv('front_controller_active') === 'true'),
)
),
"oc_appconfig" => json_encode(
diff --git a/core/js/js.js b/core/js/js.js
index ce552bb8ea2..cbdffd0f016 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -160,7 +160,11 @@ var OC={
url = '/' + url;
}
- // TODO save somewhere whether the webserver is able to skip the index.php to have shorter links (e.g. for sharing)
+
+ if(oc_config.modRewriteWorking == true) {
+ return OC.webroot + _build(url, params);
+ }
+
return OC.webroot + '/index.php' + _build(url, params);
},