Changeset 12855 for trunk/action.php
- Timestamp:
- Jan 5, 2012, 11:06:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/action.php
r8728 r12855 61 61 or !is_numeric($_GET['id']) 62 62 or !isset($_GET['part']) 63 or !in_array($_GET['part'], array(' t','e','i','h') ) )63 or !in_array($_GET['part'], array('e','r') ) ) 64 64 { 65 65 do_error(400, 'Invalid request - id/part'); … … 103 103 switch ($_GET['part']) 104 104 { 105 case 't':106 $file = get_thumbnail_path($element_info);107 break;108 105 case 'e': 109 $file = get_element_path($element_info);110 break;111 case 'i':112 $file = get_image_path($element_info);113 break;114 case 'h':115 106 if ( $user['enabled_high']!='true' ) 116 107 { 117 108 do_error(401, 'Access denied h'); 118 109 } 119 $file = get_high_path($element_info); 110 $file = get_element_path($element_info); 111 break; 112 case 'r': 113 $file = original_to_representative( get_element_path($element_info), $element_info['representative_ext'] ); 120 114 break; 121 115 } … … 176 170 $http_headers[] = 'Content-Type: '.$ctype; 177 171 178 if ( !isset($_GET['view']))172 if (isset($_GET['download'])) 179 173 { 180 174 $http_headers[] = 'Content-Disposition: attachment; filename="'.$element_info['file'].'";';
Note: See TracChangeset
for help on using the changeset viewer.