mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Merge branch 'develop' of github.com:xpressengine/xe-core into develop
This commit is contained in:
commit
c3daf779d7
2 changed files with 28 additions and 18 deletions
|
|
@ -105,6 +105,10 @@ class ModuleHandler extends Handler
|
|||
* */
|
||||
function init()
|
||||
{
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
// if success_return_url and error_return_url is incorrect
|
||||
$urls = array(Context::get('success_return_url'), Context::get('error_return_url'));
|
||||
foreach($urls as $url)
|
||||
|
|
@ -113,23 +117,20 @@ class ModuleHandler extends Handler
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$urlInfo = parse_url($url);
|
||||
$host = $urlInfo['host'];
|
||||
|
||||
|
||||
$dbInfo = Context::getDBInfo();
|
||||
$defaultUrlInfo = parse_url($dbInfo->default_url);
|
||||
$defaultHost = $defaultUrlInfo['host'];
|
||||
|
||||
if($host && $host != $defaultHost)
|
||||
|
||||
if($host && ($host != $defaultHost && $host != $site_module_info->domain))
|
||||
{
|
||||
throw new Exception('msg_default_url_is_null');
|
||||
}
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
if(!$this->document_srl && $this->mid && $this->entry)
|
||||
{
|
||||
$oDocumentModel = getModel('document');
|
||||
|
|
@ -154,11 +155,9 @@ 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 != $module_info->mid) || ($this->module_srl && $this->module_srl != $module_info->module_srl))
|
||||
if(!$this->mid || ($this->mid && $this->mid != $module_info->mid) || ($this->module_srl && $this->module_srl != $module_info->module_srl))
|
||||
{
|
||||
$this->mid = $module_info->mid;
|
||||
$this->module_srl = $module_info->module_srl;
|
||||
Context::set('mid', $module_info->mid, TRUE);
|
||||
header('location:' . getNotEncodedSiteUrl($site_info->domain, 'mid', $this->mid, 'document_srl', $this->document_srl, 'module_srl',''));
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -276,7 +275,7 @@ class ModuleHandler extends Handler
|
|||
{
|
||||
Context::set('mid', $this->mid, TRUE);
|
||||
}
|
||||
|
||||
|
||||
// Call a trigger after moduleHandler init
|
||||
$output = ModuleHandler::triggerCall('moduleHandler.init', 'after', $this->module_info);
|
||||
if(!$output->toBool())
|
||||
|
|
|
|||
|
|
@ -47,16 +47,27 @@ class boardView extends board
|
|||
}
|
||||
|
||||
// use_category <=1.5.x, hide_category >=1.7.x
|
||||
$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
|
||||
if($count_category && ($this->module_info->hide_category != 'Y' || $this->module_info->use_category != 'N'))
|
||||
$count_category = count($oDocumentModel->getCategoryList($module_srl));
|
||||
if($count_category)
|
||||
{
|
||||
$this->module_info->hide_category = 'N';
|
||||
$this->module_info->use_category = 'Y';
|
||||
if($config->hide_category)
|
||||
{
|
||||
$config->use_category = ($config->hide_category == 'Y') ? 'N' : 'Y';
|
||||
}
|
||||
else if($config->use_category)
|
||||
{
|
||||
$config->hide_category = ($config->use_category == 'Y') ? 'N' : 'Y';
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->hide_category = 'N';
|
||||
$config->use_category = 'Y';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->module_info->hide_category = 'Y';
|
||||
$this->module_info->use_category = 'N';
|
||||
$config->hide_category = 'Y';
|
||||
$config->use_category = 'N';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -403,7 +414,7 @@ class boardView extends board
|
|||
|
||||
// set the current page of documents
|
||||
$document_srl = Context::get('document_srl');
|
||||
if(!$args->page && ($document_srl))
|
||||
if(!$args->page && $document_srl)
|
||||
{
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if($oDocument->isExists() && !$oDocument->isNotice())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue