diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 5e564aea0..802a75126 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -155,13 +155,22 @@ class ModuleHandler extends Handler { // If it exists, compare mid based on the module information // if mids are not matching, set it as the document's mid - if(!$this->mid || ($this->mid && $this->mid != $module_info->mid)) + if(!$this->mid || ($this->mid != $module_info->mid)) { - $this->mid = $module_info->mid; - header('location:' . getNotEncodedSiteUrl($site_info->domain, 'mid', $this->mid, 'document_srl', $this->document_srl)); - return FALSE; + + if(Context::getRequestMethod() == 'GET') + { + $this->mid = $module_info->mid; + header('location:' . getNotEncodedSiteUrl($site_info->domain, 'mid', $this->mid, 'document_srl', $this->document_srl)); + return FALSE; + } + else + { + $this->mid = $module_info->mid; + Context::set('mid', $this->mid); + } + } - // if requested module is different from one of the document, remove the module information retrieved based on the document number if($this->module && $module_info->module != $this->module) {