/** * Display the check results. * * @param JObject $file A file object * * @return void */ public static function displayResults(stdClass $file) { //--Check if file exists if ($file->exists) { echo '<span class="img icon16-check_ok hasTip" title="' . jgettext('Found') . '"/>'; } else { echo '<span class="img icon16-check_fail hasTip" title="' . jgettext('Not found') . '" />'; EcrHtmlButton::createLanguageFile($file->lang, $file->scope); return; } //--Check if file is UTF-8 encoded if ($file->isUFT8) { if ($file->isUFT8 == 'NOT CHECKED') { echo '<span class="img icon16-yellowled hasTip" title="' . jgettext('Not checked for UTF-8') . '" />'; } else { echo '<span class="img icon16-check_ok hasTip" title="' . jgettext('UTF-8') . '" />'; } } else { EcrHtml::message(array(jgettext('File is not UTF-8 encoded'), $file->name), 'error'); } //--Detect BOM if ($file->hasBOM) { if ($file->hasBOM == 'NOT CHECKED') { echo '<span class="img icon16-yellowled hasTip" title="' . jgettext('Not checked for BOM') . '" />'; } else { EcrHtmlButton::removeBOM($file->fileName); } } else { echo '<span class="img icon16-check_ok hasTip" title="' . jgettext('No BOM') . '" />'; } }