2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$exceed_max_msg=t('Your PHP settings limit the maximum file size per upload to %size MB.',array('%size'=>file_upload_max_size())).'<br/>';
$more_info=t("Depending on your sever environment, these settings may be changed in the system-wide php.ini file, a php.ini file in your Drupal root directory, in your Drupal site's settings.php file, or in the .htaccess file in your Drupal root directory.");
form_set_error('upload_uploadsize_default',t('The %role maximum file size per upload is greater than the total file size allowed per user',array('%role'=>t('default'))));
form_set_error('upload_uploadsize_'.$rid,t('The %role file size limit must be a number and greater than zero.',array('%role'=>theme('placeholder',$role))));
}
if(!is_numeric($usersize)||($usersize<=0)){
form_set_error('upload_usersize_'.$rid,t('The %role file size limit must be a number and greater than zero.',array('%role'=>theme('placeholder',$role))));
form_set_error('upload_uploadsize_'.$rid,t('The %role maximum file size per upload is greater than the total file size allowed per user',array('%role'=>theme('placeholder',$role))));
}
}
}
/**
* Menu callback for the upload settings form.
*/
functionupload_admin_settings(){
$upload_extensions_default=variable_get('upload_extensions_default','jpg jpeg gif png txt html doc xls pdf ppt pps');
@@ -162,34 +215,37 @@ function upload_admin_settings() {
'#description'=>t('The default maximum size of all files a user can have on the site (in megabytes).'),
);
$form['upload_max_size']=array('#value'=>'<p>'.t('Your PHP settings limit the maximum file size per upload to %size MB.',array('%size'=>file_upload_max_size())).'</p>');