| @@ 547-557 (lines=11) @@ | ||
| 544 | $changeemail = $user_data['email']; |
|
| 545 | } |
|
| 546 | ||
| 547 | if (!check_user_email($user_data['email']) && |
|
| 548 | empty($user_data['password0']) |
|
| 549 | ){ |
|
| 550 | Display::addFlash( |
|
| 551 | Display:: return_message( |
|
| 552 | get_lang('ToChangeYourEmailMustTypeYourPassword'), |
|
| 553 | 'error', |
|
| 554 | false |
|
| 555 | ) |
|
| 556 | ); |
|
| 557 | } |
|
| 558 | } |
|
| 559 | } |
|
| 560 | ||
| @@ 526-532 (lines=7) @@ | ||
| 523 | } |
|
| 524 | ||
| 525 | // If the URL is invalid, an error occurs. |
|
| 526 | if (!api_valid_url($values['url'], true)) { |
|
| 527 | Display::addFlash( |
|
| 528 | Display::return_message(get_lang('GiveURL'), 'error') |
|
| 529 | ); |
|
| 530 | ||
| 531 | return false; |
|
| 532 | } |
|
| 533 | ||
| 534 | // Finding the old category_id. |
|
| 535 | $sql = "SELECT * FROM " . $tbl_link . " |
|
| @@ 282-286 (lines=5) @@ | ||
| 279 | } |
|
| 280 | } |
|
| 281 | ||
| 282 | if (empty($password)) { |
|
| 283 | Display::addFlash(Display::return_message(get_lang('ThisFieldIsRequired').': '.get_lang('Password') , 'warning')); |
|
| 284 | ||
| 285 | return false; |
|
| 286 | } |
|
| 287 | ||
| 288 | // database table definition |
|
| 289 | $table_user = Database::get_main_table(TABLE_MAIN_USER); |
|
| @@ 951-954 (lines=4) @@ | ||
| 948 | return false; |
|
| 949 | } |
|
| 950 | ||
| 951 | if (empty($file['name'])) { |
|
| 952 | Display::addFlash(Display::return_message(get_lang('NoFileSpecified'), 'warning')); |
|
| 953 | return false; |
|
| 954 | } |
|
| 955 | ||
| 956 | // are we overwriting a previous file or sending a new one |
|
| 957 | ||
| @@ 978-982 (lines=5) @@ | ||
| 975 | } |
|
| 976 | ||
| 977 | // check if the file is actually uploaded |
|
| 978 | if (!is_uploaded_file($dropbox_filetmpname)) { // check user fraud : no clean error msg. |
|
| 979 | Display::addFlash(Display::return_message(get_lang('TheFileIsNotUploaded'), 'warning')); |
|
| 980 | ||
| 981 | return false; |
|
| 982 | } |
|
| 983 | ||
| 984 | $upload_ok = process_uploaded_file($file, true); |
|
| 985 | ||
| @@ 998-1001 (lines=4) @@ | ||
| 995 | $dropbox_filename = php2phps($dropbox_filename); |
|
| 996 | ||
| 997 | //filter extension |
|
| 998 | if (!filter_extension($dropbox_filename)) { |
|
| 999 | Display::addFlash(Display::return_message(get_lang('UplUnableToSaveFileFilteredExtension'), 'warning')); |
|
| 1000 | return false; |
|
| 1001 | } |
|
| 1002 | ||
| 1003 | // set title |
|
| 1004 | $dropbox_title = $dropbox_filename; |
|