aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/elgglib.php3
-rw-r--r--js/lib/languages.js3
2 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index f4e487426..8bbdf8758 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2163,7 +2163,8 @@ function _elgg_shutdown_hook() {
*/
function js_page_handler($page) {
if (is_array($page) && sizeof($page)) {
- $js = substr($page[0], 0, strpos($page[0], '.'));
+ $js = implode('/', $page);
+ $js = substr($js, 0, strpos($js, '.'));
$return = elgg_view('js/' . $js);
header('Content-type: text/javascript');
diff --git a/js/lib/languages.js b/js/lib/languages.js
index 0ac654508..03ff4b817 100644
--- a/js/lib/languages.js
+++ b/js/lib/languages.js
@@ -25,9 +25,8 @@ elgg.add_translation = function(lang, translations) {
*/
elgg.reload_all_translations = function(language) {
var lang = language || elgg.get_language();
- elgg.getJSON('_css/js.php', {
+ elgg.getJSON('pg/js/languages%252f' + lang + '.js', {
data: {
- 'js': 'languages/' + lang,
'viewtype': 'default',
'lastcache': elgg.config.lastcache
},