Code: Select all
function mootools($debug = null)
{
global $mainframe;
static $loaded;
$administrator = JFactory::getApplication('administrator');
// Only load once
if ($loaded) {
return;
}
// If no debugging value is set, use the configuration setting
if ($debug === null) {
$config = &JFactory::getConfig();
$debug = $config->getValue('config.debug');
}
// TODO NOTE: Here we are checking for Konqueror - If they fix thier issue with compressed, we will need to update this
$konkcheck = strpos (strtolower($_SERVER['HTTP_USER_AGENT']), "konqueror");
if ($debug || $konkcheck) {
JHTML::script('mootools-uncompressed.js', 'media/system/js/', false);
} else {
// interface is for the front end show 1.2b
if($mainframe->isSite())
{
JHTML::script('mootools2.js', 'media/system/js/', false);
//Otherwise, use the stable 1.11
}else{
JHTML::script('mootools.js', 'media/system/js/', false);
}
}
$loaded = true;
return;
}