Add option to block robots in integration search module

This commit is contained in:
Kijin Sung 2022-12-20 03:08:38 +09:00
parent afdc450b00
commit 49e76b4643
5 changed files with 22 additions and 1 deletions

View file

@ -54,8 +54,17 @@ class integration_searchView extends integration_search
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
// Set skin path
// Block robots
$config = $oModuleModel->getModuleConfig('integration_search') ?: new stdClass;
if (!isset($config->block_robots) || $config->block_robots !== false)
{
if (isCrawler())
{
throw new Rhymix\Framework\Exceptions\NotPermitted;
}
}
// Set skin path
if(ends_with('Mobile', get_class($this), false))
{
if(!$config->mskin || $config->mskin === '/USE_RESPONSIVE/')