Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * determines if we should turn off turbo mode
- *
- * @return bool
- */
- protected function _robotnikWins()
- {
- if ($this->getRequest()->isAjax() || isset($_COOKIE['noturbo']) || isset($_COOKIE['bot'])) {
- return true;
- }
- if (isset($_GET['noturbo'])) {
- setcookie('noturbo', true, time() + 86400);
- return true;
- }
- if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false) {
- setcookie('bot', true, time() + 86400);
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement