Skip to content

Commit

Permalink
#2293 검색엔진 수집이 불필요한 페이지에 대한 robots 메타 태그 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bnu committed Aug 31, 2018
1 parent 4690c85 commit 8fd391f
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 62 deletions.
16 changes: 16 additions & 0 deletions classes/module/ModuleHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,14 @@ function procModule()
// 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';
Expand Down Expand Up @@ -597,6 +604,7 @@ function procModule()
$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
Expand Down Expand Up @@ -624,6 +632,10 @@ function procModule()
$tpl_path = $oModule->getTemplatePath();
$orig_module = $oModule;

if($forward->meta_noindex === 'true') {
Context::addMetaTag('robots', 'noindex');
}

$xml_info = $oModuleModel->getModuleActionXml($forward->module);

// check CSRF for non-GET actions
Expand Down Expand Up @@ -838,6 +850,10 @@ function procModule()
}
}

if ($kind === 'admin') {
Context::addMetaTag('robots', 'noindex');
}

// if failed message exists in session, set context
$this->_setInputErrorToContext();

Expand Down
16 changes: 8 additions & 8 deletions modules/board/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@
<action name="dispBoardContentFileList" type="view" />

<action name="dispBoardTagList" type="view" />
<action name="dispBoardWrite" type="view" standalone="false" />
<action name="dispBoardDelete" type="view" standalone="false" />
<action name="dispBoardWriteComment" type="view" standalone="false" />
<action name="dispBoardReplyComment" type="view" standalone="false" />
<action name="dispBoardModifyComment" type="view" standalone="false" />
<action name="dispBoardDeleteComment" type="view" standalone="false" />
<action name="dispBoardDeleteTrackback" type="view" standalone="false" />
<action name="dispBoardMessage" type="view" />
<action name="dispBoardWrite" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardDelete" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardWriteComment" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardReplyComment" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardModifyComment" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardDeleteComment" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardDeleteTrackback" type="view" standalone="false" meta-noindex="true" />
<action name="dispBoardMessage" type="view" meta-noindex="true" />

<action name="procBoardInsertDocument" type="controller" ruleset="insertDocument" standalone="false" />
<action name="procBoardDeleteDocument" type="controller" standalone="false" />
Expand Down
16 changes: 8 additions & 8 deletions modules/communication/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
<permission action="procCommunicationDeleteFriendGroup" target="member" />
</permissions>
<actions>
<action name="dispCommunicationMessages" type="view" standalone="true" />
<action name="dispCommunicationSendMessage" type="view" standalone="true" />
<action name="dispCommunicationNewMessage" type="view" standalone="true" />

<action name="dispCommunicationFriend" type="view" standalone="true" />
<action name="dispCommunicationAddFriend" type="view" standalone="true" />
<action name="dispCommunicationAddFriendGroup" type="view" standalone="true" />
<action name="dispCommunicationMessageBoxList" type="mobile" standalone="true" />
<action name="dispCommunicationMessages" type="view" standalone="true" meta-noindex="true" />
<action name="dispCommunicationSendMessage" type="view" standalone="true" meta-noindex="true" />
<action name="dispCommunicationNewMessage" type="view" standalone="true" meta-noindex="true" />

<action name="dispCommunicationFriend" type="view" standalone="true" meta-noindex="true" />
<action name="dispCommunicationAddFriend" type="view" standalone="true" meta-noindex="true" />
<action name="dispCommunicationAddFriendGroup" type="view" standalone="true" meta-noindex="true" />
<action name="dispCommunicationMessageBoxList" type="mobile" standalone="true" meta-noindex="true" />

<action name="procCommunicationUpdateAllowMessage" type="controller" standalone="true" />
<action name="procCommunicationSendMessage" type="controller" ruleset="sendMessage" standalone="true" />
Expand Down
8 changes: 4 additions & 4 deletions modules/document/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
<permission action="procDocumentAdminDeleteExtraVar" target="manager" />
</permissions>
<actions>
<action name="dispDocumentPrint" type="view" />
<action name="dispDocumentPreview" type="view" />
<action name="dispTempSavedList" type="view" />
<action name="dispDocumentPrint" type="view" meta-noindex="true" />
<action name="dispDocumentPreview" type="view" meta-noindex="true" />
<action name="dispTempSavedList" type="view" meta-noindex="true" />

<action name="procDocumentVoteUp" type="controller" />
<action name="procDocumentVoteDown" type="controller" />
<action name="procDocumentDeclare" type="controller" />

<action name="procDocumentAddCart" type="controller" />
<action name="dispDocumentManageDocument" type="view" />
<action name="dispDocumentManageDocument" type="view" meta-noindex="true" />
<action name="procDocumentManageCheckedDocument" type="controller" />

