* the interface window.
*
* @author Konstantin Riabitsev <icon at duke.edu>
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
if ( ! is_resource ( $spell_proc ) ) {
// TODO: replace error_box() with sqspell_makeWindow()
error_box ( sprintf(_("Could not run the spellchecker command (%s)."),
- htmlspecialchars($sqspell_command) ) , $color );
- // close html tags and abort script.
- echo "</body></html>";
+ htmlspecialchars($sqspell_command) ) );
+ // display footer (closes html tags) and stop script execution
+ $oTemplate->display('footer.tpl');
exit();
}
if ( ! @fwrite($pipes[0], $sqspell_new_text) ) {
// TODO: replace error_box() with sqspell_makeWindow()
- error_box ( _("Error while writing to pipe.") , $color );
+ error_box ( _("Error while writing to pipe.") );
// close all three $pipes here.
for($i=0; $i<=2; $i++) {
// disable all fclose error messages
@fclose($pipes[$i]);
}
// close html tags and abort script.
- echo "</body></html>";
+ $oTemplate->display('footer.tpl');
exit();
}
fclose($pipes[0]);
$sqspell_output = array();
for($i=1; $i<=2; $i++) {
while(!feof($pipes[$i])) {
- array_push($sqspell_output, rtrim(fgetss($pipes[$i],999),"\n"));
+ array_push($sqspell_output, rtrim(fgetss($pipes[$i],999),"\r\n"));
}
fclose($pipes[$i]);
}
if ( ! is_resource ($fp) ) {
// TODO: replace error_box() with sqspell_makeWindow()
error_box ( sprintf(_("Could not open temporary file '%s'."),
- htmlspecialchars($floc) ) , $color );
+ htmlspecialchars($floc) ) );
// failed to open temp file. abort script.
- echo "</body></html>";
+ $oTemplate->display('footer.tpl');
exit();
}
if ( ! @fwrite($fp, $sqspell_new_text) ) {
// TODO: replace error_box() with sqspell_makeWindow()
error_box ( sprintf(_("Error while writing to temporary file '%s'."),
- htmlspecialchars($floc) ) , $color );
+ htmlspecialchars($floc) ) );
// close file descriptor
fclose($fp);
// failed writing to temp file. abort script.
- echo "</body></html>";
+ $oTemplate->display('footer.tpl');
exit();
}
fclose($fp);
* Check if the execution was successful. Bail out if it wasn't.
*/
if ($sqspell_exitcode){
- $msg= "<div align='center'>"
+ $msg= '<div style="text-align: center;">'
. sprintf(_("I tried to execute '%s', but it returned:"),
$sqspell_command) . "<pre>"
. htmlspecialchars(join("\n", $sqspell_output)) . '</pre>'
<tr>
<td bgcolor="<?php echo $color[9] ?>" align="center">
<b>
- <?php printf( ngettext(_("Found %d error"),_("Found %d errors"),$errors), $errors ) ?>
+ <?php printf( ngettext("Found %d error","Found %d errors",$errors), $errors ) ?>
</b>
</td>
</tr>
/**
* AREN'T YOU SUCH A KNOW-IT-ALL!
*/
- $msg='<form onsubmit="return false"><div align="center">' .
+ $msg='<form onsubmit="return false"><div style="text-align: center;">' .
'<input type="submit" value=" ' . _("Close") .
' " onclick="self.close()" /></div></form>';
sqspell_makeWindow(null, _("No errors found"), null, $msg);
* End:
* vim: syntax=php et ts=4
*/
-?>
\ No newline at end of file