WordPress.org

Plugin Directory

Changeset 508953


Ignore:
Timestamp:
02/22/12 18:13:37 (2 years ago)
Author:
xnau
Message:

corrected upload location error in CSV upload script

Location:
participants-database
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • participants-database/tags/1.3.2/upload_csv.php

    r500687 r508953  
    2222if( isset( $_POST['csv_file_upload'] ) ) : 
    2323 
    24     $target_path = Participants_Db::$plugin_path . '/uploads/' . basename( $_FILES['uploadedfile']['name']); 
     24    $target_path = ABSPATH.Participants_Db::$plugin_options['image_upload_location'] . basename( $_FILES['uploadedfile']['name']); 
    2525 
    2626    if( false !== move_uploaded_file( $_FILES['uploadedfile']['tmp_name'], $target_path ) ) { 
     
    2828        $errors[] = '<strong>'.sprintf( __('The file %s has been uploaded.', Participants_Db::PLUGIN_NAME ), $_FILES['uploadedfile']['name'] ).'</strong>'; 
    2929         
    30         $file_name = ABSPATH.Participants_Db::$uploads_path.basename( $_FILES['uploadedfile']['name'] ); 
    31          
    32         $insert_error = Participants_Db::insert_from_csv( $file_name ); 
     30        $insert_error = Participants_Db::insert_from_csv( $target_path ); 
    3331 
    3432        if ( is_numeric( $insert_error ) ) { 
  • participants-database/trunk/upload_csv.php

    r500687 r508953  
    2222if( isset( $_POST['csv_file_upload'] ) ) : 
    2323 
    24     $target_path = Participants_Db::$plugin_path . '/uploads/' . basename( $_FILES['uploadedfile']['name']); 
     24    $target_path = ABSPATH.Participants_Db::$plugin_options['image_upload_location'] . basename( $_FILES['uploadedfile']['name']); 
    2525 
    2626    if( false !== move_uploaded_file( $_FILES['uploadedfile']['tmp_name'], $target_path ) ) { 
     
    2828        $errors[] = '<strong>'.sprintf( __('The file %s has been uploaded.', Participants_Db::PLUGIN_NAME ), $_FILES['uploadedfile']['name'] ).'</strong>'; 
    2929         
    30         $file_name = ABSPATH.Participants_Db::$uploads_path.basename( $_FILES['uploadedfile']['name'] ); 
    31          
    32         $insert_error = Participants_Db::insert_from_csv( $file_name ); 
     30        $insert_error = Participants_Db::insert_from_csv( $target_path ); 
    3331 
    3432        if ( is_numeric( $insert_error ) ) { 
Note: See TracChangeset for help on using the changeset viewer.