<action name="getDocumentMenu" type="model" />
Expand Down
12 changes: 7 additions & 5 deletions modules/editor/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<grants />
<permissions />
<actions>
<action name="dispEditorPopup" type="view" />
<action name="dispEditorComponentInfo" type="view" />
<action name="dispEditorPopup" type="view" meta-noindex="true" />
<action name="dispEditorComponentInfo" type="view" meta-noindex="true" />
<action name="dispEditorConfigPreview" type="view" meta-noindex="true" />
<action name="dispEditorPreview" type="view" meta-noindex="true" />
<action name="dispEditorSkinColorset" type="view" meta-noindex="true" />

<action name="dispEditorAdminIndex" type="view" menu_name="editor" menu_index="true" admin_index="true" />
<action name="dispEditorAdminSetupComponent" type="view" menu_name="editor" />
<action name="dispEditorAdminSkinColorset" type="view" />
<action name="dispEditorConfigPreview" type="view" />
<action name="dispEditorPreview" type="view" />
<action name="dispEditorSkinColorset" type="view" />

<action name="procEditorSaveDoc" type="controller" />
<action name="procEditorRemoveSavedDoc" type="controller" />
<action name="procEditorCall" type="controller" />
Expand Down
15 changes: 8 additions & 7 deletions modules/install/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
<grants />
<permissions />
<actions>
<action name="dispInstallIntroduce" type="view" index="true" />
<action name="dispInstallLicenseAgreement" type="view" />
<action name="dispInstallCheckEnv" type="view" />
<action name="dispInstallSelectDB" type="view" />
<action name="dispInstallDBForm" type="view" />
<action name="dispInstallConfigForm" type="view" />
<action name="dispInstallManagerForm" type="view" />
<action name="dispInstallIntroduce" type="view" meta-noindex="true" index="true" />
<action name="dispInstallLicenseAgreement" type="view" meta-noindex="true" />
<action name="dispInstallCheckEnv" type="view" meta-noindex="true" />
<action name="dispInstallSelectDB" type="view" meta-noindex="true" />
<action name="dispInstallDBForm" type="view" meta-noindex="true" />
<action name="dispInstallConfigForm" type="view" meta-noindex="true" />
<action name="dispInstallManagerForm" type="view" meta-noindex="true" />

<action name="procCubridDBSetting" type="controller" ruleset="cubrid" />
<action name="procFirebirdDBSetting" type="controller" ruleset="firebird" />
<action name="procMssqlDBSetting" type="controller" ruleset="mssql" />
Expand Down
2 changes: 1 addition & 1 deletion modules/integration_search/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<grants />
<permissions />
<actions>
<action name="IS" type="view" />
<action name="IS" type="view" meta-noindex="true" />
<action name="dispIntegration_searchAdminContent" type="view" admin_index="true" />
<action name="dispIntegration_searchAdminGrantInfo" type="view" />
<action name="dispIntegration_searchAdminSkinInfo" type="view" />
Expand Down
2 changes: 1 addition & 1 deletion modules/krzip/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<actions>
<action name="dispKrzipAdminConfig" type="view" menu_name="krzip" menu_index="true" admin_index="true" />
<action name="procKrzipAdminInsertConfig" type="controller" ruleset="krzipConfig" />
<action name="dispKrzipSearchForm" type="view" />
<action name="dispKrzipSearchForm" type="view" meta-noindex="true" />
<action name="getKrzipCodeList" type="model" />
</actions>
<menus>
Expand Down
6 changes: 3 additions & 3 deletions modules/layout/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<permission action="getLayoutInstanceListForJSONP" target="manager" />
</permissions>
<actions>
<action name="dispLayoutInfo" type="view" />
<action name="dispLayoutPreview" type="view" />
<action name="dispLayoutPreviewWithModule" type="view" />
<action name="dispLayoutInfo" type="view" meta-noindex="true" />
<action name="dispLayoutPreview" type="view" meta-noindex="true" />
<action name="dispLayoutPreviewWithModule" type="view" meta-noindex="true" />
<action name="getLayoutInstanceListForJSONP" type="model" />

