Changeset 5957 for trunk/admin/include/functions_upload.inc.php
- Timestamp:
- Apr 25, 2010, 12:22:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_upload.inc.php
r5089 r5957 17 17 // 18 18 // 4) register in database 19 20 // add default event handler for image and thumbnail resize 21 add_event_handler('upload_image_resize', 'pwg_image_resize', EVENT_HANDLER_PRIORITY_NEUTRAL, 6); 22 add_event_handler('upload_thumbnail_resize', 'pwg_image_resize', EVENT_HANDLER_PRIORITY_NEUTRAL, 6); 19 23 20 24 function add_uploaded_file($source_filepath, $original_filename=null, $categories=null, $level=null) … … 61 65 $high_infos = pwg_image_infos($high_path); 62 66 63 pwg_image_resize( 67 trigger_event('upload_image_resize', 68 false, 64 69 $high_path, 65 70 $file_path, … … 76 81 prepare_directory($thumb_dir); 77 82 78 pwg_image_resize( 83 trigger_event('upload_thumbnail_resize', 84 false, 79 85 $file_path, 80 86 $thumb_path, … … 170 176 } 171 177 172 function pwg_image_resize($source_filepath, $destination_filepath, $max_width, $max_height, $quality) 173 { 178 function pwg_image_resize($result, $source_filepath, $destination_filepath, $max_width, $max_height, $quality) 179 { 180 if ($result !== false) 181 { 182 //someone hooked us - so we skip 183 return $result; 184 } 185 174 186 if (!function_exists('gd_info')) 175 187 {
Note: See TracChangeset
for help on using the changeset viewer.