Remove attempts to translate early error messages.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
Andrew McMillan 2011-01-05 21:42:49 +13:00
parent b2afb747da
commit f30c0b84c9

View File

@ -1,8 +1,6 @@
<?php
/** @TODO: work out something more than true/false returns for dependency checks */
function i18n($s) { return $s; };
class CheckResult {
private $ok;
private $use_class;
@ -84,17 +82,20 @@ function check_magic_quotes_runtime() {
return new CheckResult( (get_magic_quotes_runtime() == 0) );
}
$loaded_extensions = array_flip(get_loaded_extensions());
function do_error( $errormessage ) {
// We can't translate this because we're testing these things even before
// the translation interface is available...
printf("<p class='error'>%s</p>", $errormessage );
}
$loaded_extensions = array_flip(get_loaded_extensions());
if ( !check_pgsql()->getOK() ) do_error(i18n("PHP 'pgsql' functions are not available") );
if ( !check_pdo()->getOK() ) do_error(i18n("PHP 'PDO' module is not available") );
if ( !check_pdo_pgsql()->getOK() ) do_error(i18n("The PDO drivers for PostgreSQL are not available") );
if ( !check_iconv()->getOK() ) do_error(i18n("The 'iconv' extension for PHP is not available") );
if ( !check_gettext()->getOK() ) { do_error("The GNU 'gettext' extension for PHP is not available.");
if ( !check_pgsql()->getOK() ) do_error("PHP 'pgsql' functions are not available");
if ( !check_pdo()->getOK() ) do_error("PHP 'PDO' module is not available");
if ( !check_pdo_pgsql()->getOK() ) do_error("The PDO drivers for PostgreSQL are not available");
if ( !check_iconv()->getOK() ) do_error("The 'iconv' extension for PHP is not available");
function get_phpinfo() {
ob_start( );