The V2.1 Plugin and probably earlier versions has a problem checking Versions in the sequence 1.8, 1.9, 1.10, 1.11, etc.
On line 49 the version < versionStore test considers Version 1.10 to be older than 1.8 and asks to download 1.8 over 1.10.
It seems that the two components of the version should be kept separate, or the version numbers must be syntax checked so 1.9 must be followed by 2.0 and 1.10 must be banned.
* Check Installed Plugins Against The Store problem
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Check Installed Plugins Against The Store problem
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Check Installed Plugins Against The Store problem
I don't think there were any two part numbers with 2 digits after the ., I'll change the code to cope.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 27076
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Check Installed Plugins Against The Store problem
You are correct, the 2 digit version "1.10" was in my Plugins.
This should cope with many forms of version number providing they are repetitions of digits separated by dots.
then in main function
which explicitly reports the old and new versions.
This should cope with many forms of version number providing they are repetitions of digits separated by dots.
Code: Select all
function IntVersion(strVersion)
local intVersion = 0
local tblVersion = strVersion:split(".")
for i=1,5 do
intVersion = intVersion * 1000 + tonumber(tblVersion[i] or 0)
end
-- print(strVersion," > ",intVersion)
return intVersion
end -- function IntVersion
Code: Select all
if versionStore ~= nil and IntVersion(version) < IntVersion(versionStore) then
local res = fhMessageBox('Newer version of '..name:gsub('%.fh_lua','')..' found, would you like to upgrade from '..version..' to '..versionStore,'MB_YESNO','MB_ICONQUESTION')
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8440
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Check Installed Plugins Against The Store problem
I have already fixed the plugin, something very similar, I will double check it in the morning and then post it up.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."