Changeset 5021 for trunk/upload.php
- Timestamp:
- Mar 2, 2010, 3:54:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upload.php
r5014 r5021 62 62 if (!in_array($extension, $conf['picture_ext'])) 63 63 { 64 array_push( $result['error'], l10n(' upload_advise_filetype') );64 array_push( $result['error'], l10n('the picture must be to the fileformat jpg, gif or png') ); 65 65 return $result; 66 66 } … … 73 73 { 74 74 array_push( $result['error'], 75 l10n(' upload_advise_filesize').$my_max_file_size.' KB' );75 l10n('the filesize of the picture must not exceed : ').$my_max_file_size.' KB' ); 76 76 } 77 77 else … … 81 81 if ( !move_uploaded_file( $_FILES['picture']['tmp_name'], $temp_name ) ) 82 82 { 83 array_push( $result['error'], l10n(' upload_cannot_upload') );83 array_push( $result['error'], l10n('can\'t upload the picture on the server') ); 84 84 } 85 85 else … … 91 91 { 92 92 array_push( $result['error'], 93 l10n(' upload_advise_width').$image_max_width.' px' );93 l10n('the width of the picture must not exceed : ').$image_max_width.' px' ); 94 94 } 95 95 if ( isset( $image_max_height ) … … 98 98 { 99 99 array_push( $result['error'], 100 l10n(' upload_advise_height').$image_max_height.' px' );100 l10n('the height of the picture must not exceed : ').$image_max_height.' px' ); 101 101 } 102 102 // $size[2] == 1 means GIF … … 109 109 case 3 : $result['type'] = 'png'; break; 110 110 default : 111 array_push( $result['error'], l10n(' upload_advise_filetype') );111 array_push( $result['error'], l10n('the picture must be to the fileformat jpg, gif or png') ); 112 112 } 113 113 } … … 182 182 if ( @is_file( $path ) ) 183 183 { 184 array_push( $error, l10n(' upload_file_exists') );184 array_push( $error, l10n('A picture\'s name already used') ); 185 185 } 186 186 // test de la présence des champs obligatoires 187 187 if ( empty($_FILES['picture']['name'])) 188 188 { 189 array_push( $error, l10n(' upload_filenotfound') );189 array_push( $error, l10n('You must choose a picture fileformat for the image') ); 190 190 } 191 191 if ( !preg_match( '/([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)/', 192 192 $_POST['mail_address'] ) ) 193 193 { 194 array_push( $error, l10n(' reg_err_mail_address') );194 array_push( $error, l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)') ); 195 195 } 196 196 if ( empty($_POST['username']) ) 197 197 { 198 array_push( $error, l10n(' upload_err_username') );198 array_push( $error, l10n('the username must be given') ); 199 199 } 200 200 … … 210 210 else 211 211 { 212 array_push( $error, l10n(' err_date') );212 array_push( $error, l10n('wrong date') ); 213 213 } 214 214 } … … 225 225 if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $_FILES['picture']['name'] ) ) 226 226 { 227 array_push( $error, l10n(' update_wrong_dirname') );227 array_push( $error, l10n('wrong filename') ); 228 228 } 229 229 … … 319 319 // Start output of page 320 320 // 321 $title= l10n(' upload_title');321 $title= l10n('Upload a picture'); 322 322 $page['body_id'] = 'theUploadPage'; 323 323 include(PHPWG_ROOT_PATH.'include/page_header.php'); … … 351 351 if ( isset( $page['waiting_id'] ) ) 352 352 { 353 $advise_title = l10n(' upload_advise_thumbnail').$_FILES['picture']['name'];353 $advise_title = l10n('Optional, but recommended : choose a thumbnail to associate to ').$_FILES['picture']['name']; 354 354 } 355 355 else … … 382 382 if ( !empty($conf['upload_maxfilesize']) ) 383 383 { 384 $content = l10n(' upload_advise_filesize');384 $content = l10n('the filesize of the picture must not exceed : '); 385 385 $content.= $conf['upload_maxfilesize'].' KB'; 386 386 $template->append('advises', $content); … … 391 391 if ( $conf['upload_maxwidth_thumbnail'] != '' ) 392 392 { 393 $content = l10n(' upload_advise_width');393 $content = l10n('the width of the picture must not exceed : '); 394 394 $content.= $conf['upload_maxwidth_thumbnail'].' px'; 395 395 $template->append('advises', $content); … … 397 397 if ( $conf['upload_maxheight_thumbnail'] != '' ) 398 398 { 399 $content = l10n(' upload_advise_height');399 $content = l10n('the height of the picture must not exceed : '); 400 400 $content.= $conf['upload_maxheight_thumbnail'].' px'; 401 401 $template->append('advises', $content); … … 406 406 if ( $conf['upload_maxwidth'] != '' ) 407 407 { 408 $content = l10n(' upload_advise_width');408 $content = l10n('the width of the picture must not exceed : '); 409 409 $content.= $conf['upload_maxwidth'].' px'; 410 410 $template->append('advises', $content); … … 412 412 if ( $conf['upload_maxheight'] != '' ) 413 413 { 414 $content = l10n(' upload_advise_height');414 $content = l10n('the height of the picture must not exceed : '); 415 415 $content.= $conf['upload_maxheight'].' px'; 416 416 $template->append('advises', $content); 417 417 } 418 418 } 419 $template->append('advises', l10n(' upload_advise_filetype'));419 $template->append('advises', l10n('the picture must be to the fileformat jpg, gif or png')); 420 420 421 421 //----------------------------------------- optionnal username and mail address
Note: See TracChangeset
for help on using the changeset viewer.