summaryrefslogtreecommitdiffstats
path: root/etherpad/src/main.js
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-04-04 13:31:02 +0200
committerEgil Moeller <egil.moller@freecode.no>2010-04-04 13:31:02 +0200
commit49c31d0d5b028bf7a5c79a23192853e6aa3a43b1 (patch)
tree301b2f21a6adcc0a13435eac065dd89ce93d17c3 /etherpad/src/main.js
parent055d46499218be2902c713fb37ae3a1394484761 (diff)
downloadetherpad-49c31d0d5b028bf7a5c79a23192853e6aa3a43b1.tar.gz
etherpad-49c31d0d5b028bf7a5c79a23192853e6aa3a43b1.tar.bz2
etherpad-49c31d0d5b028bf7a5c79a23192853e6aa3a43b1.zip
Bugfix to handlePath hooks, and to the array concatenation in callHook
Diffstat (limited to 'etherpad/src/main.js')
-rw-r--r--etherpad/src/main.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/etherpad/src/main.js b/etherpad/src/main.js
index 745f5fa..9035f2d 100644
--- a/etherpad/src/main.js
+++ b/etherpad/src/main.js
@@ -364,20 +364,22 @@ function handlePath() {
// these paths are handled identically on all sites/subdomains.
var commonDispatcher = new Dispatcher();
- commonDispatcher.addLocations(
- plugins.callHook('handlePath').concat([
- ['/favicon.ico', forward(static_control)],
- ['/robots.txt', forward(static_control)],
- ['/crossdomain.xml', forward(static_control)],
- [PrefixMatcher('/static/'), forward(static_control)],
- [PrefixMatcher('/ep/genimg/'), genimg.renderPath],
- [PrefixMatcher('/ep/pad/'), forward(pad_control)],
- [PrefixMatcher('/ep/script/'), forward(scriptcontrol)],
- [/^\/([^\/]+)$/, pad_control.render_pad],
- [DirMatcher('/ep/unit-tests/'), forward(testcontrol)],
- [DirMatcher('/ep/pne-manual/'), forward(pne_manual_control)],
- [DirMatcher('/ep/pro-help/'), forward(pro_help_control)]
- ]));
+
+ commonDispatcher.addLocations(plugins.callHook('handlePath'));
+
+ commonDispatcher.addLocations([
+ ['/favicon.ico', forward(static_control)],
+ ['/robots.txt', forward(static_control)],
+ ['/crossdomain.xml', forward(static_control)],
+ [PrefixMatcher('/static/'), forward(static_control)],
+ [PrefixMatcher('/ep/genimg/'), genimg.renderPath],
+ [PrefixMatcher('/ep/pad/'), forward(pad_control)],
+ [PrefixMatcher('/ep/script/'), forward(scriptcontrol)],
+ [/^\/([^\/]+)$/, pad_control.render_pad],
+ [DirMatcher('/ep/unit-tests/'), forward(testcontrol)],
+ [DirMatcher('/ep/pne-manual/'), forward(pne_manual_control)],
+ [DirMatcher('/ep/pro-help/'), forward(pro_help_control)]
+ ]);
var etherpadDotComDispatcher = new Dispatcher();
etherpadDotComDispatcher.addLocations([