| Index: src/plugin/PluginClass.cpp |
| =================================================================== |
| --- a/src/plugin/PluginClass.cpp |
| +++ b/src/plugin/PluginClass.cpp |
| @@ -854,9 +854,13 @@ |
| { |
| return false; |
| } |
| - |
| s_criticalSectionLocal.Lock(); |
| - int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); |
| + std::wstring curVer = CPluginClient::GetInstance()->GetPref(std::wstring(L"currentVersion"), std::wstring(L"0.0")); |
|
sergei
2015/04/22 10:37:09
How does "0.0" affect `versionCompRes`? I'm not th
Oleksandr
2015/04/24 11:50:32
I don't think we should default to current version
|
| + if (curVer.find(L".") == std::wstring::npos) |
|
sergei
2015/04/22 10:37:09
I would live a comment here about "simpleadblock"
|
| + { |
| + CPluginClient::GetInstance()->SetPref(L"convertedFrom", curVer); |
| + } |
| + int versionCompRes = CPluginClient::GetInstance()->CompareVersions(curVer, L"1.2"); |
| bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun(); |
| CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN_VERSION)); |
| @@ -866,7 +870,10 @@ |
| { |
| if (!isFirstRun) |
| { |
| - CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true); |
| + if (!CPluginClient::GetInstance()->GetPref(curVer, false)) |
| + { |
| + CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true); |
| + } |
| } |
| // IE6 can't be accessed from another thread, execute in current thread |