<!-- admin -->
Expand Down
32 changes: 16 additions & 16 deletions modules/member/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@
<permission action="dispMemberSpammer" target="manager" />
</permissions>
<actions>
<action name="dispMemberInfo" type="view" standalone="true" />
<action name="dispMemberSignUpForm" type="view" standalone="true" />
<action name="dispMemberModifyEmailAddress" type="view" standalone="true" />
<action name="dispMemberModifyInfo" type="view" standalone="true" />
<action name="dispMemberModifyPassword" type="view" standalone="true" />
<action name="dispMemberLoginForm" type="view" standalone="true" />
<action name="dispMemberLogout" type="view" standalone="true" />
<action name="dispMemberLeave" type="view" standalone="true" />
<action name="dispMemberOwnDocument" type="view" standalone="true" />
<action name="dispMemberScrappedDocument" type="view" standalone="true" />
<action name="dispMemberSavedDocument" type="view" standalone="true" />
<action name="dispMemberFindAccount" type="view" standalone="true" />
<action name="dispMemberGetTempPassword" type="view" standalone="true" />
<action name="dispMemberResendAuthMail" type="view" standalone="true" />
<action name="dispSavedDocumentList" type="view" standalone="true" />
<action name="dispMemberInfo" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberSignUpForm" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberModifyEmailAddress" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberModifyInfo" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberModifyPassword" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberLoginForm" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberLogout" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberLeave" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberOwnDocument" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberScrappedDocument" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberSavedDocument" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberFindAccount" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberGetTempPassword" type="view" standalone="true" meta-noindex="true" />
<action name="dispMemberResendAuthMail" type="view" standalone="true" meta-noindex="true" />
<action name="dispSavedDocumentList" type="view" standalone="true" meta-noindex="true" />
<action name="getMemberMenu" type="model" standalone="true" />

<action name="dispMemberSpammer" type="view" standalone="true" />
<action name="dispMemberSpammer" type="view" standalone="true" meta-noindex="true" />
<action name="getApiGroups" type="model" standalone="true" />

<action name="procMemberLogin" type="controller" ruleset="@login" standalone="true" />
Expand Down
2 changes: 1 addition & 1 deletion modules/message/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<grants />
<permissions />
<actions>
<action name="dispMessage" type="view" index="true" />
<action name="dispMessage" type="view" index="true" meta-noindex="true" />

<!-- admin -->
<action name="dispMessageAdminConfig" type="view" admin_index="true" />
Expand Down
8 changes: 4 additions & 4 deletions modules/module/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<permission action="procModuleAdminUpdateSkinInfo" target="manager" />
</permissions>
<actions>
<action name="dispModuleSelectList" type="view" />
<action name="dispModuleSkinInfo" type="view" />
<action name="dispModuleSelectList" type="view" meta-noindex="true" />
<action name="dispModuleSkinInfo" type="view" meta-noindex="true" />

<action name="dispModuleFileBox" type="view" />
<action name="dispModuleFileBoxAdd" type="view" />
<action name="dispModuleFileBox" type="view" meta-noindex="true" />
<action name="dispModuleFileBoxAdd" type="view" meta-noindex="true" />

<action name="procModuleFileBoxAdd" type="controller" />
<action name="procModuleFileBoxAdd" type="controller" />
Expand Down
3 changes: 3 additions & 0 deletions modules/module/module.model.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ function getModuleActionXml($module)
$ruleset = $action->attrs->ruleset?$action->attrs->ruleset:'';
$method = $action->attrs->method?$action->attrs->method:'';
$check_csrf = $action->attrs->check_csrf=='false'?'false':'true';
$meta_noindex = $action->attrs->{'meta-noindex'} === 'true' ? 'true' : 'false';

$index = $action->attrs->index;
$admin_index = $action->attrs->admin_index;
Expand All @@ -949,6 +950,7 @@ function getModuleActionXml($module)
$info->action->{$name}->ruleset = $ruleset;
$info->action->{$name}->method = $method;
$info->action->{$name}->check_csrf = $check_csrf;
$info->action->{$name}->meta_noindex = $meta_noindex;
if($action->attrs->menu_name)
{
if($menu_index == 'true')
Expand All @@ -973,6 +975,7 @@ function getModuleActionXml($module)
$buff[] = sprintf('$info->action->%s->ruleset=\'%s\';', $name, $ruleset);
$buff[] = sprintf('$info->action->%s->method=\'%s\';', $name, $method);
$buff[] = sprintf('$info->action->%s->check_csrf=\'%s\';', $name, $check_csrf);
$buff[] = sprintf('$info->action->%s->meta_noindex=\'%s\';', $name, $meta_noindex);

if($index=='true')
{
Expand Down
8 changes: 4 additions & 4 deletions modules/widget/conf/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<permission action="procWidgetStyleExtraImageUpload" target="manager" />
</permissions>
<actions>
<action name="dispWidgetInfo" type="view" />
<action name="dispWidgetGenerateCode" type="view" />
<action name="dispWidgetGenerateCodeInPage" type="view" />
<action name="dispWidgetStyleGenerateCodeInPage" type="view" />
<action name="dispWidgetInfo" type="view" meta-noindex="true" />
<action name="dispWidgetGenerateCode" type="view" meta-noindex="true" />
<action name="dispWidgetGenerateCodeInPage" type="view" meta-noindex="true" />
<action name="dispWidgetStyleGenerateCodeInPage" type="view" meta-noindex="true" />
<action name="procWidgetGenerateCode" type="controller" />
<action name="procWidgetStyleGenerateCodeInPage" type="controller" />
<action name="procWidgetInsertDocument" type="controller" />
Expand Down

0 comments on commit 8fd391f

Please sign in to comment.