Skip to content

Commit

Permalink
Compatibility Contao < 3.5
Browse files Browse the repository at this point in the history
Load Javascript not static if Version < 3.5
  • Loading branch information
Christian committed Jan 20, 2017
1 parent 2b575c1 commit dd965c5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion callbacks/Videohandbuch.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ public function compile()
// Kategorie gewählt | Liste alle Videos auf
if($intID)
{
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/contao_academy_client/assets/academy_vimeo.js|static';
if (version_compare(VERSION, '3.5', '<'))
{
// Code für Versionen < 3.5
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/contao_academy_client/assets/academy_vimeo.js';
}
else
{
// Code für Versionen ab 3.5
$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/contao_academy_client/assets/academy_vimeo.js|static';
}

$this->Template = new \BackendTemplate('be_contao_academy_details');
$arrResponse = @AcademyRemote::sendRequest(array('action'=>'details','id'=>$intID));
Expand Down

0 comments on commit dd965c5

Please sign in to comment.