summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-12-30 12:12:24 +0100
committerJohn McLear <john@mclear.co.uk>2014-12-30 12:12:24 +0100
commita07d1722fc6532d5497bccac63f9196717ebce34 (patch)
tree9cb92a7647247a00fdeda3bfaac6786a22e44ad7 /src/node
parent5ba3cab445e4909275b97fc7414fa56c6c94578d (diff)
downloadetherpad-lite-a07d1722fc6532d5497bccac63f9196717ebce34.zip
no errors on chrome client
Diffstat (limited to 'src/node')
-rw-r--r--src/node/handler/ImportHandler.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js
index 14cc1019..a511637c 100644
--- a/src/node/handler/ImportHandler.js
+++ b/src/node/handler/ImportHandler.js
@@ -247,9 +247,16 @@ exports.doImport = function(req, res, padId)
padManager.getPad(padId, function(err, _pad){
var pad = _pad;
padManager.unloadPad(padId);
- padMessageHandler.updatePadClients(pad, function(){
+
+ // direct Database Access means a pad user should perform a switchToPad
+ // and not attempt to recieve updated pad data..
+ if(!directDatabaseAccess){
+ padMessageHandler.updatePadClients(pad, function(){
+ callback();
+ });
+ }else{
callback();
- });
+ }
});
},
@@ -282,7 +289,7 @@ exports.doImport = function(req, res, padId)
}
ERR(err);
-
+
//close the connection
res.send(
"<head> \
@@ -293,7 +300,7 @@ exports.doImport = function(req, res, padId)
if(navigator.userAgent.indexOf('MSIE') === -1){ \
document.domain = document.domain; \
} \
- var impexp = window.parent.padimpexp.handleFrameCall('" + status + "'); \
+ var impexp = window.parent.padimpexp.handleFrameCall('" + directDatabaseAccess +"', '" + status + "'); \
}) \
</script>"
, 200);