Changeset 4783
- Timestamp:
- Jan 28, 2010, 10:01:16 PM (14 years ago)
- Location:
- extensions/upload_form
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/upload_form/include/functions_upload.inc.php
r4739 r4783 26 26 $page['source_file'] = '/home/pierrick/public_html/test/resize/phpthumb/examples/statue_small.jpg'; 27 27 28 function add_uploaded_file($source_filepath, $ name=null, $categories=null)28 function add_uploaded_file($source_filepath, $original_filename=null, $categories=null) 29 29 { 30 30 global $page; … … 81 81 // database registration 82 82 $insert = array( 83 'file' => basename($file_path),83 'file' => isset($original_filename) ? $original_filename : basename($file_path), 84 84 'date_available' => $dbnow, 85 85 'tn_ext' => 'jpg', … … 91 91 ); 92 92 93 if (isset($name))94 {95 $insert['name'] = $name;96 }97 98 93 if (isset($high_infos)) 99 94 { -
extensions/upload_form/upload.php
r4740 r4783 51 51 { 52 52 $source_filepath = $_FILES['image_upload']['tmp_name'][$idx]; 53 $ name = $_FILES['image_upload']['name'][$idx];54 add_uploaded_file($source_filepath, $ name, array($_POST['category']));53 $original_filename = $_FILES['image_upload']['name'][$idx]; 54 add_uploaded_file($source_filepath, $original_filename, array($_POST['category'])); 55 55 } 56 56 }
Note: See TracChangeset
for help on using the changeset viewer.