[TYPO3-core] RFC #10011: New feature: TypoScript Condition to check for installed extensions
Franz Holzinger
franz at ttproducts.de
Mon Nov 1 13:23:28 CET 2010
Hello Steffen,
> why don't you use version_compare? There is all built in so you don't
> need to do that all manually.
> http://de2.php.net/manual/en/function.version-compare.php
The function getVersionDifference contains a parameter $tolerance.
static public function getVersionDifference($version1, $version2,
$comparator = '', $tolerance = 1)
The PHP function version_compare does not have a tolerance.
If you compare version 2.5.3 with $tolerance 1000 to the second version
2.5.9, then it will be equal. In many cases you would like to check only
for TYPO3 4.3, and not for 4.3.1, 4.3.2 and 4.3.99.
But maybe the $tolerance can be achieved by reducing the TYPO3 version
number into only 2 numbers with a dot.
> and you should mention that you copied the parts from EM. So it's kind
> of double code which shouldn't be. i'm fine with having these static
> functions in t3lib_extMgm, but i also prepared thse moves in the new EM
> which i try to present until feature freeze.
> Have a look to the already static functions:
>
>
> http://forge.typo3.org/projects/typo3v4-em/repository/entry/trunk/classes/tools/class.em_staticfunctions.php
Where is the correct place for new functions of the EM?
Will the file class.t3lib_extmgm.php be removed in the future?
- Franz
More information about the TYPO3-team-core
mailing list