/** * Onject initialization */ protected function setPopularity($popularity) { // If module is disabled if ((bool) Mage::getStoreConfig('disablelog/settings/enabled') == false) { return parent::setPopularity($popularity); } // Disable search-hitting for user-agents $userAgent = Mage::helper('core/http')->getHttpUserAgent(); $ignoreAgents = Mage::getConfig()->getNode('global/skip_user_agents'); if ($ignoreAgents) { $ignoreAgents = $ignoreAgents->asArray(); foreach ($ignoreAgents as $ignoreAgent) { if (stristr($userAgent, $ignoreAgent)) { return false; } } } return parent::setPopularity($popularity); }