mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix #2072 redirect to proper URL if a document with is_notice=A is requested without mid
This commit is contained in:
parent
c6523706f8
commit
87a34af69e
2 changed files with 12 additions and 7 deletions
|
|
@ -733,7 +733,12 @@ class ModuleHandler extends Handler
|
|||
/**
|
||||
* Check the value of $document_srl. This method is called during init().
|
||||
*
|
||||
* @return object|false
|
||||
* This method returns:
|
||||
* - Module info object if the document can be shown in the module,
|
||||
* - null if the document can be shown but the module is unspecified,
|
||||
* - false if we should redirect to another module.
|
||||
*
|
||||
* @return object|null|false
|
||||
*/
|
||||
protected function _checkDocumentSrl()
|
||||
{
|
||||
|
|
@ -745,7 +750,7 @@ class ModuleHandler extends Handler
|
|||
if(!$this->mid || $this->mid !== $module_info->mid)
|
||||
{
|
||||
// If the document is notice-all, preserve the current mid.
|
||||
if($module_info->is_notice === 'A')
|
||||
if($module_info->is_notice === 'A' && !empty($this->mid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue