So, this is what we have now:
1. JVersion->BUILD variable is empty string.
2. JVERSION global define is '1.5.0' (and it was the same before Beta 2)
3. JVersion->isCompatible function doesn't allow to distinguish if Joomla! is before or after Beta 2
4.
Joomla! Developer Network says: "The Beta 2 release can be downloaded from JoomlaCode. It is
advisable to use the nightly builds or the latest svn code for testing purposes."
5. If I or my users-testers downloaded "Beta 2", "nightly builds" or "the latest svn code" and we have any problem that needs to be figured out, there is NO good way to find, what version of Joomla! we are using, except to check CHANGELOG.php file.
See the code, that I'm using now for version check:
Code: Select all
$Ok = false;
$versionName = 'Very old (Doesn\'t have JVersion Class)';
jimport('joomla.version');
$version = new JVersion();
if (!$version) {
} else {
$versionName = 'Unknown';
if ($version->BUILD == '$Revision: $') {
$versionName = '1.5 before Beta 2';
} else if ( $version->BUILD == '$Revision: 7357$' ) {
$versionName = '1.5.0 Beta 2';
$Ok = true;
} else {
$Ok = true;
}
}
if (!$Ok) {
echo '<hr><p>Oops! To use <a href="http://yurivolkov.com/Joomla/yvComment/index_en.html" target="_blank">yvComment extension</a>'
. ' you have to install Joomla! 1.5 build 7357 (1.5 Beta 2) or newer. '
. 'Current version of Joomla! core is "' . $versionName . '".<br/>'
. '(yvComment Plugin version="' . yvCommentPluginVersion . '")' . '</p><hr>';
}
Johan, do you consider this situation normal?
Please, Johan, every time packaging Joomla!'s "nightly build", "Beta", etc. , assign JVersion->BULD variable to number, that is equal to the "nightly build number" (or "the latest svn code" if this is applicable...)!
... or I will have to parse CHANGELOG.php
