Welcome Guest, Not a member yet? Register   Sign In
User_agent.php in sys/libraries doesn’t work with googlebot (sometimes)
#1

[eluser]Unknown[/eluser]
User_agent.php in sys/libraries doesn’t work with the googlebot when it uses the user agent string:

Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

It finds the Mozilla/5.0 first and sets the user agent to browser.

Change the _compile_data() function to:
foreach (array(‘_set_robot’, ‘_set_browser’, ‘_set_mobile’) as $function)

instead of:
foreach (array(‘_set_browser’, ‘_set_robot’, ‘_set_mobile’) as $function)

to fix it.




Theme © iAndrew 2016 - Forum software by © MyBB