Skip to content

Instantly share code, notes, and snippets.

@pixelbrackets
Created July 2, 2013 09:44
Show Gist options
  • Save pixelbrackets/5908021 to your computer and use it in GitHub Desktop.
Save pixelbrackets/5908021 to your computer and use it in GitHub Desktop.
TYPO3 Version Check for extensions
$version = class_exists('t3lib_utility_VersionNumber')
? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version)
: t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4006000) {
// do stuff for TYPO3 < 4.6
}
// Version Integer = [Major version XX][Minor version XX][Patch versions XXX] - e.g. »4.7.12« = »4007012«
// Read some discussions about the version check in the mailing list: http://typo3.3.n7.nabble.com/Second-Meeting-for-TYPO3-6-2-LTS-Release-td243944.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment