Changeset 12855 for trunk/action.php


Ignore:
Timestamp:
Jan 5, 2012, 11:06:21 PM (12 years ago)
Author:
rvelices
Message:

feature 2548 multisize - improved picture.php display (original...) + code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/action.php

    r8728 r12855  
    6161    or !is_numeric($_GET['id'])
    6262    or !isset($_GET['part'])
    63     or !in_array($_GET['part'], array('t','e','i','h') ) )
     63    or !in_array($_GET['part'], array('e','r') ) )
    6464{
    6565  do_error(400, 'Invalid request - id/part');
     
    103103switch ($_GET['part'])
    104104{
    105   case 't':
    106     $file = get_thumbnail_path($element_info);
    107     break;
    108105  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':
    115106    if ( $user['enabled_high']!='true' )
    116107    {
    117108      do_error(401, 'Access denied h');
    118109    }
    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'] );
    120114    break;
    121115}
     
    176170$http_headers[] = 'Content-Type: '.$ctype;
    177171
    178 if (!isset($_GET['view']))
     172if (isset($_GET['download']))
    179173{
    180174  $http_headers[] = 'Content-Disposition: attachment; filename="'.$element_info['file'].'";';
Note: See TracChangeset for help on using the changeset viewer.