Make WordPress Core


Ignore:
Timestamp:
04/20/2004 10:56:47 PM (21 years ago)
Author:
saxmatt
Message:

Changed to superglobals, and eliminated $use_cache (since we always do).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload.php

    r1091 r1108  
    1212$allowed_types = explode(' ', trim(strtolower(get_settings('fileupload_allowedtypes'))));
    1313
    14 if ($HTTP_POST_VARS['submit']) {
     14if ($_POST['submit']) {
    1515    $action = 'upload';
    1616} else {
     
    8383
    8484
    85     $imgalt = (isset($HTTP_POST_VARS['imgalt'])) ? $HTTP_POST_VARS['imgalt'] : $imgalt;
    86 
    87     $img1_name = (strlen($imgalt)) ? $HTTP_POST_VARS['imgalt'] : $HTTP_POST_FILES['img1']['name'];
    88     $img1_type = (strlen($imgalt)) ? $HTTP_POST_VARS['img1_type'] : $HTTP_POST_FILES['img1']['type'];
    89     $imgdesc = str_replace('"', '"', $HTTP_POST_VARS['imgdesc']);
     85    $imgalt = (isset($_POST['imgalt'])) ? $_POST['imgalt'] : $imgalt;
     86
     87    $img1_name = (strlen($imgalt)) ? $_POST['imgalt'] : $HTTP_POST_FILES['img1']['name'];
     88    $img1_type = (strlen($imgalt)) ? $_POST['img1_type'] : $HTTP_POST_FILES['img1']['type'];
     89    $imgdesc = str_replace('"', '"', $_POST['imgdesc']);
    9090
    9191    $imgtype = explode(".",$img1_name);
     
    9898    if (strlen($imgalt)) {
    9999        $pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
    100         $img1 = $HTTP_POST_VARS['img1'];
     100        $img1 = $_POST['img1'];
    101101    } else {
    102102        $pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
     
    182182    }
    183183   
    184     if($HTTP_POST_VARS['thumbsize'] != 'none' ) {
    185         if($HTTP_POST_VARS['thumbsize'] == 'small') {
     184    if($_POST['thumbsize'] != 'none' ) {
     185        if($_POST['thumbsize'] == 'small') {
    186186            $max_side = 200;
    187187        }
    188         elseif($HTTP_POST_VARS['thumbsize'] == 'large') {
     188        elseif($_POST['thumbsize'] == 'large') {
    189189            $max_side = 400;
    190190        }
    191         elseif($HTTP_POST_VARS['thumbsize'] == 'custom') {
    192             $max_side = $HTTP_POST_VARS['imgthumbsizecustom'];
     191        elseif($_POST['thumbsize'] == 'custom') {
     192            $max_side = $_POST['imgthumbsizecustom'];
    193193        }
    194194       
Note: See TracChangeset for help on using the changeset viewer.