Make version check version independent.

This commit is contained in:
David Molineus
2015-07-22 14:16:53 +02:00
parent 78302fc7fc
commit f8b6563262

View File

@@ -28,13 +28,13 @@ class InsertTagReplacer
*/
public function replace($buffer, $cache = true)
{
if (version_compare(VERSION, '3.5', '<')) {
$frontendApi = new FrontendApi();
return $frontendApi->replaceInsertTags($buffer, $cache);
if (class_exists('InsertTags')) {
$replacer = new \InsertTags();
return $replacer->replace($buffer, $cache);
}
$replacer = new \InsertTags();
return $replacer->replace($buffer, $cache);
$frontendApi = new FrontendApi();
return $frontendApi->replaceInsertTags($buffer, $cache);
}
}