Пример #1
0
 /**
  * Routine to check Scriptegrator plugin
  * 
  * @param $version_number
  * @param $library
  * @param $place
  * @return string	Error message if some option is missing.
  */
 function check($version_number = '1.4.0', $library = 'jquery', $place = 'site')
 {
     $message = '';
     // check if Scriptegrator is enabled
     if (class_exists('plgSystemCdScriptegrator')) {
         // check version
         $version = $version_number;
         if (!JScriptegrator::versionRequire($version)) {
             $message = JText::sprintf('CDS_SCRIPTEGRATOR_REQUIREVERSION', $version);
         } else {
             // check place of library
             if (!JScriptegrator::checkLibrary($library, $place)) {
                 $message = JText::_('CDS_MISSING_' . strtoupper($library));
             }
         }
     }
     return $message;
 }