$form['pgsql']['description']=$t('Your PostgreSQL Server is too old. Drupal requires at least PostgreSQL %version.',array('%version'=>DRUPAL_MINIMUM_PGSQL));
drupal_set_message($requirement['description'].' ('.t('Currently using !item !version',array('!item'=>$requirement['title'],'!version'=>$requirement['value'])).')','error');
* Whether to report any fatal errors with form_set_error().
*/
function_unicode_check($errors=FALSE){
function_unicode_check(){
// Ensure translations don't break at install time
$t=get_t();
// Set the standard C locale to ensure consistent, ASCII-only string handling.
setlocale(LC_CTYPE,'C');
// Check for outdated PCRE library
// Note: we check if U+E2 is in the range U+E0 - U+E1. This test returns TRUE on old PCRE versions.
if(preg_match('/[à-á]/u','â')){
if($errors){
form_set_error('unicode',t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the <a href="@url">PHP PCRE documentation</a> for more information.',array('@url'=>'http://www.php.net/pcre')));
}
returnUNICODE_ERROR;
returnarray(UNICODE_ERROR,$t('The PCRE library in your PHP installation is outdated. This will cause problems when handling Unicode text. If you are running PHP 4.3.3 or higher, make sure you are using the PCRE library supplied by PHP. Please refer to the <a href="@url">PHP PCRE documentation</a> for more information.',array('@url'=>'http://www.php.net/pcre')),REQUIREMENT_ERROR);
}
// Check for mbstring extension
if(!function_exists('mb_strlen')){
returnUNICODE_SINGLEBYTE;
returnarray(UNICODE_SINGLEBYTE,$t('Operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.',array('@url'=>'http://www.php.net/mbstring')),REQUIREMENT_WARNING);
}
// Check mbstring configuration
if(ini_get('mbstring.func_overload')!=0){
if($errors){
form_set_error('unicode',t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')));
}
returnUNICODE_ERROR;
returnarray(UNICODE_ERROR,$t('Multibyte string function overloading in PHP is active and must be disabled. Check the php.ini <em>mbstring.func_overload</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')),REQUIREMENT_ERROR);
}
if(ini_get('mbstring.encoding_translation')!=0){
if($errors){
form_set_error('unicode',t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')));
}
returnUNICODE_ERROR;
returnarray(UNICODE_ERROR,$t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.encoding_translation</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')),REQUIREMENT_ERROR);
}
if(ini_get('mbstring.http_input')!='pass'){
if($errors){
form_set_error('unicode',t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')));
}
returnUNICODE_ERROR;
returnarray(UNICODE_ERROR,$t('Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_input</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')),REQUIREMENT_ERROR);
}
if(ini_get('mbstring.http_output')!='pass'){
if($errors){
form_set_error('unicode',t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')));
}
returnUNICODE_ERROR;
returnarray(UNICODE_ERROR,$t('Multibyte string output conversion in PHP is active and must be disabled. Check the php.ini <em>mbstring.http_output</em> setting. Please refer to the <a href="@url">PHP mbstring documentation</a> for more information.',array('@url'=>'http://www.php.net/mbstring')),REQUIREMENT_ERROR);
}
// Set appropriate configuration
mb_internal_encoding('utf-8');
mb_language('uni');
returnUNICODE_MULTIBYTE;
returnarray(UNICODE_MULTIBYTE);
}
/**
* Return the required Unicode status and errors for admin/settings.
* Return Unicode library status and errors.
*/
functionunicode_settings(){
$status=_unicode_check(TRUE);
$options=array(UNICODE_SINGLEBYTE=>t('Standard PHP: operations on Unicode strings are emulated on a best-effort basis. Install the <a href="@url">PHP mbstring extension</a> for improved Unicode support.',array('@url'=>'http://www.php.net/mbstring')),
UNICODE_MULTIBYTE=>t('Multi-byte: operations on Unicode strings are supported through the <a href="@url">PHP mbstring extension</a>.',array('@url'=>'http://www.php.net/mbstring')),
UNICODE_ERROR=>t('Invalid: the current configuration is incompatible with Drupal.'));
drupal_set_message($requirement['description'].' ('.st('Currently using !item !version',array('!item'=>$requirement['title'],'!version'=>$requirement['value'])).')','error');
$requirements['webserver']['description']=$t('Your Apache server is too old. Drupal requires at least Apache %version.',array('%version'=>DRUPAL_MINIMUM_APACHE));
$requirements['php']['description']=$t('Your PHP installation is too old. Drupal requires at least PHP %version.',array('%version'=>DRUPAL_MINIMUM_PHP));
'description'=>$t('The file %file is not protected from modifications and poses a security risk. You must change the file\'s permissions to be non-writable.',array('%file'=>conf_path().'/settings.php')),
$requirements['cron']['value']=$t('Last run !time ago',array('!time'=>format_interval(time()-$cron_last)));
}
else{
$requirements['cron']=array(
'description'=>$t('Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for <a href="@url">configuring cron jobs</a>.',array('@url'=>'http://drupal.org/cron')),
'severity'=>REQUIREMENT_ERROR,
'value'=>$t('Never run'),
);
}
$requirements['cron']['description'].=' '.t('You can <a href="@cron">run cron manually</a>.',array('@cron'=>url('admin/logs/status/run-cron')));
$output.='<p>'.t('For more information please read the configuration and customization handbook <a href="@system">System page</a>.',array('@system'=>'http://drupal.org/handbook/modules/system/')).'</p>';
return$output;
case'admin':
...
...
@@ -45,6 +45,8 @@ function system_help($section) {
case'admin/settings/modules':
returnt('<p>Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new <a href="@permissions">permissions</a> might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.</p>
<p>It is important that <a href="@update-php">update.php</a> is run every time a module is updated to a newer version.</p>',array('@permissions'=>url('admin/user/access'),'@throttle'=>url('admin/settings/throttle'),'@update-php'=>$base_url.'/update.php'));
case'admin/logs/status':
returnt('<p>Here you can find a short overview of your Drupal site\'s parameters as well as any problems detected with your installation. It is useful for example to copy/paste this information when you need support.</p>');
}
}
...
...
@@ -233,28 +235,49 @@ function system_menu($may_cache) {