diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-03-27 16:24:05 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-03-27 16:24:05 +0100 |
commit | 5b71b7e4a3a99581be63907e9758a236726c6a74 (patch) | |
tree | 87d2fdcf3f564f2e9d9431746807b378002c297b | |
parent | ba468fedd61f36c842531129977590d86a763c20 (diff) | |
download | etherpad-5b71b7e4a3a99581be63907e9758a236726c6a74.tar.gz etherpad-5b71b7e4a3a99581be63907e9758a236726c6a74.tar.xz etherpad-5b71b7e4a3a99581be63907e9758a236726c6a74.zip |
Made handlePaths from plugins override paths from main
Diffstat (limited to '')
-rw-r--r-- | etherpad/src/main.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/etherpad/src/main.js b/etherpad/src/main.js index 8b08abb..745f5fa 100644 --- a/etherpad/src/main.js +++ b/etherpad/src/main.js @@ -364,19 +364,20 @@ function handlePath() { // these paths are handled identically on all sites/subdomains. var commonDispatcher = new Dispatcher(); - 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)] - ].concat(plugins.callHook('handlePath'))); + 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)] + ])); var etherpadDotComDispatcher = new Dispatcher(); etherpadDotComDispatcher.addLocations([ |