•  Phe0n1x
  • 80% (Honored)
  • YAF Lover Topic Starter
Hey all, since 1.9.3.X, Chrome has reported itself as AppleMAC-Safari 5.0. I've got the fix for 1.9.4.X

It turns out .NET itself reports it incorrectly so we must add an if statement.
Project: YAF.Classes.Core
UserPageBase.cs (YAF.Classes.Core.Context.UserPageBase)
function InitUserAndPage()
below line 534 add

if (HttpContext.Current.Request.UserAgent.ToLower().Contains("chrome"))
    browser = "Chrome 2.0";

with surrounding code:

string browser = String.Format( "{0} {1}", HttpContext.Current.Request.Browser.Browser, HttpContext.Current.Request.Browser.Version );
if (HttpContext.Current.Request.UserAgent.ToLower().Contains("chrome"))
    browser = "Chrome 2.0";

bool isSearchEngine = false;

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved