From 8ff7ba82c2bab96f72c78d09633f1cc268641ca3 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 10 Jun 2015 15:56:43 -0400 Subject: [PATCH] closes #3192 --- public/src/modules/composer.js | 3 ++- src/controllers/index.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/src/modules/composer.js b/public/src/modules/composer.js index fa811d4fb0..dcf34984b6 100644 --- a/public/src/modules/composer.js +++ b/public/src/modules/composer.js @@ -312,7 +312,8 @@ define('composer', [ }; if (data.mobile) { - ajaxify.go('compose', function() { + var qs = '?p=' + window.location.pathname.substring(1); + ajaxify.go('compose' + qs, function() { renderComposer(); }); } else { diff --git a/src/controllers/index.js b/src/controllers/index.js index 7adcf8d3ca..15bc21db9b 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -129,6 +129,10 @@ Controllers.register = function(req, res, next) { }; Controllers.compose = function(req, res, next) { + if (req.query.p && !res.locals.isAPI) { + return helpers.redirect(res, '/' + req.query.p); + } + res.render('composer', {}); };