Changeset 11962 for trunk/admin/include/uploadify/uploadify.php
- Timestamp:
- Aug 17, 2011, 9:56:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/uploadify/uploadify.php
r6625 r11962 20 20 $tmp = ob_get_contents(); 21 21 ob_end_clean(); 22 //error_log($tmp, 3, "/tmp/php-".date('YmdHis').'-'.sprintf('%020u', rand()).".log");22 error_log($tmp, 3, "/tmp/php-".date('YmdHis').'-'.sprintf('%020u', rand()).".log"); 23 23 24 24 if ($_FILES['Filedata']['error'] !== UPLOAD_ERR_OK) … … 44 44 $_FILES['Filedata']['tmp_name'], 45 45 $_FILES['Filedata']['name'], 46 null,47 846 array($_POST['category_id']), 47 $_POST['level'] 48 48 ); 49 49 … … 63 63 ); 64 64 65 $query = ' 66 SELECT 67 id, 68 path, 69 tn_ext 70 FROM '.IMAGES_TABLE.' 71 WHERE id = '.$image_id.' 72 ;'; 73 $image_infos = pwg_db_fetch_assoc(pwg_query($query)); 74 75 $thumbnail_url = preg_replace('#^'.PHPWG_ROOT_PATH.'#', './', get_thumbnail_url($image_infos)); 76 77 $return = array( 78 'image_id' => $image_id, 79 'category_id' => $_POST['category_id'], 80 'thumbnail_url' => $thumbnail_url, 81 ); 82 65 83 $output = ob_get_contents(); 66 84 ob_end_clean(); … … 68 86 { 69 87 add_upload_error($_POST['upload_id'], $output); 88 $return['error_message'] = $output; 70 89 } 71 90 72 echo "1";91 echo json_encode($return); 73 92 ?>
Note: See TracChangeset
for help on using the changeset viewer.