Skip to content

Instantly share code, notes, and snippets.

@mbabker
Created July 8, 2014 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbabker/cfb9577a9fd721ecec1e to your computer and use it in GitHub Desktop.
Save mbabker/cfb9577a9fd721ecec1e to your computer and use it in GitHub Desktop.
You can't make this up...
// Instead of a simple call to JHtml::_('behavior.framework') I have to deal with this...
if (JVERSION >= '1.6.0') {
$file = JUri::root() . '/media/system/js/core.js';
$loaded = false;
foreach ($document->_scripts as $key => $value) {
if ($key == $file) {
$loaded = true;
}
if (!$loaded) {
$document->addScript($file);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment