SMF Development > Fixed or Bogus Bugs
2.0 RC5 Function matchPackageVersion(): only allows one interval
davidhs:
--- Quote from: Arantor on February 10, 2011, 08:16:25 AM ---Yes, I realise that. But 3.0 RC2 and 3.0RC4 are not the same, and no amount of trim() will fix it. So, please, do me a favour and retest as I asked you, using the same spacing in the middle of the string. Since I suspect that's possibly contributing to your bug...
--- End quote ---
Now matchPackageVersion() only use trim() between version. i.e. in this string (s = spaces)
s2.0sRC1s,s2.0sRC2s-s2.0sRC4s
remove spaces
2.0sRC1,2.0sRC2-2.0sRC4
but
2.0sRC1
2.0sRC2
2.0sRC4
are correct name of versions (these name are in file DIR_FORUM/index.php , line 36
--- Code: ---$forum_version = 'SMF 2.0 RC4';
--- End code ---
and $forum_version, without 'SMF ', is used for compare with string of versions in matchPackageVersion).
In my opinion 2.0RC4 (without space) or 2.0ssRC4 (with more than one space) are not correct name of version, but... could be improved to allow this. But it is not a bug.
davidhs:
--- Quote from: davidhs on February 10, 2011, 08:44:00 AM ---... could be improved to allow this.
--- End quote ---
This would be change line 1443 of same file
--- Code: ---function matchPackageVersion($version, $versions)
{
--- End code ---
by
--- Code: ---function matchPackageVersion($version, $versions)
{
$version = strtr($version, array(' ' => ''));
$versions = strtr($versions, array(' ' => ''));
--- End code ---
Arantor:
--- Quote ---In my opinion 2.0RC4 (without space) or 2.0ssRC4 (with more than one space) are not correct name of version, but... could be improved to allow this. But it is not a bug.
--- End quote ---
Yes, but that's what your code had that was causing a failure. If you change it to what I suggested, does it work properly?
davidhs:
--- Quote from: Arantor on February 10, 2011, 09:03:01 AM ---Yes, but that's what your code had that was causing a failure.
--- End quote ---
I am sorry, I have seen that in my first post I wrote "3.0RC4" x instead of "3.0 RC4". It is a typo, I correct it now.
But if allowed "2. 0. 0" (correct name is "2.0.0" why not "2.0RC4" ? Perhaps would be part of this bug. I will see how re-write code of function.
Arantor:
--- Quote ---Perhaps would be part of this bug.
--- End quote ---
In fact, now that I think about it, you're not supposed to use - on RCs, it's designed for numeric comparison only, i.e. 1.1.1-1.1.10 and anything textual is about as useful as asking it to compare on apple-orange as a range...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version