function determineHandle($filename) { require_once JPATH_RSGALLERY2_ADMIN . '/includes/audio.utils.php'; require_once JPATH_RSGALLERY2_ADMIN . '/includes/video.utils.php'; $ext = strtolower(JFile::getExt($filename)); if (in_array($ext, imgUtils::allowedFileTypes())) { return 'imgUtils'; } else { if (in_array($ext, videoUtils::allowedFileTypes())) { return 'videoUtils'; } else { if (in_array($ext, audioUtils::allowedFileTypes())) { return 'audioUtils'; } else { return false; } } } }