diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-16 14:49:26 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-16 14:49:26 +0000 |
commit | dfc4422faca855ae167db04bc5c36b56ff188e7c (patch) | |
tree | 5f44ea3f4d5867ce09355f6ee1b7f9ba08534a4a | |
parent | d3bac514d0249abbc1851d53bddcf3d2c0f092b9 (diff) | |
download | elgg-dfc4422faca855ae167db04bc5c36b56ff188e7c.tar.gz elgg-dfc4422faca855ae167db04bc5c36b56ff188e7c.tar.bz2 |
Fixes #2725 - js page handler now handles javascript views with slashes in their names
git-svn-id: http://code.elgg.org/elgg/trunk@7647 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/elgglib.php | 3 | ||||
-rw-r--r-- | js/lib/languages.js | 3 |
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
},
|