mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Preseve mid when reading notice-all document from other module
This commit is contained in:
parent
fea468f895
commit
c9230360cc
2 changed files with 8 additions and 3 deletions
|
|
@ -686,10 +686,15 @@ class ModuleHandler extends Handler
|
|||
if($module_info)
|
||||
{
|
||||
// Compare the current mid to the module that the document belongs to.
|
||||
if(!$this->mid || ($this->mid !== $module_info->mid && $module_info->is_notice !== 'A'))
|
||||
if(!$this->mid || $this->mid !== $module_info->mid)
|
||||
{
|
||||
// If the document is notice-all, preserve the current mid.
|
||||
if($module_info->is_notice === 'A')
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// If this is a GET request, redirect to the correct mid.
|
||||
if(Context::getRequestMethod() === 'GET')
|
||||
elseif(Context::getRequestMethod() === 'GET')
|
||||
{
|
||||
Context::setCacheControl(0);
|
||||
header('Location: ' . getNotEncodedUrl('', 'mid', $module_info->mid, 'document_srl', $this->document_srl), true, 301);
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class boardView extends board
|
|||
if($oDocument->isExists())
|
||||
{
|
||||
// if the module srl is not consistent
|
||||
if($oDocument->get('module_srl')!=$this->module_info->module_srl )
|
||||
if($oDocument->get('module_srl') != $this->module_info->module_srl && $oDocument->get('is_notice') !== 'A')
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue