mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
검색엔진 수집이 불필요한 페이지에 대한 robots 메타 태그 추가
xpressengine/xe-core#2293 patch by @bnu
This commit is contained in:
parent
cb66b4e5df
commit
71651c0542
14 changed files with 77 additions and 59 deletions
|
|
@ -442,7 +442,13 @@ class ModuleHandler extends Handler
|
|||
// get type, kind
|
||||
$type = $xml_info->action->{$this->act}->type;
|
||||
$ruleset = $xml_info->action->{$this->act}->ruleset;
|
||||
$meta_noindex = $xml_info->action->{$this->act}->meta_noindex;
|
||||
$kind = stripos($this->act, 'admin') !== FALSE ? 'admin' : '';
|
||||
if ($meta_noindex === 'true')
|
||||
{
|
||||
Context::addMetaTag('robots', 'noindex');
|
||||
}
|
||||
|
||||
if(!$kind && $this->module == 'admin')
|
||||
{
|
||||
$kind = 'admin';
|
||||
|
|
@ -559,6 +565,7 @@ class ModuleHandler extends Handler
|
|||
$forward->module = $module;
|
||||
$forward->type = $xml_info->action->{$this->act}->type;
|
||||
$forward->ruleset = $xml_info->action->{$this->act}->ruleset;
|
||||
$forward->meta_noindex = $xml_info->action->{$this->act}->meta_noindex;
|
||||
$forward->act = $this->act;
|
||||
}
|
||||
else
|
||||
|
|
@ -585,6 +592,10 @@ class ModuleHandler extends Handler
|
|||
$ruleset = $forward->ruleset;
|
||||
$tpl_path = $oModule->getTemplatePath();
|
||||
$orig_module = $oModule;
|
||||
if($forward->meta_noindex === 'true')
|
||||
{
|
||||
Context::addMetaTag('robots', 'noindex');
|
||||
}
|
||||
|
||||
$xml_info = $oModuleModel->getModuleActionXml($forward->module);
|
||||
|
||||
|
|
@ -781,6 +792,10 @@ class ModuleHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
if ($kind === 'admin') {
|
||||
Context::addMetaTag('robots', 'noindex');
|
||||
}
|
||||
|
||||
// if failed message exists in session, set context
|
||||
self::_setInputErrorToContext();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue